Discovery 1.2 not detecting SNMP

General discussion about Plugins for Cacti

Moderators: Developers, Moderators

Post Reply
jakbeatz
Posts: 49
Joined: Thu Aug 10, 2006 4:56 pm

Discovery 1.2 not detecting SNMP

Post by jakbeatz »

I just installed Discovery 1.2 on 0.8.7g with an upgraded PIA 2.9 from PIA 2.8.

I'm testing a single device, and when the poller runs, discovery runs but it thinks that the device it discovers isn't running SNMP. This was working prior on PIA 2.8/Discovery 1.1. I cranked up the logs to debug and here's what I see:

Code: Select all

07/17/2011 02:29:01 PM - POLLER: Poller[0] Network Discover is now running
07/17/2011 02:29:01 PM - CMDPHP: Poller[0] DEVEL: SQL Assoc: "select id,description from host where disabled != 'on'"
07/17/2011 02:29:01 PM - CMDPHP: Poller[0] DEVEL: SQL Assoc: "SELECT hostname FROM host"
07/17/2011 02:29:01 PM - CMDPHP: Poller[0] DEVEL: SQL Assoc: "SELECT description FROM host"
07/17/2011 02:29:01 PM - CMDPHP: Poller[0] DEVEL: SQL Assoc: "SELECT plugin_discover_template.*, host_template.name FROM plugin_discover_template    LEFT JOIN host_template on (plugin_discover_template.host_template = host_template.id)"
07/17/2011 02:29:01 PM - CMDPHP: Poller[0] DEVEL: SQL Exec: "delete from plugin_discover_hosts where time < 1310923741"
07/17/2011 02:29:01 PM - CMDPHP: Poller[0] DEVEL: SQL Exec: "update plugin_discover_hosts set up = 0"
07/17/2011 02:29:01 PM - CMDPHP: Poller[0] DEVEL: SQL Exec: "REPLACE INTO plugin_discover_hosts (hostname, ip, hash, community, snmp_version, snmp_username, snmp_password, snmp_auth_protocol, snmp_priv_passphrase, snmp_priv_protocol, snmp_context, sysName, sysLocation, sysContact, sysDescr, sysUptime, os, snmp, up, time) VALUES ('', '10.219.49.13', '182137101', '', '2', '', '', '', '', '', '', '', '', '', '', 0, '', 0, 1,1310927341)"
07/17/2011 02:29:01 PM - DISCOVER: Poller[0] 1 IPs Scanned, 1 IPs Responded to Ping, 0 Responded to SNMP, 0 Device Added, 0 Graphs Added to Cacti
It seems fishy that community isn't being written into the REPLACE, even though it's explicitly configured in http://host/cacti/settings.php?tab=misc and http://host/cacti/settings.php?tab=general

Also, for completeness:
[root@monitor01 log]# snmpwalk -v2c -c * 10.219.49.13 sysDescr
SNMPv2-MIB::sysDescr.0 = STRING: Cisco IOS Software, IOS-XE Software (PPC_LINUX_IOSD-ADVIPSERVICES-M), Version 15.1(1)S1, RELEASE SOFTWARE (fc1)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2011 by Cisco Systems, Inc.
Compiled Thu 10-Feb-11 23:49 by mcpre
[root@monitor01 log]#
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: Discovery 1.2 not detecting SNMP

Post by gandalf »

Please run

Code: Select all

php -q findhosts.php -f -d
and show us the output for the device in question
R.
jakbeatz
Posts: 49
Joined: Thu Aug 10, 2006 4:56 pm

Re: Discovery 1.2 not detecting SNMP

Post by jakbeatz »

Code: Select all

[root@monitor01 discovery]# php -q findhosts.php -f -d
Checking to determine if it's time to run.
Checking if user changed the start time
The next run time has been determined to be at
   2011-07-18 14:39:01
Scanning has been forced
Setting 'Rerun Data Queries' = true
Setting 'Create Graphs for Up Interfaces Only' = true
07/18/2011 01:48:43 PM - POLLER: Poller[0] Network Discover is now running
Rerunning Data Queries on Existing Hosts
Primary Community Name    : public
Secondary Community Names : 
Calculating Info for Subnet :10.219.49.13
Start IP is 10.219.49.13
Total IPs is 1
10.219.49.13 - Responded to ping! - Host 10.219.49.13 is alive but no SNMP!
07/18/2011 01:48:43 PM - DISCOVER: Poller[0] 1 IPs Scanned, 1 IPs Responded to Ping, 0 Responded to SNMP, 0 Device Added, 0 Graphs Added to Cacti
[root@monitor01 discovery]#
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: Discovery 1.2 not detecting SNMP

Post by gandalf »

I expected to find sth like
192.168.1.1 - Responded to ping! - checking SNMP V3 - checking SNMP V2 - checking community blabla - checking community public - checking SNMP V1 - checking community blabla - checking community public - ....
at least it should try checking the SNMP options. Which SNMP community strings did you configure in the DISCOVERY settings (Settings -> Misc -> Discovery -> SNMP Communities)? I do NOT need the exact credentials, but did you enter _anything_ there?
R.
jakbeatz
Posts: 49
Joined: Thu Aug 10, 2006 4:56 pm

Re: Discovery 1.2 not detecting SNMP

Post by jakbeatz »

gandalf wrote:I expected to find sth like
192.168.1.1 - Responded to ping! - checking SNMP V3 - checking SNMP V2 - checking community blabla - checking community public - checking SNMP V1 - checking community blabla - checking community public - ....
at least it should try checking the SNMP options. Which SNMP community strings did you configure in the DISCOVERY settings (Settings -> Misc -> Discovery -> SNMP Communities)? I do NOT need the exact credentials, but did you enter _anything_ there?
R.
There is only one community in there. If I add a second community (valid or otherwise), it works. I tried it a second time and deleted the second community, and again it failed.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: Discovery 1.2 not detecting SNMP

Post by gandalf »

Fixed in 1.2a
R
Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests