Device down if use ICMP in Availability/Reachability Options

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

DeatherT
Posts: 5
Joined: Tue Jul 07, 2009 3:47 am
Location: Russia

Device down if use ICMP in Availability/Reachability Options

Post by DeatherT »

I have a problem with 'Availability/Reachability Options' in device settings.
If I use for reachability device ping ICMP option, then device has status 'down', but ping is successfully:
Ping Results
ICMP Ping Success (1.342 ms)
Even if use 'Ping or SNMP' and make select ICMP, device has status 'down', but SNMP and ICMP is successfully.
If use TCP(UDP) ping in this method and it is unsuccessfully, then device has status 'up'. It is normal so as SNMP is working.
It has bug if use both ICMP method (Single and Mix). In case use single TCP(UDP)or SNMP or mix both, it is working ok.

It happened after upgrade on version 0.8.7e.
User avatar
TheWitness
Developer
Posts: 16997
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

If polling with spine, you need to set the setuid bit to root and change ownership to root as well. Only after this will ICMP ping work in Spine.

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?
fcorazza
Posts: 9
Joined: Fri Jul 17, 2009 6:09 am

Post by fcorazza »

TheWitness wrote:If polling with spine, you need to set the setuid bit to root and change ownership to root as well. Only after this will ICMP ping work in Spine.

TheWitness
Not correct. I'm having the same issue even with Spine chown'd as root with setuid set on it, and still failing to recognize alive host through ICMP. Setting the avail method to SNMP only Spine starts to work again.

Running on Solaris 10 sparc 64bit. See my thread posted earlier on this forum.
DeatherT
Posts: 5
Joined: Tue Jul 07, 2009 3:47 am
Location: Russia

Post by DeatherT »

TheWitness wrote:If polling with spine, you need to set the setuid bit to root and change ownership to root as well. Only after this will ICMP ping work in Spine.

TheWitness
Sorry, but I am not using Spine. =)
richcarroll
Posts: 2
Joined: Thu Jul 23, 2009 2:49 pm

Post by richcarroll »

I am a Cacti Noob, but I am learning fast. It seems that it will only do the availability check if its also logging data. All of my devices wont come up available unless a add a data source to that device first.

I added a "Unix - Ping Host" data source to each of my devices. The status is "Up" for the device, but my log looks like this:


Code: Select all

07/23/2009 03:40:38 PM - CMDPHP: Poller[0] Host[28] DS[101] CMD: /usr/bin/perl /usr/local/share/cacti/scripts/ping.pl 10.10.254.208, output: U
07/23/2009 03:40:38 PM - CMDPHP: Poller[0] Host[28] DS[101] WARNING: Result from CMD not valid. Partial Result: U
07/23/2009 03:40:38 PM - CMDPHP: Poller[0] Host[28] PING: UDP Ping Success (4.22 ms) 
I can ping from a command prompt and when I run the command it looks good:

[rich@cacti ~]$ /usr/bin/perl /usr/local/share/cacti/scripts/ping.pl 10.10.254.205
4.823[rich@cacti ~]$

Anyone know why I can ping it and I can use the ping.pl script just fine, but the cacti poller cant make it work?
User avatar
TheWitness
Developer
Posts: 16997
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Sorry, Solaris does not support the setuid bit manipulation, rather there is another method. Please seek out the source code.

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?
User avatar
TheWitness
Developer
Posts: 16997
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

DeatherT wrote:
TheWitness wrote:If polling with spine, you need to set the setuid bit to root and change ownership to root as well. Only after this will ICMP ping work in Spine.

TheWitness
Sorry, but I am not using Spine. =)
This is a different subject, that if scripts. Pleas run the ping.pl manually and determine the error in it. If found, submit patch to buga.cacti.net

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?
DeatherT
Posts: 5
Joined: Tue Jul 07, 2009 3:47 am
Location: Russia

Post by DeatherT »

Manualy 'ping.pl' script is executed without errors. And as I wrote in start of post, in Cacti the ICMP ping is executed without error, but device has status down.
For examle:
Image

but

Image

In doing so, I use the method 'Ping or SNMP'
User avatar
TheWitness
Developer
Posts: 16997
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

If you are using spine, it can only do ICMP ping if the binary is setuid and owned by root. This is likely your case. If using Solaris, it's much more complicated IMHO. This is a restriction of the UNIX/Linux kernels due to the fact that ping (aka RAW Sockets) are "bad".

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?
DeatherT
Posts: 5
Joined: Tue Jul 07, 2009 3:47 am
Location: Russia

