I am new in influxdb and grafana .On grafana dashboard I am getting influxdb response with metrics query but grafana graph is not showing with that data
Data I got from influxdb is
{"results":[{"series":[{"name":"cpu_load_short","columns":["time","value"],"values":[["2016-06-17T06
:23:39.3855934Z",0.64],["2016-06-17T07:10:54.1543272Z",0.64],["2016-06-17T08:21:43.8362874Z",0.64],["2016-06-17T08
:30:54.2708891Z",0.64],["2016-06-17T08:38:06.8087172Z",0.64],["2016-06-17T08:38:40.659661Z",0.64],["2016-06-17T08
:38:46.0169674Z",0.64],["2016-06-17T08:38:57.2826142Z",0.64],["2016-06-20T08:44:40.7810414Z",0.64]]}
]}]}
Related
Grafana does not display any data ( failed to fetch ) after 60s for large datasets but when the interval is smaller dashboard loads fine any help here?
Tried tweaking timeouts in grafana.ini does not seem to help here looks like Grafana has a hard - limit on those parameters
Grafana version > 7.0.3
Data source : influxdb
dashboard loads fine for smaller intervals
any help here would be appreciated here?
Use time groupping GROUP BY time($__interval) in your InfluxDB query - https://grafana.com/docs/grafana/latest/datasources/influxdb/#query-editor - Grafana already has macro $__interval which will select "optimal" time aggregation based on current dashboard time range.
It doesn't make sense to load huge datasets with original granularity. You may solve it on the Grafana level somehow, but then you may have a problem in the browser - it may not have so much memory or it will take ages.
Is it possible for a Prometheus exporter to save historical data and not only devliver the value while scraping?
My goal is that my exporter is reading a value (let's say a sensor) every 1ms and saving it. Every 15 seconds now Prometheus pulls the data and gets the list of values since last scraping.
Is this possible/intenden to be done with an exporter?
Because if i get it correctly the exporter is not intended to save values, only to read a value when Prometheus scrapes it.
Scheduling of scraping
If it is not possible to solve this with an exporter i only see the solution to add a timeseries database between the node and the exporter. And the exporter then only pulls the data from the tsdb.
|Node| --[produces value each ms] --> |InfluxDB| --> |Exporter| --> |Prometheus|
Do i miss something here?
There are the following options:
To push data directly to Prometheus-compatible remote storage such as VictoriaMetrics, so the data could be queried later with PromQL from Grafana.
To scrape data from the exporter with vmagent with short scrape interval, so it could push the scraped data to remote storage when it is available.
To collect the data at exporter side in Histograms, so they are scraped later by Prometheus, vmagent or VictoriaMetrics. This approach may lead to the lowest amounts of storage space requred for metrics and the highest query speed.
I'm new to Prometheus but familiar with Influx (currently running 1.6).
My understanding is it's possible to configure Prometheus to remotely read data from influx with the following configuration in prometheus.yml:
remote_read:
url: "http://localhost:8086/api/v1/prom/read?db=bulkstats"
"bulkstats" is the database I'm trying to read data from in Prometheus. An example query that would work in influx would be:
SELECT "sess-curaaaactive" FROM "PDSNSYSTEM1" WHERE ("Nodename" = 'ALPRGAGQPNC') AND time >= now() - 6h"
However I cannot find one example of how to query that data from PromQL. Please help!
Here is the link which matches prometheus format with influxdb's one.
In terms of prometheus's jargon, in your example, sess-curaaaactive is the metric name (measurement in influx) and ("Nodename" = 'ALPRGAGQPNC') is just a label which prometheus attaches to the measurement to create a time series.
I am using grafana to display metrics based on prometheus data source. When using single stat panel with delta configuration I am getting wrong values. The values on prometheus are stored correctly, it looks something wrong in grafana when query with date filter, it show a lot of non sense results. Has something similar happened to someone?
query used in grafana to get data:SELECT value FROM "cpu_load_short" and
response from influxdb is {"results":[{"series":[{"name":"cpu_load_short","columns":["time","value"],"values":[["2016-06-17T06
:23:39.3855934Z",0.64],["2016-06-17T07:10:54.1543272Z",0.64],["2016-06-17T08:21:43.8362874Z",0.64],["2016-06-17T08
:30:54.2708891Z",0.64],["2016-06-17T08:38:06.8087172Z",0.64],["2016-06-17T08:38:40.659661Z",0.64],["2016-06-17T08
:38:46.0169674Z",0.64],["2016-06-17T08:38:57.2826142Z",0.64],["2016-06-20T08:44:40.7810414Z",0.64]]}
but grafana graph is not showing
]}]}