I am setting up a MySQL query monitor and everything works fine but I cant figure out how to tell Nagios XI to alarm if the result of the query is less than a given number.
Here is the command that is running:
check_xi_mysql_health!--hostname=xxxxxx --port=3306 --username=xxxxx --password="xxxxxx" --database=xxxx --mode sql --name=select%20count%28%2A%29%20as%20count%20from%20xxx.xxxxxxxx%20where%20xxxxx%20%3E%20now%28%29%20-%20interval%2010%20minute --name2="CRM_Stalled" --critical=10
I want an alert if the result is less than 10. I have tried <=10 and =<10 but the < character is being interpreted by the shell as a redirection and causing the command to return null. Anyone know the "proper" way to check for less than in a result?
Thanks
MySQL Query result threshold less than?
Re: MySQL Query result threshold less than?
Unfortunately the mysql health plugin does not support checking for results that are less than some number. The help output does say you can specify a range, but you can actually only specify one number, and it's a warning or critical if the result is greater than this number. Sorry.