[Freeswitch-users] Basic Nagios script for Freeswitch

Mickael Hubert mickael at winlux.fr
Mon Jan 14 16:40:55 UTC 2019


Hi all,
today I developed a basic nagios script to check freeswitch instance.
I publish it in github, maybe it can help you.

https://github.com/Mickaelh51/pynagfreeswitch

Ex:

pynagfreeswitch.py -t -w 10 -c 20 ==> OK - Total calls count is 0
pynagfreeswitch.py -g gateway1 -G failedcallsout -w 10 -c 20 ==> OK -
gateway1 failedcallsout is 2
pynagfreeswitch.py -g GWSCR1 -G pingtime -w 0.20 -c 0.56 ==> WARNING -
GWSCR1 pingtime is 0.55
pynagfreeswitch.py -g GWSCR1 -G status -S up ==> OK - GWSCR1 status is up
pynagfreeswitch.py -g GWSCR1 -G state -S noreg ==> OK - GWSCR1 state is noreg

./pynagfreeswitch.py -h
usage: pynagfreeswitch.py [-h] [-a AUTH] [-s SERVER] [-p PORT] [-w WARNING]
                          [-c CRITICAL] [-g GATEWAY] [-G GATEWAYCHECK] [-t]
                          [-S STRINGOK]

optional arguments:
  -h, --help            show this help message and exit
  -a AUTH, --auth AUTH  ESL password
  -s SERVER, --server SERVER
                        FreeSWITCH server IP address
  -p PORT, --port PORT  FreeSWITCH server event socket port
  -w WARNING, --warning WARNING
                        threshold that generates a Nagios warning
  -c CRITICAL, --critical CRITICAL
                        threshold that generates a Nagios critical warning
  -g GATEWAY, --gateway GATEWAY
                        select gateway
  -G GATEWAYCHECK, --gatewaycheck GATEWAYCHECK
                        type of checking (failedcallsout / status / state /
...)
  -t, --totalcallscount
                        total calls count
  -S STRINGOK, --stringok STRINGOK
                        if this string is found = OK

++
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20190114/9875c123/attachment.html>


More information about the FreeSWITCH-users mailing list