EDIT: Advanced Ping Template Version 1.3 for Cacti 0.8.6g

Templates, scripts for templates, scripts and requests for templates.

Moderators: Moderators, Developers

Post Reply
Author
Message
PiercedKnob
Cacti User
Posts: 61
Joined: Tue Dec 06, 2005 8:36 am
Location: UK
Contact:

#106 Post by PiercedKnob » Mon Feb 06, 2006 10:48 am

nerdtalker wrote:This just plainly isn't working for me.

I've imported everything, and made sure that it's all executable by everyone, but when I create a new host, and give it the graph template of PING - Advanced Ping v1.3, I'm not prompted about anything like I'm supposed to, nor do the graphs generate anything.

I'm not sure if it matters, but I'm running PHP4.
I noticed that to get this working i need to first add a host (i have created a host template called Ping which adds the Advanced Ping template). Then once created, i then go to the Data Sources and create that. From there i then go to the Graph Management and create a graph for it.

This seems to work fine for me (eventually :) )

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

#107 Post by gandalf » Mon Feb 06, 2006 3:01 pm

To all:
Please switch to DEBUG mode (Settings-> Logging Level) and post log/cacti.log for exactly one poller's run. Don't forget to reset logging level afterwards or cacti will fill up your disk space...
Please append follwing information:
- parameters used (e.g. ICMP, UDP, TCP and Port if needed)
- Downed Host Detection settings
- Status of Host in Devices list
- whether you configured SNMP community string or not (please do not send your plain community string!)
- crontab settings for cacti (whole crontab entry, please)
Then please "su" to the user the poller is running as (usually: cactiuser) and run the advanced ping command against your failing host and post all this together
Reinhard

dawald
Posts: 22
Joined: Wed Feb 02, 2005 5:26 pm
Location: Zurich, Switzerland

packet size

#108 Post by dawald » Tue Feb 07, 2006 4:50 pm

hi there,

after struggeling with sockets support in php and permission problems I finally got it to work. What a great script. I guess there is no more need for the fping perl-script.

As we have applications running on our network with large packet size (up to 1500bytes), it would be great to enter the number of bytes a packet could have. What do you think about this feature ?

I guess a standard ICMP packet has a size of 56bytes ?

cheers... :roll:

nexus
Posts: 14
Joined: Fri Feb 03, 2006 6:59 pm

#109 Post by nexus » Tue Feb 07, 2006 6:52 pm

ok.trying to install this. when it comes time to import the xml I get the following error

Error: XML: Cacti version does not exist

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

#110 Post by TheWitness » Tue Feb 07, 2006 8:40 pm

I might add the packet size thingy to the next version of Cacti either the next point version or 0.9.

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

Life is an adventure, let yours begin with Cacti!

Author of MacTrack, Boost, CLog, SpikeKill, Platform RTM, DSStats, maintainer of Spine, lot's of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Central Plugin Repository
Central Templates Repository


I'm still out there people. Getting excited for Cacti 1.2. I think it will be a great release.

nerdtalker
Posts: 25
Joined: Sat Jan 15, 2005 8:27 pm

#111 Post by nerdtalker » Tue Feb 07, 2006 10:53 pm

lvm wrote:To all:
Please switch to DEBUG mode (Settings-> Logging Level) and post log/cacti.log for exactly one poller's run. Don't forget to reset logging level afterwards or cacti will fill up your disk space...
Please append follwing information:
- parameters used (e.g. ICMP, UDP, TCP and Port if needed)
- Downed Host Detection settings
- Status of Host in Devices list
- whether you configured SNMP community string or not (please do not send your plain community string!)
- crontab settings for cacti (whole crontab entry, please)
Then please "su" to the user the poller is running as (usually: cactiuser) and run the advanced ping command against your failing host and post all this together
Reinhard
I'm still having problems:

Paramters: Not prompted for any while creating device, associating graph template, or creating data source manually. Assumedly default.
Downed Host: Ping and SNMP, UDP ping, 400 timeout, 2 retry
SNMP comm: None, since the device is a remote host without SNMP (just google.com 64.233.167.99 )
crontab settings: */5 * * * * cacti php /usr/share/cacti/site/poller.php > /dev/null 2>&1
su to cacti, run advanced ping:

Code: Select all

[email protected]:/usr/share/cacti/site/scripts$ php ss_fping.php google.com 20 ICMP

Warning: socket_create() Unable to create socket [1]: Operation not permitted in /usr/share/cacti/site/lib/ping.php on line 96

Warning: socket_set_block() expects parameter 1 to be resource, boolean given in /usr/share/cacti/site/lib/ping.php on line 97

Warning: socket_create() Unable to create socket [1]: Operation not permitted in /usr/share/cacti/site/lib/ping.php on line 96

Warning: socket_set_block() expects parameter 1 to be resource, boolean given in /usr/share/cacti/site/lib/ping.php on line 97

Warning: socket_create() Unable to create socket [1]: Operation not permitted in /usr/share/cacti/site/lib/ping.php on line 96

Warning: socket_set_block() expects parameter 1 to be resource, boolean given in /usr/share/cacti/site/lib/ping.php on line 97

Warning: socket_create() Unable to create socket [1]: Operation not permitted in /usr/share/cacti/site/lib/ping.php on line 96

Warning: socket_set_block() expects parameter 1 to be resource, boolean given in /usr/share/cacti/site/lib/ping.php on line 97

Warning: socket_create() Unable to create socket [1]: Operation not permitted in /usr/share/cacti/site/lib/ping.php on line 96

Warning: socket_set_block() expects parameter 1 to be resource, boolean given in /usr/share/cacti/site/lib/ping.php on line 97

Warning: socket_create() Unable to create socket [1]: Operation not permitted in /usr/share/cacti/site/lib/ping.php on line 96

Warning: socket_set_block() expects parameter 1 to be resource, boolean given in /usr/share/cacti/site/lib/ping.php on line 97

Warning: socket_create() Unable to create socket [1]: Operation not permitted in /usr/share/cacti/site/lib/ping.php on line 96

Warning: socket_set_block() expects parameter 1 to be resource, boolean given in /usr/share/cacti/site/lib/ping.php on line 97

Warning: socket_create() Unable to create socket [1]: Operation not permitted in /usr/share/cacti/site/lib/ping.php on line 96

Warning: socket_set_block() expects parameter 1 to be resource, boolean given in /usr/share/cacti/site/lib/ping.php on line 97

Warning: socket_create() Unable to create socket [1]: Operation not permitted in /usr/share/cacti/site/lib/ping.php on line 96

Warning: socket_set_block() expects parameter 1 to be resource, boolean given in /usr/share/cacti/site/lib/ping.php on line 97

Warning: socket_create() Unable to create socket [1]: Operation not permitted in /usr/share/cacti/site/lib/ping.php on line 96

Warning: socket_set_block() expects parameter 1 to be resource, boolean given in /usr/share/cacti/site/lib/ping.php on line 97

Warning: socket_create() Unable to create socket [1]: Operation not permitted in /usr/share/cacti/site/lib/ping.php on line 96

Warning: socket_set_block() expects parameter 1 to be resource, boolean given in /usr/share/cacti/site/lib/ping.php on line 97

Warning: socket_create() Unable to create socket [1]: Operation not permitted in /usr/share/cacti/site/lib/ping.php on line 96

Warning: socket_set_block() expects parameter 1 to be resource, boolean given in /usr/share/cacti/site/lib/ping.php on line 97

Warning: socket_create() Unable to create socket [1]: Operation not permitted in /usr/share/cacti/site/lib/ping.php on line 96

Warning: socket_set_block() expects parameter 1 to be resource, boolean given in /usr/share/cacti/site/lib/ping.php on line 97

Warning: socket_create() Unable to create socket [1]: Operation not permitted in /usr/share/cacti/site/lib/ping.php on line 96

Warning: socket_set_block() expects parameter 1 to be resource, boolean given in /usr/share/cacti/site/lib/ping.php on line 97

Warning: socket_create() Unable to create socket [1]: Operation not permitted in /usr/share/cacti/site/lib/ping.php on line 96

Warning: socket_set_block() expects parameter 1 to be resource, boolean given in /usr/share/cacti/site/lib/ping.php on line 97

Warning: socket_create() Unable to create socket [1]: Operation not permitted in /usr/share/cacti/site/lib/ping.php on line 96

Warning: socket_set_block() expects parameter 1 to be resource, boolean given in /usr/share/cacti/site/lib/ping.php on line 97

Warning: socket_create() Unable to create socket [1]: Operation not permitted in /usr/share/cacti/site/lib/ping.php on line 96

Warning: socket_set_block() expects parameter 1 to be resource, boolean given in /usr/share/cacti/site/lib/ping.php on line 97

Warning: socket_create() Unable to create socket [1]: Operation not permitted in /usr/share/cacti/site/lib/ping.php on line 96

Warning: socket_set_block() expects parameter 1 to be resource, boolean given in /usr/share/cacti/site/lib/ping.php on line 97

Warning: socket_create() Unable to create socket [1]: Operation not permitted in /usr/share/cacti/site/lib/ping.php on line 96

Warning: socket_set_block() expects parameter 1 to be resource, boolean given in /usr/share/cacti/site/lib/ping.php on line 97

Warning: socket_create() Unable to create socket [1]: Operation not permitted in /usr/share/cacti/site/lib/ping.php on line 96

Warning: socket_set_block() expects parameter 1 to be resource, boolean given in /usr/share/cacti/site/lib/ping.php on line 97

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

#112 Post by gandalf » Wed Feb 08, 2006 4:11 am

Unable to create socket: This leads to ths assumption, that the user "cacti" which runs the poller does not have permissions for creating ICMP sockets. This is a common problem with unixes. Is it possible for you to change "20 ICMP" to sth like "20 TCP 80"?
Reinhard

nerdtalker
Posts: 25
Joined: Sat Jan 15, 2005 8:27 pm

#113 Post by nerdtalker » Wed Feb 08, 2006 9:09 pm

lvm wrote:Unable to create socket: This leads to ths assumption, that the user "cacti" which runs the poller does not have permissions for creating ICMP sockets. This is a common problem with unixes. Is it possible for you to change "20 ICMP" to sth like "20 TCP 80"?
Reinhard
Awesome, that seems to work. Now, how do I change that from within cacti, since I'm never prompted for that kind of information...

Code: Select all

XboxServ:/usr/share/cacti/site/scripts# php ss_fping.php google.com 20 TCP
min:63.4400 avg:82.7500 max:131.1000 dev:14.7154 loss:0.0000XboxServ:/usr/share/

vluce
Posts: 6
Joined: Wed Feb 23, 2005 9:51 am

#114 Post by vluce » Thu Feb 09, 2006 12:58 pm

I installed this template with cacti 0.8.6h under windows with iis, php5.1.2

I added extension=php_sockets.dll to php.ini

When I log in with admin account i have the folowwing result :
C:\Inetpub\wwwroot\cacti\scripts>php ss_fping.php 10.0.33.253 20 ICMP
min:9.6200 avg:10.2310 max:15.0300 dev:1.1365 loss:0.0000

When I log in with cacti account i have the folowing result :
C:\Inetpub\wwwroot\cacti\scripts>php ss_fping.php 10.0.33.253 20 ICMP
loss:100.00

I gave modification right to cacti user to the c:\php directory

What right should i give to cacti user ?

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

#115 Post by gandalf » Thu Feb 09, 2006 4:10 pm

nerdtalker wrote:
lvm wrote:Unable to create socket: This leads to ths assumption, that the user "cacti" which runs the poller does not have permissions for creating ICMP sockets. This is a common problem with unixes. Is it possible for you to change "20 ICMP" to sth like "20 TCP 80"?
Reinhard
Awesome, that seems to work. Now, how do I change that from within cacti, since I'm never prompted for that kind of information...

Code: Select all

XboxServ:/usr/share/cacti/site/scripts# php ss_fping.php google.com 20 TCP
min:63.4400 avg:82.7500 max:131.1000 dev:14.7154 loss:0.0000XboxServ:/usr/share/
Please goto Data Sources and select the appropriate one. There you'll find the input parms (Hope I remember this well ...)
Reinhard

Diceman
Cacti User
Posts: 142
Joined: Tue Oct 25, 2005 10:01 am

#116 Post by Diceman » Thu Feb 09, 2006 10:09 pm

nevermind my question, it is about the ICMP when not root error. is there a workaround for this besides pinging with tcp? does it really make a difference?

i am now having a problem with php and perl sessions not closing. does anyone else? i think i read something about it somewhere, but dont remember where. it doesnt do it all the time, just sometimes it will hold them in. also, since this script, a lot of my graphs are developing holes in them for some reason. any ideas?

nexus
Posts: 14
Joined: Fri Feb 03, 2006 6:59 pm

#117 Post by nexus » Mon Feb 13, 2006 12:43 pm

when importing the xml i get this error? anyone have any suggestions?

Error: XML: Cacti version does not exist.

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

#118 Post by gandalf » Mon Feb 13, 2006 1:18 pm

nexus wrote:when importing the xml i get this error? anyone have any suggestions?

Error: XML: Cacti version does not exist.
What cacti version are you running? If it is outdated, you should consider upgrading
Reinhard

nexus
Posts: 14
Joined: Fri Feb 03, 2006 6:59 pm

#119 Post by nexus » Mon Feb 13, 2006 1:19 pm

0.8.6g-1

User avatar
nahun
Cacti User
Posts: 92
Joined: Wed Feb 15, 2006 11:27 pm
Location: Idaho
Contact:

#120 Post by nahun » Wed Feb 15, 2006 11:37 pm

This is an awesome tool, works great for me.

I have one question. Right now, I'm using this to monitor devices behind a router with port maps to the devices. They are all usually like port 60010 to port 80. So that works fine. I'm also using the Threshold plugin to send alerts if the device stop responding. I'm using the average latency to test the threshold right now, but loss would be better I think since its not an average. But I would also like current ping latency to monitor instead of just the average. Just like the default ping template. Is this possible right now and I'm just stupid?

oh, just thought of this, anyone know if its possible to have a device be polled on a different port? So in the hostname field x.x.x.x:60010? I don't see a way to set the poller to use TCP ping instead of ICMP so I'm guessing there is no way.

Thanks

Post Reply