check-netscaler-activeservices

check-netscaler-activeservices

A Nagios plugin to check the number of active backend services of a netscaler frontend instance.

This program makes use of the Nitro API for Citrix Netscaler (tested with v1). The URLs supplied to -u are the specific for your configuration. At the moment, a lbvserver (Load Balancing Virtual Server) configuration is assumed.

Usage

See the help page:

$ check-netscaler-activeservices -h
check-netscaler-activeservices 0.1.0.
Nagios check for the number of active services.
Bugs to Claudio Ramirez .
        _       _       _       _       _       _       _       _
     _-(_)-  _-(_)-  _-(_)-  _-(")-  _-(_)-  _-(_)-  _-(_)-  _-(_)-
   *(___)  *(___)  *(___)  *%%%%%  *(___)  *(___)  *(___)  *(___)
    // \\   // \\   // \\   // \\   // \\   // \\   // \\   // \\

Usage:
  check-netscaler-activeservices
      -u  -f 
      [-i -t ]
      [-w  -c  -p]
  check-netscaler-activeservices -s
  check-netscaler-activeservices -h
  check-netscaler-activeservices --version

Options:
  -u         Netscaler Nitro Endpoint for service
  -f        Configuration file
  -w   Threshold for warning state
                  [default:0] (absolute value)
  -c   Threshold for critical state
                  [default:0] (absolute value)
  -t     Seconds after which the connection will timeout
                  [default:10]
  -p              The threshold are not absolute and represent percentages
                  [default:false]
  -i              Don't check the SSL certificate
                  [default:false]
  -s              Print a sample YAML configuration file to STDOUT
  -h, --help      Show this screen
  --version       Show version

Netscaler check with absolute count of services:

$ check-netscaler-activeservices -f config.yml \
-u https://netscaler/nitro/v1/config/lbvserver/WEB_T_LBVSRV_WEB_somehost_HTTPS \
-c 1 -w 2
[CRITICAL] Threshold (1), Active (1), Total (4)

Netscaler check with relative count of services (percentage of total):

$ check-netscaler-activeservices -f config.yml \
-u https://netscaler/nitro/v1/config/lbvserver/WEB_T_LBVSRV_WEB_somehost_HTTPS \
-c 25 -w 50 -p
[CRITICAL] Threshold (1), Active (1), Total (4)

Configuration

A configuration file is used to store the user and password. You can create a configuration file with the -s switch:

$ check-netscaler-activeservices -s
---
### check-netscaler-activeservices configuration ###
user: "some_user"
pass: "some_password"