MySQL Query result threshold less than?
Posted: Tue Jul 12, 2011 9:46 am
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
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