Page 1 of 1

negate plugin doesn't seems to be working

Posted: Wed Oct 15, 2014 7:27 am
by sureshkraj2012
Hello Team,

I am trying to use negate plugin but I couldn't get expected result.

Am I doing something wrong? Please help me to resolve this issue.


[user1@nagios_server ~]$ sudo /usr/local/nagios/libexec/negate -w OK -c UNKNOWN -o UNKNOWN /usr/local/nagios/libexec/check_mssql_health --server test.domain.local --username 'user2' --password 'password123' --mode latches-waits -warning 5 -critical 10
OK - 0.16 latches / sec have to wait | latch_waits_per_sec=0.16;5;10

Re: negate plugin doesn't seems to be working

Posted: Wed Oct 15, 2014 5:47 pm
by sreinhardt
Could you provide an example of the mysql without negate please, preferably with the exact same flags? Something like:

Code: Select all

/usr/local/nagios/libexec/check_mssql_health --server test.domain.local --username 'user2' --password 'password123' --mode latches-waits -warning 5 -critical 10

Re: negate plugin doesn't seems to be working

Posted: Thu Oct 16, 2014 8:23 pm
by sureshkraj2012
I get the same output when executing mssql plugin alone

Re: negate plugin doesn't seems to be working

Posted: Fri Oct 17, 2014 1:10 pm
by lmiltchev
Try this:

Code: Select all

/usr/local/nagios/libexec/check_mssql_health --server test.domain.local --username 'user2' --password 'password123' --mode latches-waits -warning 5 -critical 10
echo $?

Code: Select all

sudo /usr/local/nagios/libexec/negate -w OK -c UNKNOWN -o UNKNOWN -s /usr/local/nagios/libexec/check_mssql_health --server test.domain.local --username 'user2' --password 'password123' --mode latches-waits -warning 5 -critical 10
echo $?

Re: negate plugin doesn't seems to be working

Posted: Sat Oct 18, 2014 2:43 am
by sureshkraj2012
Here is the result
----------------------

sudo /usr/local/nagios/libexec/check_mssql_health --server test.domain.local --username 'user2' --password 'password123' --mode latches-waits -warning 5 -critical 10
CRITICAL - 11.80 latches / sec have to wait | latch_waits_per_sec=11.80;5;10

echo $?
2


sudo /usr/local/nagios/libexec/negate -w OK -c UNKNOWN -o UNKNOWN /usr/local/nagios/libexec/check_mssql_health --server test.domain.local --username 'user2' --password 'password123' --mode latches-waits -warning 5 -critical 10
CRITICAL - 18.68 latches / sec have to wait | latch_waits_per_sec=18.68;5;10

echo $?
3

Re: negate plugin doesn't seems to be working

Posted: Sat Oct 18, 2014 2:58 am
by sureshkraj2012
I guess it return status correctly. May be we need to configure in GUI (instead command line)?

Re: negate plugin doesn't seems to be working

Posted: Sat Oct 18, 2014 4:17 am
by sureshkraj2012
Yes. It return correct negate status in GUI.
This thread can be closed.

Thank you!