Icinga/Nagios plugins for Asterisk
Přejít na soubor
Benjamin Renard 4186810aaa Improve installation doc 2022-05-19 12:14:13 +02:00
.gitignore Initial commit 2012-10-09 13:25:13 +02:00
README.md Improve installation doc 2022-05-19 12:14:13 +02:00
check_sip_connected_peers check_sip_connected_peers: fix division by zero problem 2022-05-19 12:11:20 +02:00
check_sip_latency check_sip_latency: improve output 2022-05-19 12:13:29 +02:00
check_sip_peer_simultaneous_channels Add check_sip_peer_simultaneous_channels check 2018-11-05 18:36:15 +01:00
check_sip_peers Improve check_sip_peers 2018-11-05 18:50:42 +01:00
check_sip_zombie_channels Add check_sip_zombie_channels 2022-05-19 11:36:51 +02:00
hangup_channels hangup_channels : fix bug when asterisk display other thing than concise return ('Setting max files open to ...' for instance) 2019-01-25 11:08:06 +01:00

README.md

Icinga/Nagios plugins to check an Asterisk

This repository provide a collection of scripts could be used as Icinga/Nagios check plugins to check an Asterisk installation.

Installation

apt-get install git sed sudo
git clone https://gitea.zionetrix.net/bn8/check_asterisk.git /usr/local/src/check_asterisk
mkdir -p /usr/local/lib/nagios/plugins
cd /usr/local/src/check_asterisk
for i in /usr/local/src/check_asterisk/check_*; do ln -s /usr/local/src/check_asterisk/$i /usr/local/lib/nagios/plugins/$(basename $i); done
cat << EOF > /etc/sudoers.d/nagios-asterisk
nagios ALL=NOPASSWD: /usr/local/lib/nagios/plugins/check_sip_connected_peers
nagios ALL=NOPASSWD: /usr/local/lib/nagios/plugins/check_sip_latency
nagios ALL=NOPASSWD: /usr/local/lib/nagios/plugins/check_sip_peers
nagios ALL=NOPASSWD: /usr/local/lib/nagios/plugins/check_sip_peer_simultaneous_channels
nagios ALL=NOPASSWD: /usr/local/lib/nagios/plugins/check_sip_zombie_channels
EOF
chmod 0400 /etc/sudoers.d/nagios-asterisk
cat << EOF > /etc/nagios/nrpe.d/asterisk.cfg
command[check_mytrunk]=sudo /usr/local/lib/nagios/plugins/check_sip_latency mytrunk
command[check_mytrunk_simultaneous_channels]=sudo /usr/local/lib/nagios/plugins/check_sip_peer_simultaneous_channels -w8 -c10 mytrunk
command[check_zombie_channels]=sudo /usr/local/lib/nagios/plugins/check_sip_zombie_channels -w2 -c3
command[check_mysite_sip_connected_peers]=sudo /usr/local/lib/nagios/plugins/check_sip_peers mysite 1.2.3.4
command[check_switchboard_peers]=sudo /usr/local/lib/nagios/plugins/check_sip_peers -w2 -c1 -W100 -C200 phone1 phone2 phone3
EOF
ln -s /usr/local/src/check_asterisk/hangup_channels /usr/local/sbin/hangup_channels

Copyright (c) 2022 Benjamin Renard

License

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 3 as published by the Free Software Foundation.

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.