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
Sem
Posts: 29
Joined: Fri Mar 25, 2005 3:05 am
Contact:

#421 Post by Sem » Fri May 21, 2010 1:09 am

Well, I've found a problem. But anyway to return lost:100% is a bad way to shows errors. A better way would be return NaNs.

sergey_taurus
Posts: 22
Joined: Sun Oct 12, 2008 9:56 pm

#422 Post by sergey_taurus » Mon Jul 05, 2010 5:03 am

Hi,

I am trying to run the latest Advanced Ping Template.
cacti 0.8.7f (cmd.php), w2003 server

I see DS for this graph created and updated. Actually, if I create a graph based on this source with unix\latency template - I can see it plotting.

But when using graph template which I imported from Advanced Ping Template it doesn't show anything, either in preview or full mode.

I suppose, something wrong or unsupported under windows environment, or something is missing from my install. Graph bebug shows:

Code: Select all

C:/cacti/rrdtool.exe graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="PB-KNT-C2811 - 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="C\:/cacti/rra/5/53.rrd":loss:AVERAGE \
DEF:b="C\:/cacti/rra/5/53.rrd":avg:AVERAGE \
DEF:c="C\:/cacti/rra/5/53.rrd":min:AVERAGE \
DEF:d="C\:/cacti/rra/5/53.rrd":max:AVERAGE \
DEF:e="C\:/cacti/rra/5/53.rrd":dev:AVERAGE \
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:AVERAGE:"Min\:%8.2lf ms"  \
GPRINT:b:AVERAGE:"Avg\:%8.2lf ms"  \
GPRINT:d:MAX:"Max\:%8.2lf ms"  \
GPRINT:e:AVERAGE:"Dev\:%8.2lf ms\n"  \
COMMENT:"Avg Latency\:"  \
GPRINT:c:AVERAGE:"Min\:%8.2lf ms"  \
GPRINT:b:AVERAGE:"Avg\:%8.2lf ms"  \
GPRINT:d:MAX:"Max\:%8.2lf ms"  \
GPRINT:e:AVERAGE:"Dev\:%8.2lf ms\n"  \
LINE1:b#00BD27FF:"" 

RRDTool Says:

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


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

Code: Select all


All other graphs are rendering normally.

Thanks for any suggestions.

sergey_taurus
Posts: 22
Joined: Sun Oct 12, 2008 9:56 pm

#423 Post by sergey_taurus » Wed Jul 07, 2010 4:25 am

fruitwerks wrote:using the latest posted files, gentoo, cacti 0.8.7b-r3, php 5.2.8-r2
RRDTool Says:

ERROR: Could not parse line 'GPRINT::AVERAGE: Avg Loss\:%6.2lf%%'
[/code]

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.
Exactly the same error but I am using 0.8.7e under w2003server, with PHP 5.2.13 and Advanced Plugin v2.2 (downloaded from this message http://forums.cacti.net/viewtopic.php?p=173542#173542).

PHP states no support for POSIX undes w32. Just wondering: does anyone run this script\template under w32? Or I am just loosing my time with it? Thanks.

yreddy
Posts: 43
Joined: Fri May 02, 2008 7:33 am
Location: Canada

#424 Post by yreddy » Thu Jul 08, 2010 8:13 am

Maybe the GPrint preset "Percentage as Decimal" is not supported on the W32 platform ?

Go in the menu "Graph Management -> GPRINT Presets", select "Percentage as Decimal" and replace the "GPrint Text" field by another value. (you can try "%8.2lf %s" to see what happens).

Youri

sergey_taurus
Posts: 22
Joined: Sun Oct 12, 2008 9:56 pm

#425 Post by sergey_taurus » Thu Jul 08, 2010 11:13 am

yreddy wrote:Maybe the GPrint preset "Percentage as Decimal" is not supported on the W32 platform ?

Go in the menu "Graph Management -> GPRINT Presets", select "Percentage as Decimal" and replace the "GPrint Text" field by another value. (you can try "%8.2lf %s" to see what happens).

Youri
I've got the same error:

Code: Select all

ERROR: Could not parse line 'GPRINT::AVERAGE:   Avg Loss\:%8.2lf %s'
I get the same result when I try to change GPRINT preset to Normal for any legend item.

sergey_taurus
Posts: 22
Joined: Sun Oct 12, 2008 9:56 pm

#426 Post by sergey_taurus » Fri Jul 16, 2010 1:35 am

Hi,

Just transferred Cacti to FreeBSD platform, 0.8.7e, Advanced Ping Template v2.2, rrdtool-1.4.3 (but v1.3 is defined in Cacti settings, cause there is no 1.4 in the drop-down list available), fping installed. Still no luck, the same error:

Code: Select all

ERROR: Could not parse line 'GPRINT::AVERAGE:   Avg Loss\:%6.2lf%%'
When I changed GPRINT Preset for these two items (Avg Loss and Max Loss) from "Percentage as Decimal" to "Normal" graphs started to draw, of cource with some odd numbers caused by preset change. Graph debug states these outputs for "Normal" preset:

GPRINT:a:AVERAGE:" Avg Loss\:%8.2lf %s" \
GPRINT:a:MAX:"Max Loss\:%8.2lf %s\n" \

Any suggestions why percent representation is not working and how make it work? Thanks.

yreddy
Posts: 43
Joined: Fri May 02, 2008 7:33 am
Location: Canada

#427 Post by yreddy » Mon Jul 19, 2010 8:13 am

Sorry I am unable to reproduce the issue so it is pretty hard to find a workaround.. If you try the GPrint Preset "Percentage", do you have the same issue as the "Percentage as Decimal" ? Also I would suggest you to change the Preset to to use the following Values (without the quotes):
"%6.2lf"
"%6.2lf %%"

Good Luck
Youri

yreddy
Posts: 43
Joined: Fri May 02, 2008 7:33 am
Location: Canada

#428 Post by yreddy » Mon Jul 19, 2010 8:58 am

Hi,

I've made an alternate version of the Advanced Ping template with the following changes:
- y axis displays seconds instead of milliseconds
- Packet loss displayed as a normal line and not a full vertical bar (except for 100% packet loss)
- 3 Gray layers (layer1:+-1Sdev, layer2:+-2Sdev, layer3:+-3Sdev)
- Gray layers cropped if above/below max/min rtt values
- GPRINT Packet loss is fully detailed (last, min, avg, max)
- GPRINT RTT Min/Avg/Max time are fully detailed (last, min, avg, max)
- GPRINT SDev is fully detailed (last, min, avg, max)

Also, this template will NOT replace the old template since I've duplicate all of the old components instead of modifying them when creating the new template. You can download it here: http://docs.cacti.net/usertemplate:grap ... d_ping_alt

Contact me if you have issues and I'll try to fix them.
Youri
Attachments
Advanced_Ping_Alt-zoomed2.png
Blue line indicates packet loss. Is is not a vertical bar as old versions.
Advanced_Ping_Alt-zoomed2.png (31.44 KiB) Viewed 9402 times
Advanced_Ping_Alt.png
Green line displays avg RTT while min and max RTT are delimited by gray layers.
Advanced_Ping_Alt.png (57.42 KiB) Viewed 9402 times

sergey_taurus
Posts: 22
Joined: Sun Oct 12, 2008 9:56 pm

#429 Post by sergey_taurus » Mon Jul 19, 2010 12:17 pm

yreddy wrote:Sorry I am unable to reproduce the issue so it is pretty hard to find a workaround.. If you try the GPrint Preset "Percentage", do you have the same issue as the "Percentage as Decimal" ? Also I would suggest you to change the Preset to to use the following Values (without the quotes):
"%6.2lf"
"%6.2lf %%"

Good Luck
Youri
Here is a list of GPRINT presets currently present in my fresh 0.8.7e install:
Normal, Exact Numbers, Load Average, Ping, Percentage as Decimal.
Sorry, no "Percentage".

When I changed "Percentage as Decimal" preset value from "%6.2lf%%" to "%6.2lf %%" (with space b\w) it did the trick for one graph. But, when I created a new graph for another host, the same error appeared, showing a line with space:

Code: Select all

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

yreddy
Posts: 43
Joined: Fri May 02, 2008 7:33 am
Location: Canada

#430 Post by yreddy » Tue Jul 20, 2010 4:32 am

ok to recap:
1) Errors when using "Percentage as Decimal" preset with value "%6.2lf%%", with value "%6.2lf %%" and with value "%6.2lf".
2) No errors when using normal preset (value "%8.2lf %s")

