A Nagios Plugin that emulates a full login process into Citrix Gateway (formerly Citrix NetScaler Gateway) and Storefront.

check_netscaler_gateway Nagios Plugin

This is a Nagios monitoring plugin for the Citrix NetScaler Gateway. The plugin emulates a full login proccess on a NetScaler Gateway vServer and checks if there are any resources available.

-bash# ./ -H -u monitoring -p password -S Lab -v
** POST ==> 302 Object Moved
** POST ==> 200 OK
** POST ==> 200 OK
** POST ==> 200 OK
** POST ==> 200 OK
** POST ==> 200 OK
** GET ==> 200 OK
NetScaler Gateway OK - Admin Desktop; CAD Desktop; Calculator; HDX Desktop; HDX TS Desktop; Server 2016 Desktop; Windows 8 Desktop; XA 2012 Desktop;


Run the following commands to install all Perl dependencies (Monitoring::Plugin, LWP, JSON, HTTP::Cookies, Data::Dumper).

Enterprise Linux (CentOS, RedHat)

yum install perl-libwww-perl perl-JSON perl-LWP-Protocol-https perl-Monitoring-Plugin perl-HTTP-Cookies perl-Data-Dumper

Debian and Ubuntu Linux

apt-get install libwww-perl liblwp-protocol-https-perl libjson-perl libmonitoring-plugin-perl

Mac OS X

The preinstalled Perl distribution is missing the JSON and Monitoring::Plugin libaries. The best way is to install them is trough the cpanminus tool. The cpanminus tool can be installed trough brew.

brew install cpanminus

Use the following commands to install the missing perl libaries.

sudo cpanm JSON
sudo cpanm Monitoring::Plugin


Usage: check_netscaler_gateway -H  [ -u  ] [ -p  ] -S 
[-w ] [-c ] [ -v|--verbose ] [ -d|--debug ] [ -t  ]

 -?, --usage
   Print usage information
 -h, --help
   Print detailed help screen
 -V, --version
   Print version information
   Read options from an ini file. See
   for usage and examples.
 -H, --hostname=STRING
   Hostname of the NetScaler appliance to connect to
 -u, --username=STRING
   Username to log into box as
 -p, --password=STRING
   Password for login username
 -S, --store=STRING
   Name of the Store in Storefront (default: Store)
 -w, --warning=INTEGER
   Warning threshold for the numbers of found applications
 -c, --critical=INTEGER
   Critical threshold for the numbers of found applications
 -d, --debug
   Debug mode, print out every single HTTP request
 -t, --timeout=INTEGER
   Seconds before plugin times out (default: 15)
 -v, --verbose
   Show details for command-line debugging (can repeat up to 3 times)

Configuration File

The plugin uses the Monitoring::Plugin Libary, so you can use --extra-opts and seperate the login crendetials from your nagios configuration.

define command {
  command_name check_netscaler_gateway
  command_line $USER5$/3rdparty/check_netscaler_gateway/ -H $HOSTADDRESS$ --extra-opts=netscaler@$USER11$/plugins.ini -S $ARG1$