Hi Dan,

I added commit r6073 which enables the res_snmp.so module in Asterisk.  
Additionally a few tweaks with how netsnmp was built was necessary... agentx 
needed to be enabled and for some reason Buildroot disabled the Unix transport, 
possibly a problem with uClibc, but builds fine with our eglibc toolchain.

Here is my mini how-to...

I used this as a basic guideline:
http://asteriskdocs.org/en/3rd_Edition/asterisk-book-html-chunk/Monitoring_id241628.html

Edit res_snmp.conf so it acts as a subagent and is enabled...
# cat /etc/asterisk/res_snmp.conf
--
; Asterisk SNMP Support
; 
https://wiki.asterisk.org/wiki/display/AST/Simple+Network+Management+Protocol+(SNMP)+Support
-- snip --
[general]
; We run as a subagent per default -- to run as a full agent
; we must run as root (to be able to bind to port 161)
subagent = yes
; SNMP must be explicitly enabled to be active
enabled = yes
--

Create /mnt/kd/snmp/snmpd.conf as follows... specify syslocation and syscontact 
as you desire, I thought Leif deserved some credit here. :-)
# cat /mnt/kd/snmp/snmpd.conf
--
com2sec notConfigUser  default       public

group   notConfigGroup v1           notConfigUser
group   notConfigGroup v2c           notConfigUser

view all    included  .1
view system included  .iso.org.dod.internet.mgmt.mib-2.system

access  notConfigGroup ""      any       noauth    exact  all    none none

syslocation Caledon, ON
syscontact Leif Madsen [email protected]

master agentx
agentXSocket /var/agentx/master
agentXPerms 0660 0550

sysObjectID .1.3.6.1.4.1.22736.1
--

Restart the snmpd service...

$ service snmpd stop
$ service snmpd init

Now in Asterisk, unload and load the res_snmp.so module, or restart the 
asterisk service, etc.

Finally, type the following command and you should see a bunch of output, 
Asterisk related...

$ snmpwalk -On -v2c -c public 127.0.0.1 .1.3.6.1.4.1.22736

Pretty cool...

To help test, I just updated the SVN to r6073 on build.astlinux.org so people 
here can easily test.  Each build takes about 2.5 hours occurring in this 
order...
--
ast11,smp
ast11
ast18,smp
ast18
--

Please let us know how it works.

If anyone can think of a reason to not enable the res_snmp.so module in 
Asterisk, please explain.

Lonnie



On May 4, 2013, at 11:53 AM, Dan Ryson wrote:

> Hello everyone.  
> 
> I'm tinkering around with Zabbix.  While I'm successfully using the Zabbix 
> agent to monitor the machine, I'd also like to monitor certain Asterisk 
> parameters such as shown in this Zabbix Template.  It looks like this is 
> feasible using SNMP...  That is, if I could just get the SNMP daemon 
> configured.
> 
> When I start the SNMP daemon, it complains that it can't find a configuration 
> file, snmpd.conf.  I see that there's an empty "snmp" file (in 
> /mnt/kd/asterisk and /etc) but even if I save my configuration settings in 
> this file, the SNMP daemon doesn't appear to read it.  
> 
> What's the proper way to configure SNMP in AstLinux?  
> 
> Thanks for any thoughts,
> 
> Dan


------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite
It's a free troubleshooting tool designed for production
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap2
_______________________________________________
Astlinux-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/astlinux-users

Donations to support AstLinux are graciously accepted via PayPal to 
[email protected].

Reply via email to