--> Could you try "Exact number" preset and see if there you have errors ?
--> If there is no error, could you try to modify the value to "%6.2lf" ?
--> If there is still no error, could you modifiy the value to "%6.2lf%%" ?

These tests will permit us to see if the issue is with the preset or with the value of the preset...

Harald
Posts: 12
Joined: Tue Sep 13, 2005 8:48 am

#431 Post by Harald » Thu Jul 29, 2010 2:25 am

I've installed the latest version of cacti with the latest version of the xml file and ss_fping.php

But when a server is down 100% packetloss there's a gap in the graph.
how can this be fixed ??

I've create a device UCP Modem (ping + no template) create a advanced ping graph for this host. But when i've got 100% loss the device is also down in cacti could this be the problem ?

Note: I'm not running it with the script server but as a normal script.
for some reason the script_server is a bit buggy and wont give any output.
Attachments
apgap.png
100% loss gap
apgap.png (41.51 KiB) Viewed 9177 times

Harald
Posts: 12
Joined: Tue Sep 13, 2005 8:48 am

#432 Post by Harald » Mon Aug 02, 2010 4:35 am

I've solved the problem.

When you create a host and poll it with a ping (ICMP, TCP or UDP) and the host is down the graph won't work.

The quick fix:
create a gaph with no host and edit the data query where you can enter a host.
Attachments
graph_image.png
now it works
graph_image.png (40.58 KiB) Viewed 9101 times

paulbeard206
Cacti User
Posts: 149
Joined: Sat Jul 30, 2005 2:15 pm

This sort of works for me but . . .

#433 Post by paulbeard206 » Wed Sep 01, 2010 1:00 am

I have two of these graphs working, pinging a couple of hosts. Getting results and it's working. But is there any way to get the host name in the title or legend? It's not really useful if I have have to drill into the graph to see which is which.

The process of getting this working wasn't all that straightforward. It still seems like an afterthought but this thread starts in May of 2005.

I tried associating the graphs with a null host or device just for them and it didn't seem to work. It doesn't matter all that much but it seems like there are a lot of different implementations of this.

Does anyone have the target host displayed on the graph? And how to do it?

tytanick
Posts: 1
Joined: Mon Sep 27, 2010 1:22 pm

Re: EDIT: Advanced Ping Template Version 1.3 for Cacti 0.8.6

#434 Post by tytanick » Mon Sep 27, 2010 1:42 pm

hello i have question about this graph template.

When host is DOWN, so it has 100% packet lost.
I would like to have RED COLOR on this graph.
But result is that i have blank space (gap) when host is down, you can see that in attached image..

Could you tell what should i edit in template in order to have 100% packet lost (host down) draw as red field ?
Attachments
graph_image.png
graph
graph_image.png (28.43 KiB) Viewed 8124 times

jbarbieri
Cacti User
Posts: 101
Joined: Tue May 24, 2005 8:46 am
Location: Rochester, New Hampshire
Contact:

Re: This sort of works for me but . . .

#435 Post by jbarbieri » Mon Sep 27, 2010 1:44 pm

paulbeard206 wrote:I have two of these graphs working, pinging a couple of hosts. Getting results and it's working. But is there any way to get the host name in the title or legend? It's not really useful if I have have to drill into the graph to see which is which.

The process of getting this working wasn't all that straightforward. It still seems like an afterthought but this thread starts in May of 2005.

I tried associating the graphs with a null host or device just for them and it didn't seem to work. It doesn't matter all that much but it seems like there are a lot of different implementations of this.

Does anyone have the target host displayed on the graph? And how to do it?
Go into graph templates, and put this in for your title:

Code: Select all

|host_description| - Advanced Ping
That should pull the host into the graph title.

Post Reply