i have seen the solution on adding series queries in mysql here:https://community.grafana.com/t/how-to-add-time-series-queries-with-grafana-and-mysql/3170/13
but what confused me is how to add time series with day, my sql table like this:
mysql> DESC ams_fail_test;
±------------±--------±-----±----±--------±---------------+
| Field | Type | Null | Key | Default | Extra |
±------------±--------±-----±----±--------±---------------+
| id | int(11) | NO | PRI | NULL | auto_increment |
| date_insert | date | NO | | NULL | |
| fail | int(11) | NO | | NULL | |
±------------±--------±-----±----±--------±---------------+
but when my select statement like this:
SELECT
UNIX_TIMESTAMP(date_insert) as time_sec,
fail as value,
‘fail’ as metric
FROM ams_fail_test
WHERE $__timeFilter(date_insert)
ORDER BY date_insert ASC
which shows like this:
one day is divided to several pieces, but what i expected is one day is one piece. i konw we can click the zoom button on the right top, but can it be fixed manully?can anyone help me? thanks~