Cacti thinks device is down, but snmpwalk works fine

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
MaffooClock
Posts: 17
Joined: Wed Jul 12, 2006 11:25 pm

Cacti thinks device is down, but snmpwalk works fine

Post by MaffooClock »

I don't think this is a windows-specific question, so I hope I'm not posting this in the wrong place.

I have a Linux-based Cacti box collecting data from three Linux-based boxes and three Windows 2003 boxes.

One of the Windows 2003 hosts (Melbourne) suddenly shows "Down" and no data is being graphed anymore. However, Melbourne is online and working perfectly. When clicking the name of the device to view its settings, the heading at the top does produce SNMP data:

Code: Select all

System: Hardware: x86 Family 15 Model 0 Stepping 7 AT/AT COMPATIBLE - Software: Windows Version 5.2 (Build 3790 Uniprocessor Free)
Uptime: 85134 (0 days, 0 hours, 14 minutes)
Hostname: MELBOURNE
Location:
Contact: Matthew Clark
Also, performing an snmpwalk on Melbourne from the Cacti PC produces thousands of lines of data:

Code: Select all

root@Woolhara:~# snmpwalk -v 2c -c public melbourne
SNMPv2-MIB::sysDescr.0 = STRING: Hardware: x86 Family 15 Model 0 Stepping 7 AT/AT COMPATIBLE - Software: Windows Version 5.2 (Build 3790 Uniprocessor Free)
SNMPv2-MIB::sysObjectID.0 = OID: SNMPv2-SMI::enterprises.311.1.1.3.1.2
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (136295) 0:22:42.95
SNMPv2-MIB::sysContact.0 = STRING: Matthew Clark
SNMPv2-MIB::sysName.0 = STRING: MELBOURNE
SNMPv2-MIB::sysLocation.0 = STRING:
SNMPv2-MIB::sysServices.0 = INTEGER: 79
<snip>
Nothing has changed as far as I can think of. It should go without saying, but I have ensured the SNMP service is running on Melbourne. I have rebooted Melbourne. I have removed the SNMP service and re-installed on Melbourne. Baed on the conditions, I didn't think these actions would help, but you always have to start at the bottom and work your way up...

I even deleted the entire device and all associated graphs from Cacti and re-created from scratch. Still down. This would seem to isolate the problem to Melbourne itself, but that's contradictory to the fact that snmpwalk returns (lots of) data.

Yet, all other devices in Cacti are working -- no issues at all.

So why would Cacti think a host is down, and what could I possibly be missing? What checks can I execute that might narrow down the possibilities? I am highly proficient with PHP, Linux, and Cacti, but I am not knowledgable enough about the internals of Cacti to go rooting around in the source without a flashlight...
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

What Downed Host Detection are you using? If ping, I suggest you switch to ICMP instead of UDP.
MaffooClock
Posts: 17
Joined: Wed Jul 12, 2006 11:25 pm

Post by MaffooClock »

"Ping and SNMP" is my current Downed Host Detection method.
I suppose I can have cacti run as root and change the UDP ping to ICMP...
User avatar
fmangeant
Cacti Guru User
Posts: 2345
Joined: Fri Sep 19, 2003 8:36 am
Location: Sophia-Antipolis, France
Contact:

Post by fmangeant »

Hi

or you can use "SNMP" as downed detection method, and run the poller as "cactiuser".
[size=84]
[color=green]HOWTOs[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15353]Install and configure the Net-SNMP agent for Unix[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=26151]Install and configure the Net-SNMP agent for Windows[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=28175]Graph multiple servers using an SNMP proxy[/url][/list]
[color=green]Templates[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15412]Multiple CPU usage for Linux[/url]
[*][url=http://forums.cacti.net/viewtopic.php?p=125152]Memory & swap usage for Unix[/url][/list][/size]
MaffooClock
Posts: 17
Joined: Wed Jul 12, 2006 11:25 pm

Post by MaffooClock »

Hot dog. Running the poller as root did the trick (I left the Down Host Detection at "Ping and SNMP", but changed ping type to ICMP).

I'll try fmangeant's suggestion next...
torstentfk
Cacti User
Posts: 367
Joined: Tue Apr 05, 2005 9:52 am
Location: Munich, Germany

Post by torstentfk »

HI,

I have now the same problem:
the proxy-server is reachable and respones to the snmp queries; snmpget and snmpgetnext to get OIDs. .1.3.6.1.2.1.1.3.0 und .1.3.6.1.2.1.1.1.0. is working; server is pingable.

The poller (poller.php) logs that the host is not reachable.
If I use the method "ping" cacti/poller.php is recaching the server each polling cycle.

I use php5 with snmp support, debian. The server is very restrictive to snmp polls. Which OIDs and trees must I alow that cacti assumes that the host is up?

Torsten
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

In latest 0.8.6j it is .1 and .1.3. Cacti uses snmpgetnext on those OIDs
Reinhard
torstentfk
Cacti User
Posts: 367
Joined: Tue Apr 05, 2005 9:52 am
Location: Munich, Germany

Post by torstentfk »

gandalf wrote:In latest 0.8.6j it is .1 and .1.3. Cacti uses snmpgetnext on those OIDs
Reinhard
Hi Reinhard, the new guru...

on the CLI I get fetch these OIDs and get a correct answer. But the server are still down in cacti.

Torsten
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Seems, that a tcpdump/wireshark trace is required ...
Reinhard
torstentfk
Cacti User
Posts: 367
Joined: Tue Apr 05, 2005 9:52 am
Location: Munich, Germany

Post by torstentfk »

gandalf wrote:Seems, that a tcpdump/wireshark trace is required ...
Reinhard
OK:

Code: Select all

>#tcpdump -s 1500 host XXXX
10:27:17.684592 IP cacti-srv 32791 > proxy.3401: UDP, length 38
10:27:17.685234 IP proxy > cacti-srv: ICMP proxy udp port 3401 unreachable, length 74
Settings for the poller: Method:SNMP-only, Ping:UDP.
If I change these settings, there is no change at the tcpdump.
I do not see any snmp-send request as the poller starts.

Torsten
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

If you are polling a squid proxy, this IS the snmp request! Squid receives SNMP requests at port 3401 by default. But I'm waiting for the UDP ping request to come up: nothing more found in the trace? The UDP ping should come first!
Reinhard
torstentfk
Cacti User
Posts: 367
Joined: Tue Apr 05, 2005 9:52 am
Location: Munich, Germany

Post by torstentfk »

Hi,

aeh --- you are right; I was searching the data templates and found this port (3401) . This was not accessable through the firewall. So cacti checks first and then polls - if it can! I thought that the proxy query is a snmp:161 poll, that was wrong.

Sorry - my fault.

Torsten
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

So, no bug then? If it is, please open one at bugs.cacti.net. Be as specific as possible. Also, please note, I have versioned ping.php. Chech that first before placing your bug report.

Thanks,

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Criggie
Posts: 16
Joined: Sat Jul 21, 2007 4:30 am
Location: Christchurch, New Zealand
Contact:

Downed Host Detection settings that work

Post by Criggie »

fmangeant wrote:...you can use "SNMP" as downed detection method, and run the poller as "cactiuser".
That worked perfectly for me -

Downed Host Detection SNMP Reliable
Ping ICMP ping

and poller runs as cactiuser.

Now, the two hosts in question were freeBSD and windows XP. The linux boxes and printers on the network were fine the whole time.

How can I modify the records to note that neither machien was really down in that time? My freeBSD box had a 100% uptime, now its down to 99.5%
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests