Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Wed May 24, 2017 6:41 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: SNMPAgent not working on V1.0.X
PostPosted: Wed Feb 22, 2017 2:27 pm 
Offline

Joined: Wed Feb 22, 2017 12:36 pm
Posts: 2
I've been trying to get the snmpagent plugin working, it would make a great replacement for a number of scripts I have running to gather stats on my various pollers. I know that's it's considered part of Cacti now, and I never tried to use it when it was a plugin.

It seems like it should be pretty easy to get going, put a pass_persist line in my /etc/snmp/snmpd.conf, make sure permissions on the <cacti>/snmpagent_*.php files are correct, restart the snmpd service. This is the line I put in the file:

pass_persist .1.3.6.1.4.1.23925 /data/cactiapp/cacti/snmpagent_persist.php

After restarting my snmpd service, I see this:

[root@npap2320 snmp]# ps -ef | grep snmp
root 20319 1 0 18:55 ? 00:00:01 /usr/sbin/snmpd -LS0-6d -f
root 20329 20319 0 18:56 ? 00:00:00 /usr/bin/php /data/cactiapp/cacti/snmpagent_persist.php
root 20336 1 0 18:56 ? 00:00:00 /bin/php -q ./snmpagent_mibcache.php

But when I try to poll it:

[root@npap2320 snmp]# snmpwalk -v2c -c****** localhost .1.3.6.1.4.1.23925
SNMPv2-SMI::enterprises.23925 = No Such Instance currently exists at this OID

Additionally, it keeps launching new processes as time goes by, so much so that I end up out of memory after a day. Finally, I get this in my cacti.log every 30 seconds:

2017-02-22 19:26:30 - CMDPHP PHP ERROR NOTICE Backtrace: (/snmpagent_mibcachechild.php: 47 CactiErrorHandler)(/lib/functions.php: 4242 cacti_debug_backtrace)
2017-02-22 19:26:30 - ERROR PHP NOTICE: Undefined variable: snmpagent in file: /data/cactiapp/cacti-1.0.2/snmpagent_mibcachechild.php on line: 47

Does anyone have this working against a V1.0.X install?

Thanks


Top
 Profile  
 
 Post subject: Re: SNMPAgent not working on V1.0.X
PostPosted: Mon Feb 27, 2017 6:39 pm 
Offline
Developer
User avatar

Joined: Tue Jun 13, 2006 1:17 am
Posts: 786
Location: Cologne, Germany
Hi thubbard,

I've just read your note and committed a bug fix addressing that issue.
https://github.com/Cacti/cacti/commit/5a3b5fa02a3fe85fc2cae45908981f02e2eff9ed

Regards
-Andi

_________________
Hat das Bl├╝mchen einen Knick, war der Schmetterling zu dick! ;)
reportit v0.7.5a
SNMPAgent v0.2.3
Download ReportIt | Download SNMPAgent | ReportIt SVN | ReportIt Templates | Wish list


Top
 Profile  
 
 Post subject: Re: SNMPAgent not working on V1.0.X
PostPosted: Wed Apr 12, 2017 6:10 pm 
Offline

Joined: Wed Feb 22, 2017 12:36 pm
Posts: 2
I upgraded to 1.1.2 recently, and it does appear that this works now, sort of.

It does return values when I run an snmpwalk against the CACTI-MIB root OID.

However, it doesn't populate any of the performance counters (poller time, RRDs processed, etc.) for pollers other than the master that hosts the database. I'm trying to dig into the code to figure out why.


Top
 Profile  
 
 Post subject: Re: SNMPAgent not working on V1.0.X
PostPosted: Tue Apr 25, 2017 7:11 pm 
Offline
Cacti User
User avatar

Joined: Mon Jan 05, 2015 10:10 am
Posts: 289
Maybe that belongs in GitHub?

_________________
Before history, there was a paradise, now dust.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group