Krakend grafana dashoboard shows no data - grafana

I am using krakend-ce 1.4 and influx 1.X
I have configured grafana dashboard and hoping to see dashboard panels for all the layers.
There are 4 layers as per dashboard.
Router
Proxy
Backend
System
I see router panels data is getting charted as expected. But for other panels I see empty charts. "No Data to show"
my configuration for krakend-metrics and influx modules is as follows:
"github_com/devopsfaith/krakend-metrics": {
"collection_time": "30s",
"proxy_disabled": false,
"router_disabled": false,
"backend_disabled": false,
"endpoint_disabled": false,
"listen_address": "127.0.0.1:8090"
},
"github_com/letgoapp/krakend-influx":{
"address":"http://influxdb-service:80",
"ttl":"25s",
"buffer_size":0,
"db": "krakend",
"username": "admin",
"password": "adminadmin"
}
I also added opencensus as follows:
"github_com/devopsfaith/krakend-opencensus": {
"sample_rate": 100,
"reporting_period": 1,
"enabled_layers": {
"backend": true,
"router": true,
"pipe": true
},
"influxdb": {
"address": "http://influxdb-service:80",
"db": "krakend",
"timeout": "1s",
"username": "admin",
"password": "adminadmin"
}
}
I thought may be my data is not ending up in influxDB, so I went in and checked what does it have. show measurements give me following output, and all measurements does have some data.
I am using grafana dashboard ID 5722. which is specified in docs.
how can I change my setup so that panels for proxy, backend and system shows charts?
__________________________
UPDATE
I upgrade krakend to version 2.1
Removed opencensus metrics exporter
Now using dashboard 15029 per krakend 2.1.2 documentation.
I still do not see other layer charts getting populated.
PS: I have checked what metrics are getting exposed on http://krakend-host:8090/__stats I see layer.backend and layer.pipe metrics.
__________________________
UPDATE 2
I was also checking for other available dashboards which can work. I stumbled upon this one https://github.com/letgoapp/krakend-influx/blob/master/examples/grafana-dashboard.json
I see 2 more panels showing up. but not all of them.

kale
If you want to use the Grafana dashboards published by KrakenD they work with only with the native InfluxDB exporter (github_com/letgoapp/krakend-influx) and NOT with the OpenCensus one.
You should delete the github_com/devopsfaith/krakend-opencensus configuration block, otherwise, you have KrakenD reporting the same metrics in different measurements twice.
The influxdb port is usually http://influxdb-service:8086, but you show port 80 in the settings, make sure these are not old data. If you have changed the port it's fine.
Another thing you have to check is if the InfluxDB client is started during KrakenD startup (there is a line in the logs telling about it), old versions had a random bug that prevented the metrics from being sent.
Finally, the maintained dashboard is now 15029 for the InfluxDB v1. Try to use that one.
There have been several improvements in metrics and in KrakenD in general system, I would avoid staying with the old 1.4 being the transition as simple as it is (but this is another topic)
Hope this helps

After hours of debugging, I finally found the solution. Key here to note is If your configurations are correct, you should see data showing up in influxDB. First, make sure that you see data in influxDB. In my case, this was correct.
Like I mentioned in the second update to the question, I see some more panels getting populated when I used the dashboard from https://github.com/letgoapp/krakend-influx/blob/master/examples/grafana-dashboard.json
This was a huge lead. Later I went on to compare the specific JSON blocks within the working dashboard and the one which was missing some charts. I realized all of those panels had "datasource": null. And the ones which were working had the "datasource": "InfluxDB",
I updated the JSON definition of dashboard and viola !! All the panels started showing the charts.
PS: If you see any datasource as null, or which does not correspond to your influx DB datasource, you should update it to use influx db data source which is defined in the datasources section on the admin panel.

Related

Grafana Geo Map Dashboard - Geo IP Configuration

I have installed Grafana in my AKS cluster and now I want to create a Dashboard which shows the Geo location of the users connecting. So I found the below dashboard in Grafana website.
https://grafana.com/grafana/dashboards/12559
But some of the panels shows "No Data" in this dashboard. For instance, Requests per Country doesn't show any data. The query used by this panel is
sum by (geoip_country_code) (count_over_time({$label_name=~"$label_value", job=~"$job", instance=~"$instance"} | json | geoip_country_code != "" | __error__="" [$__interval]))
I searched regarding this, and as far as I know, we need "Geo Map" plugin installed in our Grafana Dashboard. But I see the plugin installed in Grafana.
So in this case, do I need to install any kind of agent or something to gather metrics regarding location? I also see in the grafana dashboard saying below.
I can't understand where I should put this configuration. Is these parameters should be placed in the Config Map or else the NGINX Ingress Controller Annotation section?

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...

Get data from clickhouse to grafana

I can’t get data from the clickhouse database to Grafana. I have tried various settings of the data source: various access options, various authorization options. And, did not get any results.
I have made the settings in the Grafana like this:
This is my request. If I copy it and execute it on the clickhouse console, then I get the data. That is, the request is formed rules.
ClickHouse database is on localhost:8123 (in console: curl 'http://localhost:8123/' Ok.)
Grafana is on localhost:3000.
All services are on the same machine.
I am using clickhouse server version 20.1.4 revision 54431 and grafana 6.6.2.
This is a release bug.
it works correctly with Grafana 6 before the latest update from GrafanaLabs that seem to break the compatibility.
see: https://github.com/Vertamedia/clickhouse-grafana/issues/171

Grafana custom data source

help me with this fairly new to Grafana
Things accomplished so far:
1. Managed to get a JSON output from CSV (basically looking to plot transaction availability based on success/ fail criteria)
2. Wanted a Prometheus source imported
Can you help me how I proceed in either building a Graphite dashboard (or) Prometheus? Much appreciated. thanks
In order to use Prometheus datasource, you need to follow below steps
Start Prometheus server. By default, it listens at 9090 port.
login to Grafana console, go to option - Add datasource
select Prometheus as type of datasource from the drop down.
Insert the Prometheus URL (You got this in step 1)
Access should be "direct" if you aren't using any proxy to establish connection.
Hit save & test.

IBM API Connect - Can custom connectors be exposed via UI?

In SLC ARC the list of connectors available (when creating datasources and thus generating models) via the UI was hard-coded (link to overview of issue) Does the same hold true for API Connect?
Effectively, I'd like to create a fork of the mssql connector to address some issues with how schemas are processed when generating models from existing tables. If I create such a connector, will I be able to install it so that I can utilize it via the GUI (again, I could not via SLC ARC due to hard-coding). Any help is greatly appreciated!
EDIT: I've installed the loopback-connector-redis connector into a throwaway project. When I spin up APIC it does not appear on the data sources screen. So, rephrasing my question: are there settings or otherwise that would allow such connectors to be included. Ideally, APIC would scan my project and determine what I have installed, exposing those connectors.
As you've seen, the list is currently fixed and doesn't detect additional installed connectors.
If you want to use your own custom connector, create a new datasource using the API Designer, select the MSSQL connector and fill in the values per usual.
Next, you'll need to open a file on your system to tweak the connector target.
In your project directory, open ./server/datasources.json and you should see the datasource you just created. Then, just change the connector value to the name of the custom version you created, save, and continue developing your APIs like normal.
{
"db": {
"name": "db",
"connector": "memory"
},
"DB2 Customers": {
"host": "datbase.acme-air.com",
"port": 50000,
"database": "customers",
"password": "",
"name": "Customer DB",
"connector": "db2-custom",
"user": "mhamann#us.ibm.com"
}
}
Unfortunately, you're now on your own in terms of managing datasources, as they won't show up in the Designer's datasource editor. They will still be usable in other parts of the Designer, so you can connect up your models, etc.