CACTID : TCP/ICMP Ping wont work ?

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

Moderators: Developers, Moderators

User avatar
ruud
Cacti User
Posts: 64
Joined: Tue Aug 22, 2006 3:07 am
Location: Rotterdam, The Netherlands
Contact:

CACTID : TCP/ICMP Ping wont work ?

Post by ruud »

After switching from the cmd.php to cactid for polling my devices i ran into trouble.

I run cacti as a special user "cactiuser" as recommended however cactid has some problems with this.

CACTI set for UDP Ping :

Code: Select all

cactiuser@<hostname> /root $ /usr/sbin/cactid
CACTID: Using cactid config file [/etc/cactid.conf]
CACTID: Version 0.8.6f starting
CACTID: WARNING: Falling back to UDP Ping due to not running asroot.  Please use "chmod xxx0 /usr/bin/cactid" to resolve.

CACTI set for ICMP Ping :

Code: Select all

cactiuser@<hostname> /root $ /usr/sbin/cactid
CACTID: Using cactid config file [/etc/cactid.conf]
CACTID: Version 0.8.6f starting
CACTID: WARNING: Falling back to UDP Ping due to not running asroot.  Please use "chmod xxx0 /usr/bin/cactid" to resolve.
CACTID: Host[2] ERROR: HOST EVENT: Host is DOWN Message: SNMP not performed due to setting or ping result, UDP: Ping timed out

As you can see, my cactid binary is available for every user, the mentioned chmod 7770 only makes it worse.

Code: Select all

cactiuser@<hostname> /root $ ls -al /usr/sbin/cactid
-rwxrwxrwx 1 root root 58516 Aug 22 09:33 /usr/sbin/cactid
If i run cactid as root user it will work just fine.

Am i doing something wrong or is this a bug ?
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

in Settings -> Poller -> Poller Host Availability Settings, see this comment :
Ping Type
The type of ping packet to sent. NOTE: ICMP requires that the Cacti Service ID have root privilages in Unix.
You can try to run cactid through sudo, or use the setuid root (chmod +s).
[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]
User avatar
ruud
Cacti User
Posts: 64
Joined: Tue Aug 22, 2006 3:07 am
Location: Rotterdam, The Netherlands
Contact:

Post by ruud »

Thank you for your reply.. However, i have this same problem using UDP ping !!..
User avatar
fmangeant
Cacti Guru User
Posts: 2345
Joined: Fri Sep 19, 2003 8:36 am
Location: Sophia-Antipolis, France
Contact:

Post by fmangeant »

Can you try this :

Code: Select all

# chmod +s /usr/sbin/cactid
[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]
Fred
Cacti User
Posts: 81
Joined: Fri Jan 03, 2003 11:43 am

Re: CACTID : TCP/ICMP Ping wont work ?

Post by Fred »

ruud wrote: As you can see, my cactid binary is available for every user, the mentioned chmod 7770 only makes it worse.

Code: Select all

cactiuser@<hostname> /root $ ls -al /usr/sbin/cactid
-rwxrwxrwx 1 root root 58516 Aug 22 09:33 /usr/sbin/cactid
The output from your ls -l is are '0777' permissions. The instructions were suggesting you make it setuid-root (basically makes it run as the root user instead of whoever executes it).

Note: You do *NOT* want it to be both world writeable and setuid. That's a major security hole. If you want cactid to run as root, you'd probably want to 'chmod 4711 /usr/sbin/cactid'. Then your ls -l should show '-rws--x--x root root' (notice the s in the 4th spot).
User avatar
zgamer
Cacti User
Posts: 86
Joined: Sat Sep 23, 2006 7:50 pm
Location: WI, USA

Post by zgamer »

Older post but found another fix, I had the same problem with cactid being in /usr/local/bin/cactid as mentioned in this post it was in /usr/sbin/cactid. In either case move the cactid file to /usr/bin/cactid and it will run.
User avatar
zunyhuang
Posts: 14
Joined: Sat Dec 29, 2007 4:50 am
Location: shenzhen.china

where is my cacti's cactid,i can't find it

Post by zunyhuang »

where is my cacti's cactid,i can't find it
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Either in the same directory as cactid itself, in /etc/cactid.conf or in the snmp directory, wherever you've put it.
Reinhard
killshoot
Cacti User
Posts: 84
Joined: Wed Mar 26, 2008 2:51 am

Post by killshoot »

Hi, I've tried to do a chmod +s to my spine without success.

My spine is in /usr/local/spine/bin/spine

What I need to do to fix the problem?

Best regards,

Vince
jamberbamber
Posts: 10
Joined: Thu Feb 14, 2008 1:38 am
Location: SF Bay, California

Post by jamberbamber »

killshoot wrote:Hi, I've tried to do a chmod +s to my spine without success.

My spine is in /usr/local/spine/bin/spine

What I need to do to fix the problem?

Best regards,

Vince
symlink it to /usr/bin/spine -- that just worked for me.
anglet
Posts: 16
Joined: Mon May 16, 2011 3:53 am

Re: CACTID : TCP/ICMP Ping wont work ?

Post by anglet »

didn't work for me :S

Cacti version: 0.8.7g with spine
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: CACTID : TCP/ICMP Ping wont work ?

Post by gandalf »

anglet wrote:didn't work for me :S

Cacti version: 0.8.7g with spine
Which OS are you using? Where is your spine located? What is entered under "Settings -> Paths"? Where is spine.conf located?
R.
anglet
Posts: 16
Joined: Mon May 16, 2011 3:53 am

Re: CACTID : TCP/ICMP Ping wont work ?

Post by anglet »

Eventually worked for me. This are my final settings:

Cacti version: 0.8.7g with spine

OS : Centos 5.6

Settings -> Paths : /usr/local/spine/bin/spine

spine.conf path is /usr/local/spine/etc/spine.conf

Crontab line is */5 * * * * root php /usr/local/share/va-cacti/poller.php > /tmp/poller.log 2>&1

Finally, I "chmod +s /usr/local/spine/bin/spine" and it worked.

Thanks!
quicky2g
Posts: 2
Joined: Mon Oct 28, 2013 10:26 am

Re: CACTID : TCP/ICMP Ping wont work ?

Post by quicky2g »

Tried everything else from this thread and still having the issue. ICMP ping isn't working for me. Any ideas?

Ubuntu 14.04.3 LTS
Cacti 0.8.8f
Spine 0.8.8b-1
Host Configuration
Host Configuration
Host.png (59.95 KiB) Viewed 8873 times
Devices List
Devices List
Devices List.png (10.54 KiB) Viewed 8873 times
Poller Configuration
Poller Configuration
Poller.png (61.67 KiB) Viewed 8873 times
Log
Log
Log.png (43.8 KiB) Viewed 8873 times
Spine.png
Spine.png (3.6 KiB) Viewed 8811 times
User avatar
classen
Cacti User
Posts: 116
Joined: Thu Nov 12, 2009 3:07 pm

Re: CACTID : TCP/ICMP Ping wont work ?

Post by classen »

Has anyone figure out how to get ICMP ping working on stubborn systems?
I'm running cacti 1.0.0 checked out from git repo (commit 1f8d38f787caf0609c4bbc90195b5d4a957790d8)
I'm also using the latest spine.
my spine binary is owned by root and I can ping from the command line either as root or as the cacti user.
Here is my crontab:

Code: Select all

[cacti@www cacti]$ crontab -l
# cacti spine poller
* * * * * /usr/bin/php -q /www/cacti/poller.php > /logs/cacti-cron.log 2>&1
I've been struggling with this for awhile now. I'd really like to get this sorted out.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests