This, wasn’t too easy to actually get going. Though I don’t have very much experience with SNMP, which may have been part of my problems. The whole SNMP / RES_SNMP with Asterisk is all very beta too from what I’ve been reading, and since the only other document really that I can find on setting this up, is by Mark Spencer himself, I hope this might help some other users out there too.

So, with the aide of Mark Spencers’ Howto over at VOIP Magazine I will be venturing forth and trying to get this going, but even better, because I will be using a remote CACTI server, instead of a local one.

REQUIREMENTS:

  • Asterisk Server (we’ll call it ASTERISK-BOX)
  • Cacti Web Server (we’ll call it CACTI-BOX)
  • Gentoo or equivalent Linux dist installed
  • Some Time

REQUIREMENTS – ASTERISK-BOX:

These are not in the scope of this document and assume you have already done this.

  1. install net-snmp
  2. install asterisk, and then enable the net-snmp module
  3. bring asterisk to a functioning state

REQUIREMENTS – CACTI-BOX:

  1. install apache/php/cacti/mysql
  2. setup apache/mysql/cacti

Now, lets get our hands dirty.

STEP 1 – SETUP ON ASTERISK-BOX:

Turn on SNMP in asterisk

# nano /etc/asterisk/res_snmp.conf

should look like this

[general]
subagent = yes
enabled = yes

Now we configure snmp on the box so it will generate two communities, one for the actual box, and one using the sub-agent, agentx as it’s known (agent 13 actually). So we setup our /etc/snmp/snmpd.conf as per this:

# cat /etc/snmp/snmpd.conf  
rocommunity YOUR.COMMUNITY.NAME  
master agentx  
#agentXSocket tcp:YOUR.ASTERISK.IP.ADDY:705  
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

Note in the above script the permissions, and the nobody, asterisk. This is because I am running asterisk as asterisk:asterisk, so this is where agentX needs to connect. The username doesn’t matter apparently, but the group does.

Now we have to modify some init scripts. I am using Gentoo. this may be different for your distribution.

First we edit /etc/conf.d/snmpd to look something like the following

SNMPD_FLAGS="${SNMPD_FLAGS} -x /var/agentx/master"

Then we have to edit /etc/conf.d/snmptrapd to something looking like the following

SNMPTRAPD_FLAGS=""
SNMPTRAPD_FLAGS="${SNMPTRAPD_FLAGS} -a"
SNMPTRAPD_FLAGS="${SNMPTRAPD_FLAGS} -Lf /var/log/snmptrapd.log"

Now we should stop asterisk and net-snmp (if they are running)

# /etc/init.d/asterisk stop
# /etc/init.d/snmpd stop

Now we should start both back up. I use screen so I can do all of this.

# screen
screen#asterisk -vvvvvvvvvvvvvvvvvvvvgc
screen#
# /etc/init.d/snmpd start
# /etc/init.d/snmptrapd start
# screen -r

You should see Asterisk spit out a message that it’s connected to the SNMP data source.

If asterisk looks to be working, then you can continue, otherwise debug to find out why it’s not connecting. Next we should setup snmpd and snmptrapd to start on boot of the box. Again, I am using Gentoo. This may be different for your OS.

# rc-update add snmpd default
# rc-update add snmptrapd default

Now we are done on this, we can copy the MIB’s from asterisk over to both boxes so they have them.

# cp //doc/asterisk-mib.txt /usr/share/snmp/mibs
# cp //doc/digium-mib.txt /usr/share/snmp/mibs
# scp //doc/digium-mib.txt admin@CACTI-BOX:
# scp //doc/asterisk-mib.txt admin@CACTI-BOX:

Now, we can test to make sure we see the output of the SNMP MIB’s at least locally on our box. So, we perform the following

# export MIBS=+ASTERISK-MIB
# snmpwalk -c YOUR.COMMUNITY.NAME -v 1 localhost asterisk

If all worked out well, then we are ready to move over to the Cacti box and get things setup there.

STEP 2 – SETUP ON CACTI-BOX:

First lets copy those files we scp’d over to the proper location

# mv /home/admin/digium-mib.txt /usr/share/snmp/mibs/
# mv /home/admin/asterisk-mib.txt /usr/share/snmp/mibs/

Now lets create the polling script in /usr/local/bin

# cat /usr/local/bin/snmp_poller.sh

    #!/bin/bash
    # filename: snmp_poller.sh
    # created this to make the polling process easier
    # Can make updates to it and such to add functionality
    MIBS=+ASTERISK-MIB
    export MIBS
    /usr/bin/php /usr/share/cacti/poller.php

# chmod 755  /usr/local/bin/snmp_poller.sh

Now, edit your crontab file so we can enable the polling script we just created.

# crontab -e

Then add this line, which will run the script every 5 minutes

*/5 * * * * /usr/local/bin/snmp_poller.sh > /dev/null 2>&1

Exit and save the file, and now we are done on the console and can go into Cacti’s web interface for the rest of this tutorial.

STEP 3 – CACTI WEB INTERFACE:

First, I’ll quote from Marks’ original post instead of re-writing it…

The first step is to add the server to the Cacti database. First, click Create devices on the front page. Click the Add link on the right side of the screen.

Clicking add reveals a new screen where you will input basic information about connecting to the server. Fill out the fields, making sure to set the community name to COMMUNITY_NAME (what you put in snmpd.conf) Also, make sure the template is set to None, unless you know for sure you want another set of services automatically setup to be monitored. After clicking create, you’ll come to a screen with the systems in cacti, click the one you just created. Select “SNMP � Generic OID Template” from the drop down menu under “Associated Graph Templates” and click add. Add more services if you like, but this is the one we will use to connect to the Asterisk SNMP module.
Advertisment

Now that the server is setup, we need some graphs. Click the create graphs for this host link at the top. On this page, select the “SNMP � Generic OID Template” by clicking the checkbox next to it. Select “SNMP � Generic OID template” from the drop down menu and click “create”. Fill in the form with your basic information about the particular graph you’re looking at. The vertical label will basically be the number of current calls in use.

To elaborate on the above, here’s a sample of one of my entries into Cacti

Go to your device, create a new graph, generic OID template, and enter your values like the following example:

Title: |host_description| - GTALK Channels in use
Vertical Label: Current Google Talk Channels
Legend Color: your choice
Legend Text: Google Talk Channels
Name: |host_description| - GTALK Channels
Maximum Value: 100
Data Source: GUAGE
OID: .1.3.6.1.4.1.22736.1.5.4.1.7.9

Now, This is where things have changed since he wrote his article in April 2006. Now we have new OID’s to deal with which I will provide a listing of below:

Here are all the possible ones to use:

Channel.1 = The NuFone Network's Open H.323 Channel Driver
Channel.2 = Skinny Client Control Protocol (Skinny)
Channel.3 = Zapata Telephony Driver
Channel.4 = Session Initiation Protocol (SIP)
Channel.5 = Standard Linux Telephony API Driver
Channel.6 = OSS Console Channel Driver
Channel.7 = Local Proxy Channel Driver
Channel.8 = Inter Asterisk eXchange Driver (Ver 2)
Channel.9 = Gtalk Channel Driver
Channel.10 = Feature Proxy Channel Driver
Channel.11 = Call Agent Proxy Channel

Here is what I am using:

overall channels in use (all types):
.1.3.6.1.4.1.22736.1.5.1.0
ASTERISK-MIB::astNumChannels.0

Session Initiation Protocol (SIP):  
.1.3.6.1.4.1.22736.1.5.4.1.7.4  
ASTERISK-MIB::astChanTypeChannels.4

Inter Asterisk eXchange Driver (Ver 2):  
ASTERISK-MIB::astChanTypeChannels.8  
.1.3.6.1.4.1.22736.1.5.4.1.7.8

zap channels in use:  
ASTERISK-MIB::astChanTypeChannels.3  
.1.3.6.1.4.1.22736.1.5.4.1.7.3

google talk in use:  
ASTERISK-MIB::astChanTypeChannels.9  
.1.3.6.1.4.1.22736.1.5.4.1.7.9

