negate plugin doesn't seems to be working

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
sureshkraj2012
Posts: 65
Joined: Tue Aug 06, 2013 11:06 pm

negate plugin doesn't seems to be working

Post 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
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: negate plugin doesn't seems to be working

Post 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
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
sureshkraj2012
Posts: 65
Joined: Tue Aug 06, 2013 11:06 pm

Re: negate plugin doesn't seems to be working

Post by sureshkraj2012 »

I get the same output when executing mssql plugin alone
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: negate plugin doesn't seems to be working

Post 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 $?
Be sure to check out our Knowledgebase for helpful articles and solutions!
sureshkraj2012
Posts: 65
Joined: Tue Aug 06, 2013 11:06 pm

Re: negate plugin doesn't seems to be working

Post 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
sureshkraj2012
Posts: 65
Joined: Tue Aug 06, 2013 11:06 pm

Re: negate plugin doesn't seems to be working

Post by sureshkraj2012 »

I guess it return status correctly. May be we need to configure in GUI (instead command line)?
sureshkraj2012
Posts: 65
Joined: Tue Aug 06, 2013 11:06 pm

Re: negate plugin doesn't seems to be working

Post by sureshkraj2012 »

Yes. It return correct negate status in GUI.
This thread can be closed.

Thank you!
Locked