ICMP ping not working on cact 0.8.8d on centos7

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

Moderators: Developers, Moderators

Post Reply
db2000
Posts: 1
Joined: Tue Jun 30, 2015 2:37 pm

ICMP ping not working on cact 0.8.8d on centos7

Post by db2000 »

I installed cacti 0.8.8d using the instructions from this link: http://blog.network-outsourcing.de/cact ... ing-cacti/
I can not get icmp ping to work udp and tcp ping work I am using the cmd.php poller.
Thanks for any help.
cigamit
Developer
Posts: 3367
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Re: ICMP ping not working on cact 0.8.8d on centos7

Post by cigamit »

You don't really give much info. Is ICMP not working when viewing a device, or do you mean when trying to graph ping time for a device? Is your poller running as root? I believe root is generally needed for ICMP (or setuid), whereas if you followed those instructions you are running as a different user.
bruceg
Posts: 1
Joined: Sat Aug 15, 2015 12:32 pm

Re: ICMP ping not working on cact 0.8.8d on centos7

Post by bruceg »

Well - seeing as I am having a similar problem, let me chime in.

I have Cacti 0.8.8b running on CentOS 7.0. I am monitoring my Cisco router and switch via snmp, and get stats. I installed the Advanced Ping addon, and can ping devices using UDP ping and TCP ping (well, on devices where I have a udp or tcp port open to ping). When I try to ping devices using ICMP Echo, the ping fails.

Cacti is not running under root, it is running under Cacti userid. I did the setuid bit on /bin/ping (I think it was chmod 4755 /bin/ping). Is there a workaround to get icmp ping to work for the Cacti user? I'd rather not run as root.

I'm not sure if I'm going about this the wrong way. I can log in to my CentOS server with user privileges and ping fine. Not sure if that is an icmp echo ping, or?

*****
Edited. I don't see an option to delete my post. I am running an older version of Cacti (0.88.b). I think I'll upgrade to the current version first before messing with problem determination.
r_kleineisel
Posts: 9
Joined: Wed Jan 26, 2011 4:14 am

Re: ICMP ping not working on cact 0.8.8d on centos7

Post by r_kleineisel »

I seem to have the same problem.

Let me give some more detail:
I am running CentOS Linux release 7.1.1503 (Core) x86_64 with cacti-0.8.8b-7.el7.noarch rpm package. Poller is spine (0.8.8a-1).

Getting ICMP ping graphs via the poller works fine. Spine can ICMP ping my devices and I get correct graphs in the "Unix - Ping Latency" graph template.

Pinging hosts with ping.php as in the " host.php?action=edit" page does not work. It shows a "ICMP ping Timed out" error. Checking with tcpdump shows that no ICMP packets get sent out of the server.

These are the settings for the ping binaries:
-rwsr-sr-x. 1 root root 44896 Jun 24 00:04 /usr/bin/ping
-rwxr-xr-x. 1 cacti cacti 2584 Jun 27 2014 ss_fping.php
-rw-r--r--. 1 cacti cacti 20754 Aug 25 13:38 ping.php

The cacti cron process runs as user cacti.

When I open a shell as user cacti I can ping.
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: ICMP ping not working on cact 0.8.8d on centos7

Post by phalek »

This may be a SELinux issue. Can you see anything in the "audit" logs ?
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
r_kleineisel
Posts: 9
Joined: Wed Jan 26, 2011 4:14 am

Re: ICMP ping not working on cact 0.8.8d on centos7

Post by r_kleineisel »

I do not get an entry in audit.log when I click on host.php?action=edit .
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: ICMP ping not working on cact 0.8.8d on centos7

Post by phalek »

try disabling SELinux and check if it's working then. If it is you will have to configure SELinux to allow setuid execution by the http server
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
r_kleineisel
Posts: 9
Joined: Wed Jan 26, 2011 4:14 am

Re: ICMP ping not working on cact 0.8.8d on centos7

Post by r_kleineisel »

There are no new lines in audit.log.

I think I hit this problem:
https://www.centos.org/forums/viewtopic ... 17&t=49172
r_kleineisel
Posts: 9
Joined: Wed Jan 26, 2011 4:14 am

Re: ICMP ping not working on cact 0.8.8d on centos7

Post by r_kleineisel »

When I set selinux to permissive ICMP ping in the device page does work.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests