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
User avatar
Gabriel
Posts: 28
Joined: Sun Jan 04, 2009 7:08 pm
Location: Auckland, NZ

Post by Gabriel »

I think there is a great deal of difference between the ping.php that you suggested (Copyright (C) 2004 Larry Adams & Ian Berry)and one that I have ( Copyright (C) 2004-2008 The Cacti Group). One from Cacti group has significantly more code when i did a compare.

Once I applied ping.php you suggested the all pings stopped working, complained with the message 'ping not performed due to setting'
(Did I mention I forgot to turn email notification off?...hehe)

so No joy yet..

Cheers,
Gabriel
Alberello
Posts: 6
Joined: Tue Nov 21, 2006 10:16 am
Contact:

Post by Alberello »

there is un other ping template for use it until this bug will be solved?
flipflap
Cacti User
Posts: 142
Joined: Sat Jul 09, 2005 3:13 pm

Post by flipflap »

Hi,

My pings with "ICMP" settings suddenly stopped working. What do I check?

I did from windows cmd line --> php C:\Apache2\htdocs\cacti\scripts\ss_fping.php ss_fping 10.196.0.50 5 ICMP

i got the ff output

PHP Notice: Undefined variable: method in C:\Apache2\htdocs\cacti\scripts\ss_fp
ing.php on line 60
PHP Notice: Undefined variable: method in C:\Apache2\htdocs\cacti\scripts\ss_fp
ing.php on line 60
PHP Notice: Undefined variable: method in C:\Apache2\htdocs\cacti\scripts\ss_fp
ing.php on line 60
PHP Notice: Undefined variable: method in C:\Apache2\htdocs\cacti\scripts\ss_fp
ing.php on line 60
PHP Notice: Undefined variable: method in C:\Apache2\htdocs\cacti\scripts\ss_fp
ing.php on line 60
PHP Notice: Undefined variable: method in C:\Apache2\htdocs\cacti\scripts\ss_fp
ing.php on line 60
PHP Notice: Undefined variable: method in C:\Apache2\htdocs\cacti\scripts\ss_fp
ing.php on line 60
PHP Notice: Undefined variable: method in C:\Apache2\htdocs\cacti\scripts\ss_fp
ing.php on line 60
PHP Notice: Undefined variable: method in C:\Apache2\htdocs\cacti\scripts\ss_fp
ing.php on line 60
PHP Notice: Undefined variable: method in C:\Apache2\htdocs\cacti\scripts\ss_fp
ing.php on line 60
PHP Notice: Undefined variable: method in C:\Apache2\htdocs\cacti\scripts\ss_fp
ing.php on line 60
PHP Warning: Division by zero in C:\Apache2\htdocs\cacti\scripts\ss_fping.php o
n line 97
min:9999.9900 avg:0.0000 max:0.0000 dev:0.0000 loss:107.8854

Btw am I running it right?

any help would be appreciated. Thanks

EDIT: got it working. lost my admin rights to the box
dononeil
Cacti User
Posts: 194
Joined: Wed Aug 06, 2008 4:45 pm

Post by dononeil »

I've got an issue that is quite strange:

From my Cacti box, I am seeing nearly 150 Ping requests go out to my devices within .1 seconds (1/10th of a second).

It appears as though they are ALL originating from the Avanced Ping template, which is setup with the defaults of 20 pings, with a polling cycle every 5 minutes.

I discovered this when one of my routers was displaying DOS protects from excessive pings.... I sniffed the line and this is what shows up (screen shot attached with a small sample).

Anyone have any ideas WHY this is sending out so many pings????
Attachments
ping.PNG
ping.PNG (115.06 KiB) Viewed 13248 times
sabin16
Posts: 7
Joined: Mon Apr 06, 2009 5:08 pm

Post by sabin16 »

Does anyone have a copy of the ping.php that is the most updated one? I replaced mine with the one on this thread hoping to get my advanced ping to show something and I forgot to just rename my old one to .old.

Also, does anyone have any suggestions on how I can get advanced ping to work? I don't get a graph when I try to run it.

Thanks,
Shane
aaronsegura
Posts: 25
Joined: Fri Jan 30, 2009 12:56 pm

Post by aaronsegura »

Thanks for making this template/script combo. It seems to work really well on most of my hosts.

