Monitoring Asterisk
From Etel
O'Reilly Asterisk Template:
Contents |
[edit]
Title
[edit]
Problem
Once Asterisk is in production usage it can become a very important part of a business or an individual, therefore monitoring Asterisk is very important.
[edit]
Solution
There are a few solutions and it will generally require mixing and matching to meet your needs.
We will provide a solution using a simple Perl script:
-
Asterisk SNMP Configuration:
Asterisk SNMP configuration file should look like:
shell$> cat /etc/asterisk/res_snmp.conf
[general] subagent = yes enabled = yes
Next you have to configure SNMP on the box so it will generate two communities, one for the default, the other for the Asterisk sub-agent.
SNMP configuration file should look like:
shell$> cat /etc/snmp/snmpd.conf
rocommunity <COMMUNITY_NAME> master agentx agentXperms 0660 0550 nobody asterisk com2sec local localhost COMMUNITY.NAME com2sec mynetwork0 YOUR.NETWORK/24 YOUR.COMMUNITY.NAME com2sec mynetwork1 YOUR.NETWORK/24 YOUR.COMMUNITY.NAME com2sec mynetwork2 YOUR.NETWORK/24 YOUR.COMMUNITY.NAME com2sec mynetwork3 YOUR.NETWORK/24 YOUR.COMMUNITY.NAME group MyROGroup any local group MyROGroup any mynetwork0 group MyROGroup any mynetwork1 group MyROGroup any mynetwork2 group MyROGroup any mynetwork3 view all included .1 access MyROGroup “” any noauth 0 all none none
Restart the services:
shell#> service asterisk restart shell#> service snmpd restart
[edit]
Discussion
[edit]
See Also:
[edit]
Metadata
- By: Pedram Messri
