Hi,
I’m new to grafana and playing around to see if it could fit my needs for a research lab.
I’m using grafana-server Version 4.5.2 (commit: ec2b0fe)
I have succefully added a MySQL data source.
Here is my database :
mysql> DESC meteo;
+-------------+----------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-------------+----------+------+-----+---------+----------------+
| id | int(100) | NO | PRI | NULL | auto_increment |
| date_insert | datetime | NO | | NULL | |
| temperature | float | NO | | NULL | |
+-------------+----------+------+-----+---------+----------------+
Following the documentation I’ve added a panel “Table” with the following query…
SELECT
date_insert as 'Date',
temperature as 'Temperature'
FROM meteo
…and choosen “Format as Table”
The result is ok as you can see.
Now I would like to have a graph like this :
Grafana Panel Format Time series
How can I achieve this with my database ? I don’t understand the doc which says :
If you set Format as to Time series, for use in Graph panel for example,
then there are some requirements for what your query returns.
Must be a column named time_sec representing a unix epoch in seconds.
Must be a column named value representing the time series value.
Must be a column named metric representing the time series name.
How can I apply this with my database ? Is it just possible ?
Original post : See Stackoverflow