check_netscaler
Nagios/Icinga monitoring plugin for Citrix NetScaler (ADC) using the NITRO REST API.
Version 2.0 - Python Rewrite
This is a complete Python rewrite of check_netscaler. All 16 check commands are implemented with comprehensive test coverage and full CI/CD integration.
Looking for the stable Perl version (v1.x)? See tags < 2.0.0 for the legacy Perl implementation.
Breaking Changes from v1.x
- HTTPS is now default - Use
--no-sslfor HTTP instead of-sfor HTTPS - Environment variable support added:
NETSCALER_HOST,NETSCALER_USER,NETSCALER_PASS
Features
Monitor your NetScaler without SNMP:
- Virtual Servers - Load balancer, VPN, GSLB, Content Switching, AAA
- Services & Service Groups - State and member quorum monitoring
- SSL Certificates - Expiration warnings
- High Availability - HA status and sync monitoring
- System Resources - CPU, memory, disk usage thresholds
- Network Interfaces - Interface status and statistics
- License Management - License expiration tracking
- NTP Synchronization - Time sync validation
- Configuration - Unsaved config detection
- Performance Data - Generic metric collection for any NITRO object
Advanced Features
- Regex-based filtering (
--filter/--limit) - Custom performance data labels
- Flexible threshold formats
- Multiple Python versions supported (3.12-3.14)
Requirements
Python >= 3.12
requests >= 2.31.0
Installation
From PyPI (Recommended)
pip install check_netscaler
From Source
git clone https://github.com/slauger/check_netscaler.git
cd check_netscaler
# Install
pip install .
# For development
pip install -e ".[dev]"
Pre-built Binaries (Standalone)
For systems without Python or pip, download standalone executables from the Releases page:
- Linux:
check_netscaler-linux - macOS:
check_netscaler-macos - Windows:
check_netscaler-windows.exe
These binaries are built with PyInstaller and include all dependencies. No Python installation required.
# Linux/macOS example
chmod +x check_netscaler-linux
./check_netscaler-linux --help
# Windows example
check_netscaler-windows.exe --help
Quick Start
# Check all load balancer vServers
check_netscaler -H 192.168.1.10 -u nsroot -p nsroot -C state -o lbvserver
# Check SSL certificate expiration
check_netscaler -H 192.168.1.10 -C sslcert -w 60 -c 30
# Check CPU usage
check_netscaler -H 192.168.1.10 -C above -o system -n cpuusagepcnt -w 75 -c 90
# Check HA status
check_netscaler -H 192.168.1.10 -C hastatus
# Check NTP sync
check_netscaler -H 192.168.1.10 -C ntp -w "o=0.03" -c "o=0.05"
Using Environment Variables (Recommended)
For improved security and convenience, use environment variables instead of command-line arguments:
# Export credentials once
export NETSCALER_HOST=192.168.1.10
export NETSCALER_USER=monitoring
export NETSCALER_PASS=SecurePassword123
# Now run checks without passing credentials
check_netscaler -C state -o lbvserver
check_netscaler -C sslcert -w 60 -c 30
check_netscaler -C hastatus
Why use environment variables?
- Security: Credentials are not visible in process listings (
ps,top,/proc) - Convenience: Set once, use in multiple commands
- Best Practice: Follows patterns from other monitoring plugins (PostgreSQL, MySQL)
- Integration: Works seamlessly with Icinga 2
envattribute, Nagios/systemd environments
Command-line arguments always override environment variables if both are provided.
Available Commands
| Command | Description |
|---|---|
state |
vServer/service/servicegroup/server state monitoring |
above/below |
Threshold-based checks (CPU, memory, disk, etc.) |
sslcert |
SSL certificate expiration |
hastatus |
High availability status |
interfaces |
Network interface monitoring |
servicegroup |
Service group member quorum |
perfdata |
Generic performance data collection |
license |
License expiration |
ntp |
NTP synchronization status |
nsconfig |
Unsaved configuration detection |
matches/matches_not |
String matching in API responses |
staserver |
STA server availability |
hwinfo |
Hardware information |
debug |
Raw API output for troubleshooting |
Documentation
- CLI Reference - Complete command-line options reference
- Command Examples - Detailed usage for every command
- Icinga 2 Integration - CheckCommand definitions
- Nagios Integration - Command and service configurations
Development
Running Tests
# Run all tests
pytest tests/
# With coverage
pytest tests/ --cov=check_netscaler --cov-report=html
# Linting
ruff check check_netscaler/ tests/
# Formatting
black check_netscaler/ tests/
CI/CD
GitHub Actions pipeline runs automatically on every push:
- Matrix testing on Python 3.12, 3.13, 3.14
- Linting with ruff
- Code formatting with black
- Type checking with mypy
- Comprehensive test suite with pytest
License
MIT License - See LICENSE
Contributors
- slauger - Original author
- macampo
- Velociraptor85
- bb-ricardo
- DerInti
Links
Metadata
Release files for check-netscaler 3.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| check_netscaler-3.0.0.tar.gz | 58.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| check_netscaler-3.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 100.4 kB
Release files / check_netscaler-3.0.0.tar.gz
| Download URL | check_netscaler-3.0.0.tar.gz |
|---|---|
| Size | 58.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
74eaa0ea75a3c63457a9bb0ccbd3d98b45dfde93841be73828334b5b2e2fd327
|
|
BLAKE2b-256 checksum How to use checksums |
b5fda960c0e05428be38a31627956db7bc1239df87c8e1c0d8599d815ac351cc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 6, 2026.
Transparency logRelease files / check_netscaler-3.0.0-py3-none-any.whl
| Download URL | check_netscaler-3.0.0-py3-none-any.whl |
|---|---|
| Size | 42.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8d89d7c0e76b7b9d07d2e1e8a02e77dd015ff9a8ff58a8f508f960fc9cbe32fe
|
|
BLAKE2b-256 checksum How to use checksums |
2d5ae6ab111ca19b9b3017f5c398748496d35be22257ba95693668fa7cc77cf9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 6, 2026.
Transparency log