Download Latest Version nagisk-1.2.2.tgz (4.2 kB)
Email in envelope

Get an email when there's a new version of Nagisk

Home / nagisk
Name Modified Size InfoDownloads / Week
Parent folder
nagisk-1.2 2011-03-22
nagisk-1.1 2008-11-27
nagisk-1.0 2008-10-17
README 2011-03-22 3.5 kB
Totals: 4 Items   3.5 kB 0
Nagisk is a simple Perl script to monitor an Asterisk PBX server from Nagios.

Installation and configuration
------------------------------

Follow this link:
http://blog.nicolargo.com/2008/10/superviser-asterisk-dans-nagios-grace-a-nagisk.html

Notes
-----

To use the -p and -s parameters, you need to previously run the NRPE ./configure
script using the --enable-command-args parameter, which represents a security risk. 
You must also set dont_blame_nrpe to 1 within nrpe.cfg.

nrpe.cfg
--------

# Add these lines at the end of your configuration file:
command[check_asterisk_version]=/usr/local/nagios/libexec/nagisk.pl -c version
command[check_asterisk_peers]=/usr/local/nagios/libexec/nagisk.pl -c peers -w $ARG1$ -x $ARG2$
command[check_asterisk_peer]=/usr/local/nagios/libexec/nagisk.pl -c peer -p $ARG1$ -w $ARG2$ -x $ARG3$
command[check_asterisk_channels]=/usr/local/nagios/libexec/nagisk.pl -c channels -w $ARG1$ -x $ARG2$
command[check_asterisk_konference]=/usr/local/nagios/libexec/nagisk.pl -c konference -w $ARG1$ -x $ARG2$
command[check_asterisk_jabber]=/usr/local/nagios/libexec/nagisk.pl -c jabber -b $ARG1$
#command[check_asterisk_zaptel]=/usr/local/nagios/libexec/nagisk.pl -c zaptel
#command[check_asterisk_span]=/usr/local/nagios/libexec/nagisk.pl -c span -s 1

Version tracking
----------------

v1.2.2: 03/2011 by Frederic:
	-c konference: Displays the number of active conferences. Tresholds are against the number
	   of active conferences. This is for the Konference module, not for the Meetme module. Will show:
		"Active conferences: 5"
	-c jabber -b <buddy>: Displays the status of a particular jabber buddy. Will show:
		"Buddy: freddy (Connected)"
	   "Connected" will return OK
	   "Connecting" will return WARNING
	   "Disconnected" will return CRITICAL

v1.2.1: 03/2011 by Frederic:
	+ Implemented warning and critical treshold parameters.
          Treshold syntax follows the "Nagios plug-in development guidelines" document (section 2.5).
	  "-c peers" tresholds are checked against the number of Online and Monitored peers
	  "-c peer -p <name>" tresholds are checked against the peer latency (ms)
	  "-c channels" tresholds are checked against the total number of channels
	-w <treshold>: Specifies the Warning treshold (default value = 1000)
	-x <treshold>: Specifies the Critical treshold (default value = 2000)

v1.2: 03/2011 by Frederic:
        + Now compatible with Asterisk 1.6.2.X
        -c peer -p <name>: Display the "status" of "sip show peer <peer>": 
		"myowntelco:  OK (65 ms)"
        + "-c channels" is now using "core show channels" with new output parsing:
		"26 active channels 12 active calls 317 calls processed"
        + Replaced "show version" by "core show version" which will parse and show:
		"Asterisk 1.6.2.13"

v1.1: Added the following options:
	-c zaptel: Display the status of the zaptel card
	-c span: Display the status of a specific span (set with -s option)
	-s <span number>: Set the span number (default is 1)
	
v1.0: first public release

For developers
--------------

The source code has been 'beautified' using 'perltidy -i=4 -ce -l=100 -et=4 -lp -pt=2 -w'
To use it:

cd /usr/src
wget http://prdownloads.sourceforge.net/perltidy/Perl-Tidy-20090616.tar.gz
tar xvfz Perl-Tidy-20090616.tar.gz
cd Perl-Tidy-20090616
perl Makefile.PL
make
make test
make install
perltidy -i=4 -ce -l=100 -et=4 -lp -pt=2 -w /usr/src/nagisk/nagisk.pl

License
-------

Distributed under the GPLv3 license.

Source: README, updated 2011-03-22