Skip to content

Halytskyi/aerospike-nagios

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#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.

  1. Copy aerospike_nagios.py to your Nagios server
  2. 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

Requirements

  1. Aerospike python client. See this page

Getting Started

  1. Copy aerospike_nagios.py to your prefered scripts dir

    Eg: /opt/aerospike/bin/

  2. Copy aerospike_schema.yaml to the same directory

  3. 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

  4. Edit aerospike.cfg to add your aerospike hosts into the hostgroup

  5. Restart/reload nagios

Aerospike nagios Plugin

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

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

Alert Levels

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.

About

Aerospike Nagios Integration

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%