EDIT: Advanced Ping Template Version 1.3 for Cacti 0.8.6g

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

Moderators: Developers, Moderators

Post Reply
treimers
Cacti User
Posts: 57
Joined: Thu Mar 17, 2005 9:53 pm

Help!! what am I doing wrong setting up a host for pinging??

Post by treimers »

I've set up a ping on a host outside.
Created the 'device' as a Windows/XP host, and as a type 'none'
since SNMP isn't involved here.

when I select that device, create a graph, I can then select the AdvPing 1.3

When I run this, I get good results
[root@acslinux cacti]# /usr/bin/php /var/www/html/cacti/scripts/ss_fping.php esis.ncwise.org 10 TCP 80
min:23.8300 avg:31.9010 max:81.2800 dev:17.5068 loss:0.0000[root@acslinux cacti]#

So I don't know what the following error is:

RRDTool Says:

ERROR: opening '/var/www/html/cacti/rra/ncwise_dev_583.rrd': No such file or directory


It looks like I've done something dumb creating my device and linking the graph output to it.....

What am I missing in creating a host?

Newbie directions on using this would be handy just now-- unlike many of you, I'm not converting from existing stuff... just trying to get started with pinging a host...
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

You surely left the community string for that host empty to suppress "availabilty" checks?
Reinhard
Last edited by gandalf on Thu Jun 15, 2006 4:01 pm, edited 1 time in total.
treimers
Cacti User
Posts: 57
Joined: Thu Mar 17, 2005 9:53 pm

ah..

Post by treimers »

so that's how you disable SNMP for a host..

I thought there'd be a checkbox smoewheres....

will try that..

One other host is working fine-- albeit that it returns all pings at 100ms or better... which aint' true from the commandline of the Linuxbox...
User avatar
foxtratz
Posts: 14
Joined: Thu Sep 29, 2005 12:03 am
Location: Cagayan de Oro,Philippines
Contact:

I get nan data

Post by foxtratz »

Hi Lvm,

I am using cacti0.8.6h, I only imported the advanced ping template since the ss_fping.php and ping.php already exists in the cacti directory. Im wondering why I am getting nan values or my graph is only red. I tried manually the ss_fping.php script using script server and the result is good. However when I used rrdtool fetch on the database all I can see is nan. Anybody has any idea here? or Do I have to overwrite the existing ss_fping.php or ping.php with the ones you posted.

Thanks and Good Day
"Knowledge is Power"
treimers
Cacti User
Posts: 57
Joined: Thu Mar 17, 2005 9:53 pm

ss_fping and ping.php

Post by treimers »

That's what I did--- just overwrote all of it...

Unfortunately, I cannot get away from some RRDTool errors,
and the one host I have pinging on ICMP just reports 100%... not actual packet statistics..
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: ss_fping and ping.php

Post by gandalf »

treimers wrote:That's what I did--- just overwrote all of it...
Yep, make sure to use the latest version
Unfortunately, I cannot get away from some RRDTool errors,
and the one host I have pinging on ICMP just reports 100%... not actual packet statistics..
When running on linux, ICMP will require special permissions. Run in DEBUG mode for one polling cycle to check. Else, please be more specific as to your rrdtool error
Reinhard
CoolTom
Posts: 7
Joined: Wed May 24, 2006 8:56 am

no reply

Post by CoolTom »

everything is ok, but when is the destination down (no ping reply) i didnt get RED color like 100% packet loss but this "WHITE HOLE". Where is problem? Or its correct? May be its when ping get answer:

Reply from xx.xx.xx.85: Destination host unreachable.

thnx for help or answ :-) Tom

--
end where is green staff at AVG LATENCY 0:-)
Attachments
ping.JPG
ping.JPG (79.84 KiB) Viewed 9512 times
abadaba
Cacti User
Posts: 52
Joined: Wed Nov 23, 2005 10:43 pm

Post by abadaba »

How do i give apache the rights too run this tool too open the socket. I am running CentOS. I can run it from CLI root all day long, and it outputs correctly, all my files are chown apache. In fact i would love it, if someone made a permissions sheet too go with the linux install. I followed the directions of the PDF how to, which was awesome. But i ran into numerous permision problems, with extra templates...
| Cacti 0.8.6h | MySQL 5.0.22 | PHP 5.1.2
|Apache2.20 | RRDtool 1.2.13 | CentOS 4.3 | P4 3200Mhz | 2.5GB |
Sem
Posts: 29
Joined: Fri Mar 25, 2005 3:05 am
Contact:

Post by Sem »

Does it work under Windows?

I got:
C:\>c:\php\php C:\Inetpub\wwwroot\cacti\scripts\ss_fping.php ss_fping 172.16.1.1 20 ICMP
Cannot find module (IP-MIB): At line 0 in (none)
Cannot find module (IF-MIB): At line 0 in (none)
Cannot find module (TCP-MIB): At line 0 in (none)
Cannot find module (UDP-MIB): At line 0 in (none)
Cannot find module (SNMPv2-MIB): At line 0 in (none)
Cannot find module (SNMPv2-SMI): At line 0 in (none)
Cannot find module (UCD-SNMP-MIB): At line 0 in (none)
Cannot find module (UCD-DEMO-MIB): At line 0 in (none)
Cannot find module (SNMP-TARGET-MIB): At line 0 in (none)
Cannot find module (SNMP-VIEW-BASED-ACM-MIB): At line 0 in (none)
Cannot find module (SNMP-COMMUNITY-MIB): At line 0 in (none)
Cannot find module (UCD-DLMOD-MIB): At line 0 in (none)
Cannot find module (SNMP-FRAMEWORK-MIB): At line 0 in (none)
Cannot find module (SNMP-MPD-MIB): At line 0 in (none)
Cannot find module (SNMP-USER-BASED-SM-MIB): At line 0 in (none)
Cannot find module (SNMP-NOTIFICATION-MIB): At line 0 in (none)
Cannot find module (SNMPv2-TM): At line 0 in (none)

Notice: Undefined variable: method in C:\Inetpub\wwwroot\cacti\scripts\ss_fping.php on line 56

Warning: socket_connect() expects parameter 3 to be long, string given in C:\Inetpub\wwwroot\cacti\lib\ping.php on line 220

Warning: socket_write(): unable to write to socket [0]: A request to send or receive data was disallowed because the socket is not connected and (when sending on a datagram socket using a sendto call) no address was supplied.
in C:\Inetpub\wwwroot\cacti\lib\ping.php on line 244

Notice: Undefined variable: method in C:\Inetpub\wwwroot\cacti\scripts\ss_fping.php on line 56

Warning: socket_connect() expects parameter 3 to be long, string given in C:\Inetpub\wwwroot\cacti\lib\ping.php on line 220

Warning: socket_write(): unable to write to socket [0]: A request to send or receive data was disallowed because the socket is not connected and (when sending on a datagram socket using a sendto call) no address was supplied.
in C:\Inetpub\wwwroot\cacti\lib\ping.php on line 244

Notice: Undefined variable: method in C:\Inetpub\wwwroot\cacti\scripts\ss_fping.php on line 56

Warning: socket_connect() expects parameter 3 to be long, string given in C:\Inetpub\wwwroot\cacti\lib\ping.php on line 220

And so on...
Sem
Posts: 29
Joined: Fri Mar 25, 2005 3:05 am
Contact:

Post by Sem »

Sorry, it works. The command line was wrong.
abadaba
Cacti User
Posts: 52
Joined: Wed Nov 23, 2005 10:43 pm

Post by abadaba »

Anyone have an answer too my question above? :roll:
| Cacti 0.8.6h | MySQL 5.0.22 | PHP 5.1.2
|Apache2.20 | RRDtool 1.2.13 | CentOS 4.3 | P4 3200Mhz | 2.5GB |
tsnww
Posts: 17
Joined: Wed Mar 15, 2006 8:59 am

Which versions of ss_fping and ping.php to use??/

Post by tsnww »

Ok on the first page of this thread is the template, ss_fping, and ping.php.

On page 3, there are newer? versions of these utilities.

So which one do I use? I ask because on the commandline I get correct ping data, but in the graphs the ping latency is too low. (by about 6 ms)

It's cool to show graphs, but not when they are incorrect.

I'm running version 0.86h on FC4 with php5, rrdtool 1.2 and advanced ping 1.3 template.
abadaba
Cacti User
Posts: 52
Joined: Wed Nov 23, 2005 10:43 pm

Post by abadaba »

Still no answer on the permissions...I would like too know how too allow this ping script too run...Currently everything is set too run as Apache..Everything runs fine but this script...How would i go about giving the script permisions
| Cacti 0.8.6h | MySQL 5.0.22 | PHP 5.1.2
|Apache2.20 | RRDtool 1.2.13 | CentOS 4.3 | P4 3200Mhz | 2.5GB |
tsnww
Posts: 17
Joined: Wed Mar 15, 2006 8:59 am

^permissions...

Post by tsnww »

I think the deal is ping has to be done from root. Run the poller as root and I'll bet you it works... I know that's not ideal but...
abadaba
Cacti User
Posts: 52
Joined: Wed Nov 23, 2005 10:43 pm

Post by abadaba »

so chown it root:root? If thats the case, then ive already done that.
| Cacti 0.8.6h | MySQL 5.0.22 | PHP 5.1.2
|Apache2.20 | RRDtool 1.2.13 | CentOS 4.3 | P4 3200Mhz | 2.5GB |
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests