Contents
Overview
The goal of this article is to explain how to monitor Zevenet system health and performance with Nagios monitoring system. Nagios is a polular enterprise open source network & application monitoring software created by Ethan Gaalstad.
In this document we’ll use Nagios to monitor system health and performance of a Zevenet ADC Load Balancer appliance.
Explaining Nagios Server installation & setup is out of the scope of this document. You can refer to Nagios official documentation https://www.nagios.org/documentation/ or Quick Start Guides https://assets.nagios.com/downloads/nagioscore/docs/nagioscore/4/en/quickstart.html in case you need help installing & configuring a Nagios Server.
Conventions
We’ll use the following conventions in this document:
Name | Value |
Nagios Server IP address | 192.168.0.155 |
Nagios Server Web Interface URL | http://192.168.0.155 |
Zevenet ADC Load Balancer appliance IP address | 192.168.100.10 |
Zevenet Nagios Plugins
Zevenet Nagios Plugins is a collection of Nagios plugins written in Perl to monitor Zevenet ADC Load Balancer Enterprise Edition system health and performance metrics.
Plugin | Check | Provided performance data |
---|---|---|
check_zevenet_cpu.pl | CPU usage | Idle, iowait, irq, nice, softirq, system, usage, user and total CPU usage |
check_zevenet_farm.pl | Farm status | Established and pending connections |
check_zevenet_interface.pl | Interface status | Traffic in and out |
check_zevenet_memory.pl | Memory usage | Free, buffers, cached, used and total |
check_zevenet_swap.pl | Swap usage | Free, cached, used and total |
check_zevenet_total_connections.pl | Total connections | Total connections |
Zevenet Nagios Plugins are developed to be installed in your Nagios (Or Nagios plugin’s compatible) monitoring server. So please access via SSH to
your monitoring host as root to install the required software.
Install dependencies
Install required perl modules:
Debian Jessie:
apt-get update && apt-get install libwww-curl-perl libjson-perl libnagios-plugin-perl
If Perl modules doesn’t exist in your distribution package manager, you can install manually:
perl -MCPAN -e 'install WWW::Curl' perl -MCPAN -e 'install JSON' perl -MCPAN -e 'install Nagios::Plugin'
Grab latest version
Download from here.
wget https://github.com/zevenet/zevenet-nagios-plugins/archive/master.zip unzip zevenet-nagios-plugins-master.zip
Copy check scripts
cd zevenet-nagios-plugins cp libexec/* /usr/local/nagios/libexec/
Create a Zevenet API v3 key
Login into Zevenet web interface and go to System > Users > Edit zapi user > Generate random key, we’ll use this key as a authentication method to retrieve the metrics from Zevenet ADC Load Balancer appliance. Finally make sure zapi user is active.
Test plugin manually
cd /usr/local/nagios/libexec/ perl check_zevenet_cpu.pl -H <zevenet_appliance_ip_address> -z <zevenet_appliance_api_v3_key> -w 20 -c 10
Example output:
ZEVENET_CPU CRITICAL - Zevenet ADC Load Balancer CPU usage is 40 % (Idle 60 %) | Idle=60%;20;10 IOWait=0%;; IR=0%;; Nice=0%;; SoftIRQ=0%;; Sys=8%;; Usage=40%;; User=32%;; Total=100%;;
Add command definitions to Nagios
See Nagios command definitions example file in /etc/zevenet_commands.cfg .
You can add the command definitions to your Nagios configuration:
cd etc cat zevenet_commands.cfg >>/usr/local/nagios/etc/objects/commands.cfg
Add service definitions to Nagios
See Nagios service definitions example file in /etc/zevenet_services.cfg .
Make sure you replace the string <zapi_v3_key> with the Zevenet API v3 key string that you generate in previous steps.
You can also tune the tresholds to suit your needs. See more information in ‘Threshold and ranges’ section at https://nagios-plugins.org/doc/guidelines.html.
Restart Nagios and have fun!
Restart Nagios process and access Nagios web interface to see the services you have just created.
/etc/init.d/nagios restart