How to see the headers in a request while using Kong Ingress controller - kubernetes

In any ingress controller like https://traefik.io/ there is usually a DEBUG mode to run. In this mode you can actually see the headers in the request which help in debugging.
However in https://docs.konghq.com/kubernetes-ingress-controller I am unable to find the same.
I have installed kong using helm and it installs and runs fine.
I want to be able to see the headers in a request and I can't seem to find a way around it. There is no logging level defined in values.yaml file.

Turns out you can enable debug mode by using the following environment variable. Add the following with other environment variables to get log in DEBUG mode
env:
log_level: debug
However, to see the values of requst headers and response you will need the following
plugin
You might want to redirect it to /dev/stdout so it comes in output of kong logs.

for debugging one can send a header; Kong-Debug: 1 (see https://docs.konghq.com/gateway-oss/2.5.x/proxy/#evaluation-order ) and there is an upcoming change in 2.6 that might be helpful as well; see https://github.com/Kong/kong/pull/6744

Related

Keycloack with NewRelic Transactions does not shows the route path

I am trying to monitor keycloak application., but it's only shows without routes
I am using the latest Newrelic agent with the Keycloac 20.0.3
I tried to use
https://github.com/newrelic-experimental/newrelic-java-quarkus
but I got the same results
Most Probably in your newrelic.yml config file there is an option enable_auto_transaction_naming try to enable it

How can I set grafana 7 to work with warp10 2.7.x?

I've just install a fresh warp10 standalone server version 2.7.2.
Using beamium to send data into it and seeing the data via the VScode plugin is OK and I can see graph in GTS preview.
I've also installed a fresh grafana and warp10-plugin following the warp10 recommandation on the ovh github.
When execution a default warp10 query (via editor), grafana add some strings in the query, like the start or end value, so in the end the query look like:
1609947849757000 'start' STORE
'2021-01-06T15:44:09.757Z' 'startISO' STORE
1610034249757000 'end' STORE
'2021-01-07T15:44:09.757Z' 'endISO' STORE
86400000000 'interval' STORE
199538106 '__interval' STORE
199538 '__interval_ms' STORE
[ 'host.local.domain' ] 'host_list' STORE
But when executing, there is an error poping in the warp10 logs, after decryption it tell:
Exception at '=>1609947849757000<= 'start' STORE '2021-01-06T15:44:09.757Z'' in section [TOP]
It seems that it don't take the LONG (DOUBLE?) number for what it is, and try to match a function with the same name that don't exists.
On grafana side, I don't have any valuable help, it tell me:
WarpScript Failure on Line -1, Unable to read x-warp10-error-line and x-warp10-error-line headers in server answer
Do I miss something ?
==== Edit: 2021-01-07 17:32 UTC
After first reply, doing other test:
I've tryied the same query, and the error is still the same.
Warpscript failure
But in VScode this query works:
{
'token' $RTOKEN
'class' '~.*'
'labels' {}
'end' '2021-01-07T17:35:28.086Z'
'timespan' 21600000000
} FETCH
I've also try to use the bartender stuff in grafana and it work fine too...
So everything should work, I must miss the obvious.
Can Java version have an impact ?
If the datasource is working, you didn't miss anything.
Do you use the built in warpscript editor ? Make sure you ticked the "WarpScript Editor" checkbox:
Then, do the simplest FETCH request you can do, or copy paste the code you did in VSCode.
You can define your own variables too in the datasource configuration. It is usefull for tokens.
I just setup Grafana 7.3.6 + ovh plugin to check, it seems there is no regression issue.
The full WarpScript can be found in the browser console.
The header error is linked to Grafana 7, no problem with Grafana 6.x. Install Grafana 6.x if you want WarpSript detailed errors.
Edit: Issue is now fixed and merged into ovh github master.
If you want to test another Warp 10 data source, you can use the credential and advices in this article. You just need to go before covid lockdown to find relevant office beertender data...

Mulesoft - Uh-oh spaghettios! There's nothing here

This error is driving me nuts...
Situation:
I am trying to create a REST api and use a api-gateway proxy to access it. Proxy URL is HTTPS.
The deployment goes through fine. No errors reported in the logs. Worker assigned.
However when I try to access through browser get the "Uh-oh spaghettios! There's nothing here.".
Have tried all the usual things like making the https port dynamic using ${https.port} and using 0.0.0.0 instead of localhost in the http-listener config. But that does not help. Has this something to got to do with the proxy version ?
Any help or pointers will be great!
Make sure you follow Steps 2 from below link
Getting Started with Connectors
All,
Got the resolution. The problem was with the certificate chain. The keystore did not contain intermediate certificates. When added to the keystore the connectivity worked fine.
Only if Mulesoft provided correct errors or detailed logging, I would have saved lot of time over this.
Thanks for your inputs.

How can I set http.port in application.conf by using playframework2.4(Scala)

I could set http.port in applicaton.conf by using playframework1.2.7
like this
http.port = 9020
jpda.port = 8020
also jdpa.port.
But in play2.4.
I cannot set http.port in application.conf like this.
I know that I can do like this when I run this project.
activator "run 9020"
But it is too troublesome for me.
If you have some ideas,
please share your idea.
You cannot specify port in aaplication.conf during run mode (but this can be used while deploying).
In run mode the HTTP server part of Play starts before the application has been compiled. This means that the HTTP server cannot access the application.conf file when it starts. If you want to override HTTP server settings while using the run command you cannot use the application.conf file. Instead, you need to either use system properties or the devSettings setting shown above.
Source: https://www.playframework.com/documentation/2.4.x/Configuration#HTTP-server-settings-in-application.conf
Also look at full server configuration options
https://www.playframework.com/documentation/2.4.x/ProductionConfiguration#Server-configuration-options

How to display "Application is down for upgrade" message when redeploying Glassfish application?

I tried to access a web application while it was in the process of redeploying or reloading, and I just got a 404 error. This is likely to result in time-wasting helpdesk calls if a user happens to see it. How can I replace the 404 message with something more helpful, like "This application is being upgraded - check back in a minute or two"?
You may want to consider looking at Application Versioning feature to "pre-deploy" an application to minimize the impact.
Deploy your app:
$ asadmin deploy myapp.war
Deploy version2 in "disabled" mode, meaning the old version is still active:
$ asadmin deploy --enabled=false --name myapp:version2 myapp.war (version2 is an arbitrary name)
When ready to activate version2:
$ asadmin enable myapp:version2
The nice thing about this approach is that if you run into issues with version2, you can always fall back to the original version:
$ asadmin enable myapp
I normally deploy my webapps behind an Apache proxy. When the appserver goes down Apache returns a 503 response.
This can be customised with an alternative "I'm sorry we're doing maintanence" message
You can also customize the standard response codes (403, 404, etc.) in the server configuration. The simple change is to change the message text, but it isn't as elegant as what you are looking for. However, there will always be a point where the environment will return 404, 503, etc., so you might consider adding this, in addition to, the "behind the proxy" answer provided by #Mark O'Connor.