Search Exchange

Search All Sites

Nagios Live Webinars

Let our experts show you how Nagios can help your organization.

Contact Us

Phone: 1-888-NAGIOS-1
Email: sales@nagios.com

Login

Remember Me

Directory Tree

check_netscaler

Current Version
1.5.1
Last Release Date
2018-06-10
Compatible With
  • Nagios 1.x
  • Nagios 2.x
  • Nagios 3.x
  • Nagios 4.x
  • Nagios XI
Owner
License
Apache
Hits
15900
Network Monitoring Software - Download Nagios XI
Log Management Software - Nagios Log Server - Download
Netflow Analysis Software - Nagios Network Analyzer - Download
A Nagios Plugin written for the Citrix NetScaler Application Delivery Controller. It's based on Perl (Monitoring::Plugin) and using the the NITRO REST API. No need for SNMP.
Currently the plugin has the following subcommands:

state - check the current service state of vservers (e.g. lb, vpn, gslb), services and service groups and servers
matches, matches_not - check if a string matches the the api response or not
above, below - check if a value is above/below a threshold (e.g. traffic limits, concurrent connections)
sslcert - check the lifetime for installed ssl certificates
nsconfig - check for configuration changes which are not saved to disk
license - check the expiry date of a local installed license file
hastatus check the high availability status of a appliance
staserver - check if configured STA (secure ticket authority) servers are available
servicegroup - check the state of a servicegroup and its members
hwinfo - just print information about the Netscaler itself
interfaces - check state of all interfaces and add performance data for each interface
perfdata - gather performancedata from all sorts of API endpoints
ntp - check the ntp synchronization status
debug - debug command, print all data for a endpoint

This plugin works with VPX, MPX, SDX and CPX NetScaler Appliances. The api responses may differ by build, appliance type and your installed license.

The plugin supports performance data for the commands state and the above or below threshold checks. Also there is a perfdata command to gather information from your NetScaler.

Example configurations for Nagios and Icinga 2 can be found in the examples directory of this repository.

Feedback and feature requests are appreciated. Just create an issue on GitHub or send me a pull request.
Reviews (2)
bydennisk, March 26, 2019
Hi Slauger, thank you for this script. It works very well and most important, it works fast :)
We have a problem with applying the regex filter. Can you help us with an example perhaps?

[root@server /usr/local/nagios/libexec]$ ./check_netscaler.pl -H 1.2.3.4 -u username -p password -s -C state -o lbvserver
NetScaler CRITICAL - state lbvserver: _httpredir_ DOWN; | UNKOWN=0;;;0; UP=28;;;0; 'OUT OF SERVICE'=0;;;0; DOWN=1;;;0;

This is a hidden vServer which is apparently down by default and created by the NetScaler when the option "Redirect From Port" is used. The vServer in our case is listening on port 80 to redirect to 443. Since this is by design, we would like to add a filter to the check comment to ignore vServers which have _httpredir_ in the name.

I tried to add various things like this, but that didn't work unfortunately:
-f '/(?:[^\*_httpredir_\*]*)/'

Hope you can help us with a regex example.
Dennis
Owner's reply

Hi,

sorry for my late response. I didn't get a email notification for your comment. In the future please prefer an issue on GitHub.

Anyways, the filter accepts any valid perl re syntax. For example, '_httpredir_.*', '_httpredir_' or '^_.*' should do the job.

Hello!,

Great plugin, but I'm finding the following error when wanting to check the local license

./check_netscaler.pl -H x.x.x.x -s -C license -n FID__XXXX.lic -u user -p password -w 30 -c 10
NetScaler UNKNOWN - { "errorcode": 2138, "message": "Not authorized to execute this command [show system file FID__XXXX.lic -fileLocation \"\/nsconfig\/license\"]", "severity": "ERROR" }

And when using user nsmonitor:

NetScaler OK - license: CNS_SSE_SERVER never expires; CNS_V5_SERVER never expires;¿?¿?¿
Owner's reply

Make sure that your monitoring user has the permissions to execute the NITRO command "systemfile". This mostly means to give the user full administrative permissions to your NetScaler.

This is necessary because (currently) there is no native API endpoint to get informations about your installed license file.