I’m trying to figure out how to monitor uptime of InfluxDB in Chronograf and send notification if the uptime is less than 1 hour for example.
All I know is this query SHOW DIAGNOSTICS FOR 'system' to retrieve uptime but I have no idea how to extract only the uptime field so I can act accordingly
> SHOW DIAGNOSTICS FOR 'system'
PID currentTime started uptime
--- ----------- ------- ------
739 2021-03-24T19:41:23.27048302Z 2021-03-23T12:37:52.545695575Z 31h3m30.724787445s
To be clear, you are trying to monitor the health of InfluxDB OSS v2?
Have you looked at the pre-built template that would help you?
There are instructions on how to configure this. This is a starting point, but I think once you have this setup, you should be able to understand how to create a check and notification rule to do what you want.