check-packeteer.pl - a Nagios plugin for network statistics
Read anything you can get out of your
Packeteer network measurement/traffic shaping appliance
May 22nd 2007
v0.2, introducing a new feature and a bugfix is available. See the changelog for details.
January 31st 2007
Screenshots illustrating the true power of this couple are available.
November 27th 2006
v0.1 out now
This is the initial release of check-packeteer.pl, a plugin for the
Nagios network monitoring environment.
Introduction
Nagios is an open source host, service and network monitoring program. Read all about it at http://www.nagios.org
check-packeteer.pl is a plugin for the Nagios network monitoring system. It is designed to read traffic statistics from a Packeteer appliance via HTTP request and return the status to Nagios.
Prerequisites
In order to use check-packeteer.pl you will at least need the following:- Perl v5 (developed in Perl v5.8.0, tested on perl 5.8.8)
- Digest::MD5 Perl module to calculate md5 hash of credentials
- LWP::UserAgent for HTTP communication
Installation
Copy the script to your favourite nagios-plugin location i.e. /usr/lib/nagios/plugins/ and make sure it is read/executable by the nagios daemon (chmod 755).
Life gets a lot easier if you add a section to your /etc/nagios/checkcommands.cfg file:
define command{
command_name check-packeteer
command_line $USER1$/check_packeteer.pl -host 10.11.12.13 -hash 893c830ea67a0ad636c81f8f93d99002 -target $ARG1$ -variable $ARG2$ -period $ARG3$ -warn $ARG4$ -crit $ARG5$
}
Where the value after '-hash' is a md5 hash in hex format, calculated from the
concatenated Packeteer password and serial number.
For details on command line options just call check-packeteer.pl without any arguments.
To add a sensor to your Nagios environment just a a section to your /etc/nagios/services.cfg containing something like:
define service {
use generic-packeteer
service_description TCP connection inits out 10min
check_command check-packeteer!/Outbound!tcp-conn-inits!600!1000!1500
}
Let Nagios reload its configuration ('service nagios reload' on RedHat) and
off you go ...
Copyright notice
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.