I’m currently using Prometheus with Grafana to capture server metrics and display on a nice Grafana Dashboard. However some dashboards you can import are built round Influxdb and Telegraf.
So I’ve installed Influx DB and then installed the Telegraf agent on a couple of VMs and the data is not being pulled into Grafana, all I see is the server name.
How can I check if the InfluxDB is receiving the data from the 2 servers?
Telegraf log file:
2019-09-18T09:41:00Z D! [outputs.influxdb] Wrote batch of 17 metrics in 27.28973ms
2019-09-18T09:41:00Z D! [outputs.influxdb] Buffer fullness: 6 / 10000 metrics
2019-09-18T09:41:04Z D! [agent] Stopping service inputs
2019-09-18T09:41:04Z D! [agent] Input channel closed
2019-09-18T09:41:04Z I! [agent] Hang on, flushing any cached metrics before shutdown
2019-09-18T09:41:04Z D! [outputs.influxdb] Wrote batch of 6 metrics in 1.72249ms
2019-09-18T09:41:04Z D! [outputs.influxdb] Buffer fullness: 0 / 10000 metrics
2019-09-18T09:41:04Z D! [agent] Closing outputs
2019-09-18T09:41:04Z D! [agent] Stopped Successfully
Looks like at least some data is being written successfully.
You can explore the data in Grafana just by creating a new panel and editing the query, at a bare minimum you need to click on measurement and field(value) and select one of the choices.
Another option is to use the influx command to take a look from a terminal:
$ influx
Connected to http://localhost:8086 version 1.7.8
InfluxDB shell version: 1.7.8
> use telegraf
Using database telegraf
> show measurements
name: measurements
name
----
cpu
> select * from cpu where time > now() - 1m;
Pick cpu and then on the SELECT line click on value in the field(value) box, there should be another dropdown with the available field names. After you pick one I believe at that point you should see some data.
Hello guys,
I have similar insallation but when I use “show measurements” function in the terminal I have no response.
Here is the result, does it mean no data is registered in the database ?
Doesn’t look like anything is being collected, if you run Telegraf with --debug it will log how many metrics are sent. I also recommend enabling the internal input plugin, which will send metrics about Telegraf activity to InfluxDB.