h323 channels in use:  
ASTERISK-MIB::astChanTypeChannels.1  
.1.3.6.1.4.1.22736.1.5.4.1.7.1

Here are the commands used to translate between numerical and alphabetic:

To convert from Alphabetic just do this for example:

# snmpwalk -On -c YOUR.COMMUNITY.NAME -v 2c YOUR.ASTERISK.IP.ADDY ASTERISK-MIB::astChanTypeChannels.9

and it will spit out the numerical version of the OID, to see the alpha one just do this instead

# snmpwalk -c YOUR.COMMUNITY.NAME -v 2c YOUR.ASTERISK.IP.ADDY .1.3.6.1.4.1.22736.1.5.4.1.7.9

And now after we have that all sorted out and you have what you want to graph all figured out, we can go back to marks’ original howto again.

When you are sure everything is right, continue on by clicking create.

Click Graph Management on the left. Select the newly created graph on the right (servername � SIP Users in the picture), and choose “Place on a Tree (Default Tree)” so that it’ll show up on the graphs page. Click go when ready. Just click yes on the next page that comes up.

After a few minutes, the graph will have populated from the polling thread, and you can click the graphs tab at the top. This will take you to a page with graphs on it, just select the Default Tree link, and look for the new graph.

You should end up with some graphs that look like this.

and that should be it really.. let me know if you have problems in the comments..

Extras – Helpful Testing Commands:

ASTERISK-BOX:
Walk the snmp tree:

# snmpwalk -c YOUR.COMMUNITY.NAME -v 2c YOUR.ASTERISK.IP.ADDY asterisk

CACTI-BOX:
Walk the snmp tree, but show as OID’s instead:

# snmpwalk -On -c YOUR.COMMUNITY.NAME -v 2c YOUR.ASTERISK.IP.ADDY asterisk

Comments

Comment by Sebastien Cruaux on 2007-04-26 04:42:11 -0500

I followed this tutorial (and Mark Spencer’s, since my Asterisk box and My Cacti box are on the same machine) step by step but I still have a problem : I can’t have an access to the Asterisk MIB. I explain myself : when I run snmpwalk -v1 -v mycommunity localhost asterisk, I receive a SNMP get-reponse with an error status noSuchName. I ran snmptranslate -Tp -IR private (which is .1.3.6.1.4) to check if the Asterisk MIB was in the SNMP tree and yes, it was at .1.3.6.1.4.1.22736.1. However, when I “snmpwalk” .1.3.6.1.4.1 I receive a response but with .1.3.6.1.4.1.22736 I have the noSuchName error. Consequently, I can’t display the graphs in Cacti, they always remain empty.
Maybe there is some problem in snmpd.conf ? My snmpd.conf is :

master agentx
agentXperms 0660 0550 root root
com2sec local localhost asteriskcom
com2sec mynetwork0 xxx.xxx.xxx.0/24 asteriskcom
group MyROGroup v1 local
group MyROGroup v1 mynetwork0
view all included .1
access MyROGroup "" any noauth exact all none none

Thanks for your help

Comment by Matt G on 2007-04-26 15:13:52 -0500

Hi Sebastien,

Interesting. I had a bitch of a time getting this to work let me tell you! I’m not sure what your specific issue is. I do notice that in order to get SNMP data, I must do the following in this particular order to get the data pumping out.

– stop asterisk
– stop snmpd
– start asterisk
– start snmpd

then watch the asterisk debug output to make sure it performs the agentx connection properly. It took me a good few hours to actually get it to grab the data for me. Let me know if you are still having issues.

Thanks!

Comment by Sebastien Cruaux on 2007-04-27 04:44:04 -0500

Ok so it seems that the problem comes from the asterisk snmp module. I run the commands in the order you gave but I have no trace of snmp or agentx connection neither in asterisk CLI nor in asterisk logs. Is there anything to do to activate SNMP in Asterisk besides uncommenting subagent=yes and enabled=yes in res_snmp.conf ?
Something else is weird : I ran modules show in Asterisk CLI and there were no res_snmp.so. Is it normal or is it some kind of addon which has to be installed ?