However... (c'mon, you knew that was coming :))

On one of my systems, the graph data doesn't match the legend. For instance, the latency on one graph shows a max of 247.95ms, but the graph plainly shows a max well over 400 for this time period (see attached)

I looked in the RRD and found the 247.95ms value, but I was unable to find the other crazy value

<edit>
Cacti v: 0.8.7d
Spine v: 0.8.7c
RRDtool v: 1.2.30
PHP v: 5.1.6
</edit>

Any ideas?
Attachments
AdvancedPing_01.png
AdvancedPing_01.png (16.32 KiB) Viewed 13104 times
sabin16
Posts: 7
Joined: Mon Apr 06, 2009 5:08 pm

Post by sabin16 »

aaronsegura when you installed your advanced ping did you simply copy the new ping.php and ss_fping.php into the correct directories and then import the template? Also, would you mind posting up a copy of your ping.php. Mine killed the pings that used DNS that I was already running.

Thanks,
Shane
aaronsegura
Posts: 25
Joined: Fri Jan 30, 2009 12:56 pm

Post by aaronsegura »

No, I copied just ss_fping.php and then imported the template. The top post in this thread states that ping.php is no longer needed.
TheWitness wrote:With the release of 0.8.6i, the ping.php is not longer required. I am removing.
I'm running the same ping.php that comes with the cacti-0.8.7d distro.
sabin16
Posts: 7
Joined: Mon Apr 06, 2009 5:08 pm

Post by sabin16 »

I was hoping you did have the original ping.php. I replaced mine before I saw that line and forgot to just rename the original. I have been trying to find a copy of the original all day long.
aaronsegura
Posts: 25
Joined: Fri Jan 30, 2009 12:56 pm

Post by aaronsegura »

I must be confused. Are you talking about the ping.php that comes with cacti-0.8.7d? I'm not sure where you could possibly find that... :o
sabin16
Posts: 7
Joined: Mon Apr 06, 2009 5:08 pm

Post by sabin16 »

I was hoping someone like you would be able to just copy the one that you have to this forum and I could copy it down.
aaronsegura
Posts: 25
Joined: Fri Jan 30, 2009 12:56 pm

Post by aaronsegura »

Why would we do that when you could just download it?
sabin16
Posts: 7
Joined: Mon Apr 06, 2009 5:08 pm

Post by sabin16 »

Sorry, I'm a noob. I found it when I actually un-tar the program.
Thanks though.

Does anyone know how to fix the problem where I'm not having any graph for my advanced pings? I have read it over and over again of people having the same problem but I didn't read any resolutions.

Thanks,
Shane
fruitwerks
Posts: 7
Joined: Fri Apr 10, 2009 9:55 am

Post by fruitwerks »

using the latest posted files, gentoo, cacti 0.8.7b-r3, php 5.2.8-r2

Code: Select all

RRDTool Command:

/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="alpha - Advanced Ping" \
--base=1000 \
--height=120 \
--width=500 \
--upper-limit=10 \
--lower-limit=0 \
--units-exponent=1 \
--vertical-label="milliseconds" \
--slope-mode \
--font TITLE:12: \
--font AXIS:8: \
--font LEGEND:10: \
--font UNIT:8: \
DEF:a="/var/www/cacti/htdocs/cacti/rra/alpha_dev_44.rrd":loss:AVERAGE \
DEF:b="/var/www/cacti/htdocs/cacti/rra/alpha_dev_44.rrd":avg:LAST \
DEF:c="/var/www/cacti/htdocs/cacti/rra/alpha_dev_44.rrd":min:LAST \
DEF:d="/var/www/cacti/htdocs/cacti/rra/alpha_dev_44.rrd":min:MAX \
DEF:e="/var/www/cacti/htdocs/cacti/rra/alpha_dev_44.rrd":avg:MAX \
DEF:f="/var/www/cacti/htdocs/cacti/rra/alpha_dev_44.rrd":max:MAX \
DEF:g="/var/www/cacti/htdocs/cacti/rra/alpha_dev_44.rrd":dev:MAX \
CDEF:cdefg=d,0,GT,d,2,GT,UNKN,INF,IF,UNKN,IF \
CDEF:cdefh=d,3,GT,d,5,GT,UNKN,INF,IF,UNKN,IF \
CDEF:cdefi=d,5,GT,d,10,GT,UNKN,INF,IF,UNKN,IF \
CDEF:cdefj=d,10,GT,d,15,GT,UNKN,INF,IF,UNKN,IF \
CDEF:cdefba=d,15,GT,d,50,GT,UNKN,INF,IF,UNKN,IF \
CDEF:cdefbb=d,50,GT,d,95,GT,UNKN,INF,IF,UNKN,IF \
CDEF:cdefbc=d,95,GT,d,100,GT,UNKN,INF,IF,UNKN,IF \
CDEF:cdefbe=e,2,/ \
CDEF:cdefbg=c,b,-,e,-,3,/ \
CDEF:cdefca=b,a,-,0.2,* \
CDEF:cdefch=d,0,GT,d,2,GT,UNKN,a,IF,UNKN,IF \
CDEF:cdefci=d,3,GT,d,5,GT,UNKN,a,IF,UNKN,IF \
CDEF:cdefcj=d,5,GT,d,10,GT,UNKN,a,IF,UNKN,IF \
CDEF:cdefda=d,10,GT,d,15,GT,UNKN,a,IF,UNKN,IF \
CDEF:cdefdb=d,15,GT,d,50,GT,a,INF,IF,UNKN,IF \
CDEF:cdefdc=d,50,GT,d,95,GT,UNKN,a,IF,UNKN,IF \
CDEF:cdefdd=d,95,GT,d,100,GT,UNKN,a,IF,UNKN,IF \
LINE1::""  \
LINE1::""  \
LINE1::""  \
LINE1:a:""  \
LINE1::""  \
COMMENT:"   Pkt Loss\:"  \
AREA:cdefg#AFECEDFF:"1-2%"  \
AREA:cdefh#55D6D3FF:"3-5%"  \
AREA:cdefi#7CB3F1FF:"6-10%"  \
AREA:cdefj#4668E4FF:"11-15%"  \
AREA:cdefba#A150AAFF:"16-50%"  \
AREA:cdefbb#FF00FFFF:"51-95%"  \
AREA:cdefbc#F51D30FF:"96-100%\n"  \
AREA:b#FFFFFFFF:""  \
AREA:cdefbe#333333FF:"":STACK \
AREA:cdefbe#555555FF:"":STACK \
AREA:cdefbg#888888FF:"":STACK \
AREA:cdefbg#AAAAAAFF:"":STACK \
AREA:cdefbg#CCCCCCFF:"":STACK \
AREA:c#FFFFFFFF:""  \
AREA:cdefca#CCCCCCFF:"":STACK \
AREA:cdefca#AAAAAAFF:"":STACK \
AREA:cdefca#888888FF:"":STACK \
AREA:cdefca#555555FF:"":STACK \
AREA:cdefca#333333FF:"":STACK \
GPRINT::AVERAGE:"   Avg Loss\:%6.2lf%%"  \
GPRINT::MAX:"Max Loss\:%6.2lf%%\n"  \
AREA:cdefch#AFECEDFF:""  \
AREA:cdefci#55D6D3FF:""  \
AREA:cdefcj#7CB3F1FF:""  \
AREA:cdefda#4668E4FF:""  \
AREA:cdefdb#A150AAFF:""  \
AREA:cdefdc#FF00FFFF:""  \
AREA:cdefdd#F51D30FF:""  \
COMMENT:"    Latency\:"  \
GPRINT:c:LAST:"Min\:%8.2lf ms"  \
GPRINT:b:LAST:"Avg\:%8.2lf ms"  \
GPRINT:f:LAST:"Max\:%8.2lf ms"  \
GPRINT:g:LAST:"Dev\:%8.2lf ms\n"  \
COMMENT:"Avg Latency\:"  \
GPRINT:d:MIN:"Min\:%8.2lf ms"  \
GPRINT:e:AVERAGE:"Avg\:%8.2lf ms"  \
GPRINT:f:MAX:"Max\:%8.2lf ms"  \
GPRINT:g:AVERAGE:"Dev\:%8.2lf ms\n"  \
LINE1:b#00BD27FF:"" 
RRDTool Says:

ERROR: Could not parse line 'GPRINT::AVERAGE:   Avg Loss\:%6.2lf%%'

any ideas? couldn't find anything solid on google :(

-- update

php not compiled with posix and i didn't have fping installed! I will let you know if that worked.

fixed the above, and now I get results. I also had to add

Code: Select all

include_once(dirname(__FILE__) . "/../include/global.php");
in ss_fping.php
aaronsegura
Posts: 25
Joined: Fri Jan 30, 2009 12:56 pm

Post by aaronsegura »

aaronsegura wrote:On one of my systems, the graph data doesn't match the legend. For instance, the latency on one graph shows a max of 247.95ms, but the graph plainly shows a max well over 400 for this time period (see attached)

I looked in the RRD and found the 247.95ms value, but I was unable to find the other crazy value

<edit>
Cacti v: 0.8.7d
Spine v: 0.8.7c
RRDtool v: 1.2.30
PHP v: 5.1.6
</edit>

Any ideas?
Bump - Sorry, didn't want my actual question overshadowed by the crap that followed. I'm still seeing this behavior. Does anyone have any ideas why?
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest