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

Post by Sem »

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

Post by sergey_taurus »

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

Post by sergey_taurus »

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

Post by yreddy »

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

Post by sergey_taurus »

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

Post by sergey_taurus »

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

Post by yreddy »

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

Post by yreddy »

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
Blue line indicates packet loss. Is is not a vertical bar as old versions.
Blue line indicates packet loss. Is is not a vertical bar as old versions.
Advanced_Ping_Alt-zoomed2.png (31.44 KiB) Viewed 10864 times
Green line displays avg RTT while min and max RTT are delimited by gray layers.
Green line displays avg RTT while min and max RTT are delimited by gray layers.
Advanced_Ping_Alt.png (57.42 KiB) Viewed 10864 times
sergey_taurus
Posts: 22
Joined: Sun Oct 12, 2008 9:56 pm

Post by sergey_taurus »

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

Post by yreddy »

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

Post by Harald »

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
100% loss gap
100% loss gap
apgap.png (41.51 KiB) Viewed 10639 times
Harald
Posts: 12
Joined: Tue Sep 13, 2005 8:48 am

Post by Harald »

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
now it works
now it works
graph_image.png (40.58 KiB) Viewed 10563 times
paulbeard206
Cacti User
Posts: 150
Joined: Sat Jul 30, 2005 2:15 pm

This sort of works for me but . . .

Post by paulbeard206 »

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

Post by tytanick »

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
graph
graph_image.png (28.43 KiB) Viewed 9586 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 . . .

Post by jbarbieri »

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

Who is online

Users browsing this forum: No registered users and 0 guests