Reputation: 37
Right, so I've got a script polling folder size and putting it into influxdb
Measurement = "job_size"
Tag Key = "path"
Value = the size in KB
I can't seem to get this going in grafana for some reason. Could possibly be the query I'm using? Right now I'm just using SELECT * FROM job_size but it's only returning a single entry from "job_size"
Any ideas what I'm doing wrong here ? Should I be writing it into the DB differently?
Upvotes: 0
Views: 88
Reputation: 4088
I tried to reproduce your problem with the following steps. I hope this helps you to detect where you are doing something wrong.
Insert your data into influxdb
I did a quick test by creating a new db and inserted some points via line protocol:
influx
CREATE DATABASE stackoverflow_test
USE stackoverflow_test
INSERT job_size,path=test value=100000
INSERT job_size,path=test value=200000
INSERT job_size,path=test value=300000
Check if the data got inserted via the admin UI:
The grafana query:
You can see in my screenshot that my query works like expected. But If I change the query to use the '*' operator like you did in your screenshots I get no results. So avoid doing something like:
SELECT "value"
FROM "job_size"
WHERE "path" = '*'
And go with:
SELECT "value"
FROM "job_size"
WHERE "path" = 'test'
AND "path" = 'othertest'
AND ...
or if you want to select all path keys just go with:
SELECT "value" FROM "job_size"
Upvotes: 1