#Note:
The previous implementation of the nagios plugin has been moved to the
legacy
branch.
#Introduction
aerospike_nagios.py simplifies nagios configurations for Aerospike clusters. The goal is to reduce the complexity to 2 simple steps.
- Copy aerospike_nagios.py to your Nagios server
- Add aerospike configs into Nagios
#Features
- Can monitor any stat returned by
$ asinfo -v 'statistics' [-h <HOST>]
$ asinfo -v 'namespace/<NAMESPACE NAME>' [-h host]
$ asinfo -v 'dc/<DATACENTER>' [-h host]
###Known Issues
- Host based monitoring instead of cluster based monitoring
- Aerospike python client. See this page
-
Copy aerospike_nagios.py to your prefered scripts dir
Eg: /opt/aerospike/bin/
-
Copy aerospike_schema.yaml to the same directory
-
Copy examples/aerospike.cfg into your nagios conf.d directory
/etc/nagios/conf.d if installed from repo /usr/local/nagios/etc/objects if installed from source
-
Edit aerospike.cfg to add your aerospike hosts into the hostgroup
-
Restart/reload nagios
See aerospike_nagios.py, this is the file that nagios will schedule to perform queries against Aerospike. Other than copying it to the appropriate location, you are not required to interact with it.
Usage:
-h host (default 127.0.0.1)
-p port (default 3000)
-U user (Enterprise only)
-P password (Enterprise only)
-x xdr datacenter (Enterprise 3.8+)
-s "statistic" (Eg: "free-pct-memory")
-n "namespace" (Eg: "namespace/test")
-c "critical level" (Eg: "60")
-w "warning level" (Eg: "70")
To monitor a specific general statistic:
aerospike_nagios.py -h YOUR_ASD_HOST -s STAT_NAME -w WARN_LEVEL -c CRIT_LEVEL
To monitor a specific statistic in a namepsace:
aerospike_nagios.py -h YOUR_ASD_HOST -s STAT_NAME -n YOUR_NAMESPACE -w WARN_LEVEL -c CRIT_LEVEL
To monitor a specfic statistic in xdr:
aerospike_nagios.py -h YOUR_ASD_HOST -s STAT_NAME -x DATACENTER -w WARN_LEVEL -c CRIT_LEVEL
Warning and Critical thresholds are specified according to Nagios' format
To not use warning and/or critical levels, set them to 0.
Example usage can be found in the examples/aerospike.cfg file.