MySQL Query result threshold less than?

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
800Response
Posts: 5
Joined: Mon May 09, 2011 8:37 am

MySQL Query result threshold less than?

Post by 800Response »

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
agriffin
Posts: 876
Joined: Mon May 09, 2011 9:36 am

Re: MySQL Query result threshold less than?

Post by agriffin »

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.
Locked