Post by DeatherT »

I have a deja vu.
As I already wrote, I am don't using Spine and manualy 'ping.pl' script is executed without errors. My OS is FreeBSD 7.0.
I can else understand that not working ICMP, but I don't understand why if select in 'Downed Device Detection' option 'Ping or SNMP' device has status 'down', if SNMP is working!?

P.S. What is more... On version Cacti 0.8.7d all worked correctly.
richcarroll
Posts: 2
Joined: Thu Jul 23, 2009 2:49 pm

couple thoughts

Post by richcarroll »

A couple different issues, The ping.pl file is used to log ping latency. Its not what is used to determine if a device is up or not. There is a ping.php class that cacti uses. So ping.pl working fine doesnt mean that cacti's icmp ping is working. Also, I may be wrong here, but it looks like cacti doesnt even do the check for up or down unless you have a data source for that device. So just to get things working I added a ping latency data source to each device and that seemed to make them correctly report up or down. Also, to make ping.pl work correctly I had to add the full path for ping in the script (/sbin/ping), not sure why I had to do this, but it fixed my ping latency data.

So to fix your problem you need to check the cacti log and see what it says about the devices you have down. My guess is there is nothing in the log and it could be fixed by adding a ping latency data source. If there is wierd stuff in the log post it.


DeatherT wrote:I have a deja vu.
As I already wrote, I am don't using Spine and manualy 'ping.pl' script is executed without errors. My OS is FreeBSD 7.0.
I can else understand that not working ICMP, but I don't understand why if select in 'Downed Device Detection' option 'Ping or SNMP' device has status 'down', if SNMP is working!?

P.S. What is more... On version Cacti 0.8.7d all worked correctly.
User avatar
TheWitness
Developer
Posts: 16997
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Please insure that you are using the latest version of spine 0.8.7e. Confirmed this morning that the checks are Aok in the code.

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?
jjbailey
Posts: 1
Joined: Sat Jun 26, 2010 5:56 pm

Re: Device down if use ICMP in Availability/Reachability Opt

Post by jjbailey »

I just hit this bug. Here is the setup for a device that spine will not poll:

Downed Device Detection: Ping
Ping Method: ICMP Ping
SNMP Version: Version 2

NB:
1) The device is not reachable via SNMP due to a bad firewall rule
2) We are not using SNMP for this device anyway

# spine --verbosity=50 --first=120 --last-120

The output shows spine is trying to use SNMP to check reachability despite the fact that the availability check is ping.
eberkut
Posts: 19
Joined: Wed Jul 19, 2006 4:15 am

Post by eberkut »

I seem to have a similar problem.

I'm using Cacti 0.8.7g and Spine 0.8.7g. I have a few Windows boxes that I query with custom scripts. The scripts are working fine. I check every data Data Input Methods and Data Templates and they're fine too.

My hosts are set with ICMP ping as the host availability detection method and SNMP is set as not in use.

If I manually run spine, there are no errors. If I set the cmd.php as the poller, I have no issue. However, if I set spine as the poller, the rrds are not populated. Actually my custom scripts are apparently not even run since it should take 60 seconds for spine to run and the cacti.log file says it only ran for a bit over 1 second. As a result, my graphs are created but never updated.

In Devices, my Windows boxes are marked as Down even though if I click on them, it says ICMP Ping Success. Setting spine as setuid has no effect.

I have time to work with The Cacti Group to try to figure out the issue.
ABX
Cacti User
Posts: 68
Joined: Thu Mar 01, 2007 5:55 am

Re:

Post by ABX »

eberkut wrote:I seem to have a similar problem.

I'm using Cacti 0.8.7g and Spine 0.8.7g. I have a few Windows boxes that I query with custom scripts. The scripts are working fine. I check every data Data Input Methods and Data Templates and they're fine too.

My hosts are set with ICMP ping as the host availability detection method and SNMP is set as not in use.

If I manually run spine, there are no errors. If I set the cmd.php as the poller, I have no issue. However, if I set spine as the poller, the rrds are not populated. Actually my custom scripts are apparently not even run since it should take 60 seconds for spine to run and the cacti.log file says it only ran for a bit over 1 second. As a result, my graphs are created but never updated.

In Devices, my Windows boxes are marked as Down even though if I click on them, it says ICMP Ping Success. Setting spine as setuid has no effect.

I have time to work with The Cacti Group to try to figure out the issue.
I had the exact same issue, setting /usr/sbin/spine as setuid solved my problem.
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests