slauger / check_netscaler

A Nagios Plugin written in Perl for the Citrix ADC (formerly Citrix NetScaler). It uses the NetScaler NITRO API.
35 stars 18 forks source link

incorrect CRITICAL alert assignment #44

Closed henriknoerr closed 5 years ago

henriknoerr commented 5 years ago

I have a usability request regarding the CRITICAL alert when polling VPX'es for lbvserver and csvserver state which does not have any configured. This is reported as critical.

I think this should be customizable. I have manually edited the script to report OK. if ( !scalar($response) ) { $plugin->nagios_exit( OK, $plugin->opts->command . ': no ' . $plugin->opts->objecttype . ' found in configuration' ); }

This allows me to poll all VPX'es for lb/cs state, without knowing whether the VPX hold lb/csvservers or not, but still ensuring that future VIPs are monitored.

/Henrik

slauger commented 5 years ago

Fixed in develop. The basic state check for all objects (w/o an given objectname) does now return OK when the response is empty. If an objectname is set and the given object is not found, the plugin will still return CRITICAL.