Thanks

Comment by Matt Gibson on 2007-04-27 15:59:52 -0500

Hi Sebastien,

Ahhh – Yeah, I think I know what your issue is.

Go back to your asterisk source, and do this :

# make distclean
# ./configure –with-net-snmp (check that)
# make menueselect

go to the app options, and make sure res-snmp is there, then

# make && make install

Now you’ll have res-snmp.so installed in /var/lib/asterisk/modules and you should be able to get it working.

Hope this helps!
Thanks,
VoipPhreak

Comment by Sebastien Cruaux on 2007-05-03 04:25:11 -0500

No idea ? 🙁

Comment by Matt G on 2007-05-03 16:12:22 -0500

Hi Sebastien,

Sorry, I forgot to moderate my post! Try my suggestion above to make sure you have res_snmp compiled and included with asterisk, it sounds like that will solve your issues.

Thanks,
Matt

Comment by Sebastien Cruaux on 2007-05-04 09:38:54 -0500

Actually it was
# ./configure –with-netsnmp (without ‘-’ between net and snmp)
But I still have a problem (sorry). When I run this command I get an error message :

checking for net-snmp-config… /usr/bin/net-snmp-config
checking for snmp_register_callback in -lnetsnmp… no
configure: ***
configure: *** The Net-SNMP installation on this system appears to be broken.
configure: *** Either correct the installation, or run configure
configure: *** including –without-netsnmp

I installed net-snmp using
# yum install net-snmp*
What could be wrong ?

Thank you again

Comment by matt gibson on 2007-05-04 14:36:15 -0500

Hi Sebastien,

I’m not that familiar with RH based distributions, afaik what you’ve done should be working.
I would try installing the net-snmp source from scratch instead of using YUM to see if that fixes your issues.

Thanks,
Matt Gibson

Comment by Syed Network on 2007-06-26 12:57:47 -0500

This post looks quite helpfull, i’m using Asterisk version 1.4.4, since everything is pretty understanding in this post, but i’m just newbie to CACTI. Can you please help with CACTI steps? Thanks

Comment by Matt G on 2007-06-26 13:20:27 -0500

Hi Syed,

Sure not a problem. What Linux distribution are you using and what kind of help do you need to get Cacti Running? Cacti is usually included with most Linux dists as a package and is installed through the package managers or in the case of Gentoo, using portage. Once installed the setup is very straight forward but I can help with whatever you need.

Thanks,
Matt

Comment by Syed Network on 2007-06-26 15:39:01 -0500

Thanks Matt for your quick response. I’m using RHEL 4. actually i’ve couple of Asterisk server at different locations, some monitoring via SNMP that’s what asterisk 1.4.x supports.
I gonna give it a try proir in testing env.. once done then will go on production servers. But for now i wanna do all on same machine and also i don’t know anything about CACTI.

Comment by Matt Gibson on 2007-06-26 21:45:09 -0500

Hi Syed,

I hope this helps you, I found a CACTI installation tutorial for CentOS. Not the same as RHEL, but very similar so it will probably work. Give it a try and let me know if you need any help.

Here’s the link:
http://wiki.centos.org/HowTos/Cacti_on_CentOS_4.x

Thanks,
Matt

Comment by Matt G on 2007-06-26 21:52:58 -0500

Hey Syed,

I found this howto for Cacti on CentOS. I’m not sure if it’ll work for you but it should be very similar for RHEL. Give it a shot and let me know if you need any help with it.

Here’s the link:
http://wiki.centos.org/HowTos/Cacti_on_CentOS_4.x

Comment by Leonardo Gallego on 2007-07-02 16:25:03 -0500

Hello Matt,

Im trying to set up a stresstesting platform using your how-tos, the one about SIPP and this one.

The SIPP part is working nicely. But im having trouble on getting CACTI-box to grab de data from the asterisk-box.

I cant get cacti to recognize the other host, i always get a “SNMP Error” and “Unknown status” on cacti.

This command is working ok:

snmpwalk -c comunidad -v 2c localhost asterisk

But when i try to do it from the cacti-box:

snmpwalk -c comunidad -v 2c 192.168.1.8 asterisk

I dont get anything. Also if i try to run it in the same asterisk-box, i dont get any output, its like snmp is not listening on that interface.

I followed your steps quite closely, and modified just what was needed… do you have any idea what can be wrong?

Regards and thanks for the tutorials.
Leonardo

Comment by Matt G on 2007-07-02 21:34:43 -0500

Hello Leonardo,

Glad most of the howto’s are working for you. Your error sounds interesting, and I’ll be happy to help you figure it out.

What happens if you run:

netstat -tunl | grep 161

on the SNMP box, is the port there?

Are you blocking it with your firewall?

Are you allowing the 192.168 ip range in your snmpd.conf?

What happens if you just run snmpwalk -c -v 2c 192.168.1.8 without asterisk to see if it returns anything at all?

It sounds like it’s a problem with snmp itself if 161 isn’t there or isn’t listening.

What about /var/log/messages?

This should get you on the right track and then we can continue from there 🙂 Good luck!

Comment by Jon on 2007-07-16 11:55:17 -0500

Great article, I’m running debian unstable debs of asterisk 1.4. I can snmpwalk the system MIB’s but snmpwalk -v2c -c mycommunity localhost asterisk returns the following error:

ASTERISK-MIB::asterisk = No Such Object available on this agent at this OID

snmpwalking system returns plenty of information, so the problem is related to agentx and/or asterisk as near as I can tell. Any ideas?

Comment by Matt G on 2007-07-16 13:02:30 -0500

Hi Jon,

Thanks! I hope it was able to help.

It looks to me like the error you are experiencing is because Asterisk is not compiled or functioning with the res-snmp module. When you open Asterisk does it say that it successfully connected to the snmp daemon and that it’s sending statistics? I get a little message from asterisk that it’s connected.

That seems like it might be your issue since you’re getting the system information, but not the asterisk specific stuff.

I’d start the debugging with Asterisk and the SNMP Module and make sure that’s all working, then go from there 🙂

Let me know how you make out.

Thanks,
Matt

Comment by Jon on 2007-07-16 18:56:52 -0500

This is all I get when loading and unloading res_snmp. This is with core debug and verbose 10.

pbxCLI> module unload res_snmp.so
Unloading [Sub]Agent Modulenmp.so
== Terminating SubAgent
pbx
CLI> module load res_snmp.so
== Parsing ‘/etc/asterisk/res_snmp.conf’: Found
Loading [Sub]Agent Module
Loaded res_snmp.so => (SNMP [Sub]Agent for Asterisk)
== Starting SubAgent
pbx*CLI>

What should I be getting? I’m running asterisk 1.4.6, which version are you using successfully?

Comment by Matt Gibson on 2007-07-16 21:30:47 -0500

Hi Jon,

Thanks for the info. I am using 1.4.7.1 for the Asterisk version, and I’ve confirmed it’s still working on here.

Your SNMP debug looks right, however I see this on my console when it connects

NET-SNMP version 5.4 AgentX subagent connected

and this on my console when it doesn’t connect

Warning: Failed to connect to the agentx master agent ([NIL]):

Do you see anything similar? If not, something with SNMP isn’t working as expected. Once you see the successfully connected message, you should be able to walk the Asterisk SNMP tree.

HTH!

Comment by Msa on 2007-07-27 05:52:37 -0500

Sebastian, were you able to build asterisk with res_snmp. I’m getting the same

“The Net-SNMP installation on this system appears to be broken”

Im using CentOS. If you did can you please post the solution here. It would be great.

Comment by Brandon Kruse on 2007-07-28 17:27:01 -0500

Hey guys, great tutorial

I am in the middle of adding a TON of features to the res_snmp module for 1.4 and backporting the module to 1.2.

Warning: Failed to connect to the agentx master agent (/var/agentx/master): Unknown host (/var/agentx/master) (No such file or directory)

From asterisk when I do a module load res_snmp.so

I currently have a lot of features such as : Cacti integration (a HUGE collection of templates)

