Alerts on InfluxDB

Trying to get an answer for this:

summary: Replication is {{ $value.B }} seconds behind {{ $ }}

Value doesn’t show the value for B even though it shows at the top. Labels does not show the column host. Can someone PLEASE help with this? This is deciding whether we go with Grafana or stick with Nagios that works!


SELECT host, slave_Seconds_Behind_Master FROM “mysql” where slave_Seconds_Behind_Master > 600

I have tried with and without host. I need to get this working and I never get a response for this

Anyone have any suggestions?

Any suggestions yet?

Hi! Can we see a screenshot of the alert rule definition with the “Preview” button is clicked?

Here’s one of them. This is without host in the query:

I could be wrong, but I think @georgerobinson was asking for this screen:

1 Like

How do I pull that info up?

The Preview button can be found on the page where you add / edit alert rules:

This is what I have:

Can you click the Preview button and send the screenshot again? Also, your query D, Reduce expression E and Threshold expression F don’t do anything so you can delete them, unless you want to keep them for your tests.

Running two queries to check for SQL and IO threads:

OK! I’m not sure if you know but your check for slave_Slave_IO_Running doesn’t work as D is not used in the alert condition. E and F don’t do anything either.

To answer the question about $labels it looks neither of the queries in A or D return labels - just the last row of the slave_Slave_SQL_Running and slave_Slave_IO_Running columns.

If you change your query back to SELECT host, slave_Seconds_Behind_Master FROM “mysql” where slave_Seconds_Behind_Master > 600 and then click Preview what do you see?

Sorry for the long delay. Here is what I did in Grafana:

This is what I ran in Influx:

I expect to see the same in Grafana but I don’t

When I do my original query I posted, SELECT host, slave_Seconds_Behind_Master FROM mysql where slave_Seconds_Behind_Master > 600, it shows the host in Explore but doesn’t show the same in alerting.