Hello,
I created mysql database with data about CPU, RAM, disk usage , etc… I created graph but I noticed that when there is no new data, the last value is displayed. That means that if I used 50% of CPU and than turn server down, it will still displaying 50% of usage.
This is my querry in grafana:
SELECT
UNIX_TIMESTAMP(date) as time_sec,
cpu as value,
'server' as metric
FROM server
This is how my querry in my monitoring.sh looks like:
INSERT INTO database values ('$datetime', $cpu_percentage, $mem, $swap, $load1, $load5, $load15, $disk)
With value example
INSERT INTO database values ('2018-03-25 14:05:41', 9.69, 56.65, 0.00, 1.52, 1.72, 1.82, 20)
I would like to have a gap when no new value appears, because e.g. the server is down.
I am using Grafana v5.0.3.