Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I installed packages cacti and snmpd on a Debian server. I'm able to display common graphs in Cacti (such as memory usage, load average, logged in users, etc) using the data templates listed as Unix. Now I want to replace these graphs with new ones using SNMP data sources, because I see there is also CPU usage and because it's not excluded I have to manage multiple hosts in the future.

So, I installed snmpd on the machine and left the snmpd.conf as it is. In Cacti, I created three new data sources from SNMP templates for 127.0.0.1 host:

  • ucd/net - CPU Usage - Nice
  • ucd/net - CPU Usage - System
  • ucd/net - CPU Usage - User

Then I created a new graph from template ucd/net - CPU Usage, and select the three data sources in the Graph Item Fields section. Graph is now enabled and running, but empty. No data have been collected.

Under Console -> Devices my SNMP host is listed as up and running:

System:Linux ip-xx-xx-xxx-xxx 3.2.0-23-virtual #36-Ubuntu SMP Tue Apr 10 22:29:03 UTC 2012 x86_64
Uptime: 929267 (0 days, 2 hours, 34 minutes)
Hostname: ip-xx-xx-xxx-xxx
Location: Sitting on the Dock of the Bay
Contact: Me me@example.org

In SNMP Options I left all as it is:

  • SNMP Version: Version 1
  • SNMP Community: public
  • SNMP Timeout: 500 ms
  • Maximum OID's Per Get Request: 10

In Console -> Utilities -> Cacti Log I have multiple warning (two for each data source) every 5 minutes:

10/29/2012 01:45:01 PM - CMDPHP: Poller[0] Host[2] DS[18] WARNING: Result from SNMP not valid. Partial Result: U
10/29/2012 01:45:01 PM - CMDPHP: Poller[0] WARNING: SNMP Get Timeout for Host:'127.0.0.1', and OID:'.1.3.6.1.4.1.2021.4.15.0'
10/29/2012 01:45:01 PM - CMDPHP: Poller[0] Host[1] DS[9] WARNING: Result from SNMP not valid. Partial Result: U
10/29/2012 01:45:01 PM - CMDPHP: Poller[0] WARNING: SNMP Get Timeout for Host:'127.0.0.1', and OID:'.1.3.6.1.4.1.2021.11.52.0'
10/29/2012 01:40:01 PM - CMDPHP: Poller[0] Host[2] DS[19] WARNING: Result from SNMP not valid. Partial Result: U
10/29/2012 01:40:01 PM - CMDPHP: Poller[0] WARNING: SNMP Get Timeout for Host:'127.0.0.1', and OID:'.1.3.6.1.4.1.2021.4.6.0' 
[...]

I have the feeling I'm missing something, but I cannot get it...

share|improve this question
    
cat /etc/snmp/snmp.conf will give you serious hint. Also consider typing snmpwalk -Cc -On -v 1 -c public 127.0.0.1 .1.3.6.1.2.1.1 –  coincoin Oct 29 '12 at 14:38
    
@EricDANNIELOU snmp.conf is empty and says I have no MIB files; I'm not sure about what they are and if I need them... The output of the command you suggested me is here. –  lorenzo-s Oct 29 '12 at 14:47
    
MIB files are comfortable as they help translating numeric oids to text. It seems ucd snmp has been revomed from debian in 2006. –  coincoin Oct 29 '12 at 16:15

1 Answer 1

up vote 3 down vote accepted

Could you try this command (OID is from Cacti log):

snmpwalk -Cc -On -v 1 -c public 127.0.0.1 1.3.6.1.4.1.2021.11.52.0

If you don't get a result like .1.3.6.1.4.1.2021.11.52.0 = Counter32: 250038, then edit /etc/snmp/snmpd.conf adding or decommenting:

rocommunity public  localhost 

And restart snmpd using one of:

/etc/init.d/snmpd restart
service snmpd restart
share|improve this answer
    
The snmpwalk command returned End of MIB only. I edit snmpd.conf as you suggested, and now I get .1.3.6.1.4.1.2021.11.52.0 = Counter32: 0. Cool. Now I'm waiting for Cacti to see if something changes. In the meantime I'm trying to figure out what of the configuration lines you posted did the job. –  lorenzo-s Oct 30 '12 at 7:44
    
Ok, I edited your answer removing non-needed parts. Thank you, now it works! –  lorenzo-s Oct 30 '12 at 8:27
    
Just succeeded in getting things works also for remote hosts! I just needed to remove local binding from agentAddress and specify an IP/Netmask in rocommunity definition instead of localhost (in the SNMPd.conf of these remote machines). Now Cacti is monitoring all my network! Thank you very much Eric! –  lorenzo-s Oct 30 '12 at 10:44

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.