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
negate plugin doesn't seems to be working
-
sureshkraj2012
- Posts: 65
- Joined: Tue Aug 06, 2013 11:06 pm
-
sreinhardt
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: negate plugin doesn't seems to be working
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 10Nagios-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
I get the same output when executing mssql plugin alone
Re: negate plugin doesn't seems to be working
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
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
----------------------
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
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
Yes. It return correct negate status in GUI.
This thread can be closed.
Thank you!
This thread can be closed.
Thank you!