Call analysis, total channels, sip/iax/h323/local/agent/console channels. Meetme conferences, agents logged in, channel count by agents, theres tons of stuff I am working on, and I am always open to new suggestions!

rocommunity public
master agentx
#agentXSocket tcp:127.0.0.1:705
agentXperms 0777 0777 nobody asterisk
com2sec local localhost public
group MyROGroup any local
view all included .1
access MyROGroup "" any noauth 0 all none none

asterisk is running as root, i built net-snmp manually and configured asterisk –with-snmp, any ideas?

admteamkruz@gmail.com

These new features I am adding are extremely exciting.

-bkruse

Comment by Matt G on 2007-07-29 00:16:49 -0500

Hi Brandon,

Small World 😛 – How is the template working out for Astmon that I made for you?

Two things I notice from your description.

  1. You have “–with-snmp” while It’s supposed to be “–with-netsnmp” (unless things have changed?

  2. Did you create /var/agentx/ and make sure that snmpd can write to it?

drwxrwxrwx 2 asterisk asterisk 4096 Jul 29 00:15 agentx

and within that directory I simply did
“# touch master” and then “chown asterisk:asterisk master” and then restarted snmpd and asterisk.

See if that helps.

Thanks,
Matt

Comment by Brandon Kruse on 2007-07-29 02:41:48 -0500

Matt,

I knew I recognized that url :]

Everything is going great! astmon is going great, and props to you again!

I am working on getting all the statistics right now, then I will update all those docs and work on manager specific things (snmp)

I will try this and see how it turns out, shoot me an email also, at my work email, we will keep this discussion on this board, however, to help people that may have the same problems :]

-bk

Comment by Brandon Kruse on 2007-07-29 03:51:58 -0500

Yes, I did configure with –with-netsnmp, my mistake.

It still says Warning: Failed to connect to the agentx master agent (/var/agentx/master): Unknown host (/var/agentx/master) (Connection refused)

