I am using influxdb and telegraf for collecting SNMP information from temperature/humanity sensors (Didactum Monitoring). I want to visualize it as Time Series graph but I get the error: Data is missing a number field.
If I visualize it as table it shows me date + value, so I dont understand why grafana cant visualize it as graph.
I worked before with Grafana and mysql as data source, I never had any kind of this problems.
Debug it with the query inspector. I bet your
last value is a string and not an number.
"28" (string) is not the same as
28 (int). The best option is to check field type on the InfluxDB level.
Would be great if @chrisleed updated this thread with his resolution. I’d certainly like to know. Or maybe your string/int comment clarified things.
this is solved by @jangaraj answer,
you need to have time and number as column type to be able to use timeseries panel
For SQL data sources, the value column must be of the
NUMERIC type (
FLOAT doesn’t work). You can cast a column with SQL syntax, e.g.
CAST(value_column AS numeric) should work for all SQL databases. In Postgres you can use
value_column::numeric. Also make sure that your metric column is TEXT (not e.g. an ENUM value), which can also be done by casting.
You can type expressions directly into the column boxes in the GUI, as I did (see example below), overriding the drop-down lists. Or you can create a SQL VIEW that filters and casts the underlying data, and base your query on that view instead of the table, which should make the GUI offer the correct choices in the drop-down lists.