Complex asterisk network monitoring


#1

Well. I need some numbers from looking to which I could say :

  • phone network works well.
  • there are some problems, but it still works okay.
  • there are big troubles and phone system almost does not work.

I understand that there can be plenty of different facts. But I would like to hear your ideas.

So we have 20 asterisk, united in one network. There are different applications and setups.

My idea is to use rating system:

  1. SIP accessability. add some points if accessible, substract if not
  2. critical applications\numbers - if they work - add some points and so on…

#2

Hi,
@asterisker, Technically, you can use any opensource monitoring system (Zabbix, Cacti etc.), or in-house scripts. The most important thing is to define WHICH objects you are going to monitor and HOW you are going to notify your system admins about failures.

However, in my view, the most efficient way is command-line polling via SSH - this may be implemented by shell / python / etc. scripts.

Some hints about commands:

  1. Check whether Asterisk is running:
    systemctl status asterisk
  2. Check that asterisk is listening on SIP port:
    netstat -an | grep 5060
  3. Check that trunks /are registered:
    asterisk -rx “pjsip show registration <trunk name>” (or “sip show registry”)
  4. Check the number of available endpoints:
    asterisk -rx “pjsip show contacts” (or “sip show peers”)
  5. Check the number of active calls:
    asterisk -rx “core show calls”

Apart from that, you may enable syslog and send there log messages from /var/log/asterisk/full, filtering them on errors and warnings.

On top of that, do not forget about monitoring generic OS parameters:
top (for CPU)
free (for RAM)