:[

ps aux | grep snmp
snmp 9546 0.0 0.3 7020 3956 ? S 01:44 0:00 /usr/sbin/snmpd -x /var/agentx/master

cat /var/log/snmpd.log
cat /var/log/snmpd.log
Turning on AgentX master support.
NET-SNMP version 5.4.1.rc2

asterisk error:

== Starting SubAgent
*CLI> NET-SNMP version 5.4.1.rc2 AgentX subagent connected
registering pdu failed: 263!

I noticed, it does not have -x /var/agentx/master, but if i try that:

Comment by Matt on 2007-07-29 19:57:21 -0500

Hey Brandon,

I sent you a message @gmail, couldn’t find your work email anywhere.

Not sure if it makes a difference, but when I “ps aux | grep snmpd” I see the following:

root 3788 0.0 0.9 8388 4592 ? S Jul24 0:32 /usr/sbin/snmpd -p /var/run/snmpd.pid -x /var/agentx/master

maybe the PID and full paths matter?

I’m also using 5.4.1 not the RC2, perhaps that makes a difference?

Looks like the last bit of your message was cut off, what happens when you try with the -x /var/agentx/master?

Thanks,
Matt

Comment by Roger Gomez Olivares on 2007-09-27 13:48:10 -0500

I have a diferent version of linux, Centos 5.0 and I try to follow the step in this tutorial but the init scripts of the snmpd and snmptrap are different. What can I do?

Comment by Matt G on 2007-09-27 14:14:02 -0500

Hi Roger,

I am not sure what the problem is with CentOS. I have seen a few people complain of issues with SNMP and CentOS.

I found this tutorial for SNMP on CentOS 5. It’s more for installing the system, but he does mention and install net-snmp. Perhaps this can help you?

http://support.lithiumcorp.com/content/view/128/70/

Thanks,
Matt G

Comment by Martin Madsen on 2007-11-27 13:26:06 -0500

To make netsnmp work with asterisk on CentOS 4, you willl have to compile from source (check sourceforge) you cannot use the stock rpms, havent cared to find out why since source works.

MM

Comment by Martin Madsen on 2007-11-27 14:58:41 -0500

Problem solved, issue is on line 21667 of the configure file.

NETSNMP_libs=`${NETSNMP_CONFIG} –agent-libs`

CHANGE to:

NETSNMP_libs=`${NETSNMP_CONFIG} –libs`

And all is well.

MM

Comment by Martin Madsen on 2007-11-27 19:29:05 -0500

too fast it compiles no issue but there is a symbol error..

Comment by Hmmph on 2007-12-21 01:03:46 -0500

Working on getting this installed on our dev server, running Ubuntu Dapper. Been working on it for about 9 hours. Here’s where I am at…

snmpd_5.2.1.2-4
(tried to use compiled net-snmp-5.4.1 as well)

getting connection errors right now. not sure what is causing it.

root@ubuntupbx:/usr/src/net-snmp-5.4.1# netstat -natup | grep 161
udp 0 0 0.0.0.0:161 0.0.0.0:* 18312/snmpd
snmpwalk -c public -v 1 localhost asterisk
Timeout: No Response from localhost

my snmpd.conf (tried both on this site, this is from S Cruaux’s post)
rocommunity public
master agentx
#agentXSocket tcp:127.0.0.1:705
agentXperms 0777 0777 nobody asterisk
com2sec local localhost public
group MyROGroup any local
view all included .1
access MyROGroup "" any noauth 0 all none none

Any help appreciated, be really great to get this working

Comment by K Myers (Formerly Hmmph) on 2007-12-21 01:33:21 -0500

gah.. got that part straightened out. now i get

[Dec 21 00:31:19] WARNING[6373]: loader.c:363 load_dynamic_module: Error loading module ‘res_snmp.so’: /usr/lib/libnetsnmpagent.so.15: undefined symbol: boot_DynaLoader
[Dec 21 00:31:19] WARNING[6373]: loader.c:649 load_resource: Module ‘res_snmp.so’ could not be loaded.

When trying to do a “module load res_snmp.so”..

Gonna keep hammering on it.

Comment by K Myers (Formerly Hmmph) on 2007-12-21 02:31:12 -0500

Seems that this issue is a library linking issue, trying some things out with the guys from #perl. Once I get this all hammered out i’ll write up a debian/ubuntu specific howto

Comment by Brandon Kruse on 2008-01-06 03:47:47 -0500

Well,

I got it working on debian/ubuntu and I am going to be working on the astmon project now.

thanks Matt!

-bkruse

Comment by Adrian Marsh on 2008-02-15 08:57:05 -0500

Brandon,

You mention a TON of Cacti templates – do you have these published?
If so, can you publish them ? ( http://forums.cacti.net/viewforum.php?f=12 )

Thanks,

-A

Comment by Chris O on 2008-02-16 14:23:36 -0500

Hey,

I am trying to get this to work, but I am getting this error:

Warning: Failed to connect to the agentx master agent (/var/agentx/master): Unknown host (/var/agentx/master) (No such file or directory)

Can anyone help me out?

Many Thanks

Comment by Neo on 2008-10-20 18:25:12 -0500

Thanks mate for this wonderfull info.

did it step by step and able to run on the first attempt !

good work

Comment by Justin on 2009-06-29 14:38:19 -0500

Not sure if this will help anyone else, but I was also getting the same SNMP failure when compiling release 1.4.24.1 on CentOS 5.3 even though all the required snmp libraries were installed. The solution was to install the package: lm_sensors-devel. For some reason it is required.

Comment by Chris on 2009-11-06 02:08:01 -0500

I’m trying to get snmp working on Trixbox 2.6/Asterisk 1.4. If I start asterisk as root I can do the snmpwalk of the asterisk tree. If I start asterisk the proper way (running as the asterisk user) it doesn’t work. Very frustrating. Permissions are wide open on /var/agentx/master

Comment by Ibañez on 2010-02-28 08:12:37 -0500

See that bug for Debian system, it’s about permision in /var/agentx/master

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=452595

Comment by john on 2010-05-28 18:31:28 -0500

i can do the same on Zenoss core ?