Notification on trunk issue

Hi,

is there a possibility (without hacking into the code) to get notified when a trunk goes down, either standard or with a (paid) module?
I don’t want to wait for complaining customers before I know a trunk has an issue.

Thanks!

M3 will alert you on trunk outages. It’s free for 2 servers.

http://wiki.freepbx.org/display/PBXM3/Installing+M3+from+a+RPM

1 Like

Hi,

thanks for the tip. I have installed M3, but it seems to only monitor if freepbx is availabe, and basic metrics like mem/swap/disk etc, which I allready do with my own monitoring.
I forced a trunk to fail, but M3 seems not to detect this.

Hmm, it SHOULD be alerting.

How did you get the trunk to think it had failed?

Hi,

I have changed the password of my trunk (at provider side), and then, made a test call (and it failed as expected).
I aslo tried blocking all outbound traffic from freepbx, and again, made a test call to make sure it failed.

So it both cases, Freepbx was unable to register, so I guess that counts as a failed trunk.

M3 monitoring seems working. I have seen it notifying on disk and mem issues. However, sometimes I receive an “unknown error level” mail:

< td align=‘center’ valign=‘top’>

Notification

< /td>
Unknown Error level (255)

Erroring Node: < td colspan=3 style=‘font-family: Consolas,Monaco,Courier,monospace’>BEO MPBX01
Error Message: PHP Fatal error: Uncaught exception ‘Exception’ with message ‘M3 S erver unreachable. Firewall issue?’ in phar:///usr/local/m3/freepbx_m3_sshc heck.phar/M3/Config.php:43 Stack trace: #0 phar:///usr/local/m3/freepbx _m3_sshcheck.phar/freepbx_m3_sshcheck.php(5): M3\Config->__construct() #1 /usr/local/m3/freepbx_m3_sshcheck.phar(10): include(‘phar:///usr/loc…’) #2 {main} thrown in phar:///usr/local/m3/freepbx_m3_sshcheck.phar/M3 /Config.php on line 43
Command: php /usr/local/m3/freepbx_m3_sshcheck.phar
Check: check_sshkeys
Unique ID: da13376 3-bfad-4ff8-a9ee-e8e6cac475b3
This is an automatic email sent to xxx by the PBX Monitoring Server http://10.201.5. 5/, via 10.201.5.5

and then few minutes later:

< td align=‘center’ valign=‘top’>

Notification

Error Cleared

Erroring Node: BEOMPBX01
Error Message: < td colspan=3 style=‘font-family: Consolas,Monaco,Courier,monospace’>No unknown SSH keys found
C ommand: php /usr/local/m3/freepbx_m3_sshcheck.phar
Check: check_sshkeys
Unique ID: b465d386 -14c3-43c2-9542-2a3e63ab34ca
This is an automatic email sent to xxx by the PBX Monitoring Server http://10.201.5.5 /, via 10.201.5.5

Also, in M3, I see a warning state “No keep-alive sent from client in over 120 seconds”.

I don’t think it is a firewall issue. I have opened all ports as described at http://wiki.freepbx.org/display/PBXM3/Ports+that+M3+Use

I did some more testing, and I was able to resolve the “No keep-alive sent from client in over 120 seconds” issue. It was a timing issue. I’m now syncing both server with NTP, and that issue is resolved. Since then I did not receive any “unknown error level” mails yet.

However, it looks like M3 is still not warning on trunk fail. How I tested it:

  • Blocked the IP of the trunk provider in my firewall, so no communication with the trunk is possible.
  • Few moments later, the peer became unreachable:

  • Made a testcall to verify: “All circuits are busy”
  • Waited 10 minutes
  • M3 still shows everything ok: