Search Exchange
Search All Sites
Nagios Live Webinars
Let our experts show you how Nagios can help your organization.Login
Directory Tree
Directory
ffuchs
byffuchs, May 9, 2016
The plugin works great. However, I found one bug. The check, if a machine is in maintenance mode, does not work. It will always return the value you use for querying. E.g. if you add the paramter "mainwarn", it will always return WARNING regardless of the state of the machine.
The fix is quite easy. Just add "&& $runtime->inMaintenanceMode eq "1")" in the if-statements:
2280 if ($addopts eq "maintwarn" && $runtime->inMaintenanceMode eq "1") {
2281 $res = WARNING;
2282 }
2283 elsif ($addopts eq "maintcrit" && $runtime->inMaintenanceMode eq "1") {
2284 $res = CRITICAL;
2285 }
The fix is quite easy. Just add "&& $runtime->inMaintenanceMode eq "1")" in the if-statements:
2280 if ($addopts eq "maintwarn" && $runtime->inMaintenanceMode eq "1") {
2281 $res = WARNING;
2282 }
2283 elsif ($addopts eq "maintcrit" && $runtime->inMaintenanceMode eq "1") {
2284 $res = CRITICAL;
2285 }