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
Diceman
Cacti User
Posts: 142
Joined: Tue Oct 25, 2005 10:01 am

#121 Post by Diceman » Thu Feb 16, 2006 2:51 am

on a side note, using this script caused gaps in other devices graphs. dont know why. i have since stopped using the script and they have gone away. interesting to say the least.

helzerr
Cacti User
Posts: 54
Joined: Sun Feb 01, 2004 3:10 am
Location: Orlando, FL
Contact:

All works well except for...

#122 Post by helzerr » Thu Feb 16, 2006 3:45 pm

Configuration: Cacti 0.8.6g, RRDTool 1.2.6, GD 2.30 on Gentoo Linux host.

In the advanced ping graph template, there is a newline character "\n" in item # 36. This newline shows up as a square box in my graphs, unless I click on item # 36 and save it; then all my existing advanced ping graphs are O.K (no more square).

If I make new advanced ping graphs, I have to repeat this process to eliminate the square where the newline character ought to be. Any ideas?

testure
Posts: 1
Joined: Wed Aug 10, 2005 8:59 pm

#123 Post by testure » Thu Feb 23, 2006 2:50 pm

I'm having a problem getting Advanced Ping to work with the IP address of the loopback interface on our Cisco routers. It returns 100% packet loss. I get the same results running the ss_fping.php from a command line.

C:\Inetpub\wwwroot\cacti\scripts>php ss_fping.php 10.208.0.2
loss:100.00

Using standard windows ping works:

C:\Inetpub\wwwroot\cacti\scripts>ping 10.208.0.2
Pinging 10.208.0.2 with 32 bytes of data:
Reply from 10.208.0.2: bytes=32 time=65ms TTL=253
Reply from 10.208.0.2: bytes=32 time=56ms TTL=253
Reply from 10.208.0.2: bytes=32 time=91ms TTL=253
Reply from 10.208.0.2: bytes=32 time=45ms TTL=253


And if I ss_fping the ethernet interface on that device, I get a response:

C:\Inetpub\wwwroot\cacti\scripts>php ss_fping.php 10.208.16.219
min:45.8100 avg:53.0983 max:74.7400 dev:10.5794 loss:0.0000

We are using the loopback IP address to do other SNMP graphing and it works fine. Problem isn't limited to this one device either.

Any ideals?

Thanks!

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

#124 Post by TheWitness » Sat Feb 25, 2006 9:09 am

Please start ethereal during a polling cycle and set a display filter on that host. Run a capture and then review the sniffer capture and see if any thing if malformed in the icmp request.

Post your results. Oh, BTB, I have an updated ping.php script that I will release to address some other anomalies.

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.

qwertz
Cacti User
Posts: 98
Joined: Thu Feb 16, 2006 9:20 am

#125 Post by qwertz » Sat Feb 25, 2006 9:15 am

Hello,

CAn i use Advanced Ping template without snmp community ?

With snmp community, it's working fine, but when i remove the SNMP communuty on my monitored device, i have nothing on my graph

Thanks

Qwertz

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

#126 Post by TheWitness » Sat Feb 25, 2006 9:17 am

I simply create a host without an snmp community. This is a special case where if Cacti does not see an snmp community for a host, it does not check availability.

This feature will be more clear (and depricated) in the 0.9 release of Cacti, where you can specify a per host availability method. Until then, just create hosts with blank communities.

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.

qwertz
Cacti User
Posts: 98
Joined: Thu Feb 16, 2006 9:20 am

#127 Post by qwertz » Sat Feb 25, 2006 9:43 am

It's working !!!!

THANK YOU !!!!

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

#128 Post by nerdtalker » Sun Feb 26, 2006 8:51 pm

I'm still getting graphs with 100% loss.

I defined the protocol (TCP, since ICMP doesn't work) and the port number to use, but I'm not sure if the other values are right. I modified the data template itself because the data source properties doesn't have any of those fields.

Needless to say, I'm still getting 100% loss graphs.
Attachments
latency graph.png
latency graph.png (23.01 KiB) Viewed 7708 times
config.PNG
config.PNG (54.03 KiB) Viewed 7708 times

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

#129 Post by TheWitness » Sun Feb 26, 2006 9:52 pm

Please debug the script server from the command line:

a) Start the Script Server

cd <cacti_root>
php script_server

b) Obtain the script line from the poller cache

System Utilities->View Poller Cache
Search for "Action: 2" that contains the ss_fping.php line

c) Run from the script server

Paste the entire line ending in "TCP 80" into the script server window and hit <CR>

d) Quit the script server

quit <CR>

Post the output.

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.

pjb01
Posts: 4
Joined: Mon Feb 27, 2006 12:58 pm

Advanced Ping V1.3 - Problem with graphing

#130 Post by pjb01 » Mon Feb 27, 2006 1:05 pm

Hi,

I have 0.8.6h and am using the default install ping.php and ss_fping.php.

I can successfully import the Advanced Ping template and set up a device (no host template, no SNMP community). I can ping from the command line, and the status shows as 'Up' in the 'Devices' page [I'm using www.bbc.co.uk with default ICMPx20].

When I add a graph (template advanced Ping v1.3), and try to display the graph, I get the following in Graph Debug Mode:

RRDTool Command:

/usr/local/rrdtool-1.2.11/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="www.bbc.co.uk - Advanced Ping" \
--base=1000 \
--height=120 \
--width=500 \
--upper-limit=10 \
--lower-limit=0 \
--units-exponent=1 \
--vertical-label="milliseconds" \
DEF:a="/var/www/html/cacti/rra/www_bbc_co_uk_min_58.rrd":min:AVERAGE \
DEF:b="/var/www/html/cacti/rra/www_bbc_co_uk_min_58.rrd":avg:AVERAGE \
DEF:c="/var/www/html/cacti/rra/www_bbc_co_uk_min_58.rrd":max:AVERAGE \
DEF:d="/var/www/html/cacti/rra/www_bbc_co_uk_min_58.rrd":loss:AVERAGE \
DEF:e="/var/www/html/cacti/rra/www_bbc_co_uk_min_58.rrd":dev:AVERAGE \
DEF:f="/var/www/html/cacti/rra/www_bbc_co_uk_min_58.rrd":avg:AVERAGE \
DEF:g="/var/www/html/cacti/rra/www_bbc_co_uk_min_58.rrd":avg: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:cdefbd=d,UN,1,EQ,TIME,300,+,NOW,GT,UNKN,INF,IF,d,95,GT,INF,UNKN,IF,IF \
CDEF:cdefbf=e,2,/ \
CDEF:cdefbh=c,b,-,e,-,3,/ \
CDEF:cdefcd=d,0,GT,d,2,GT,UNKN,b,IF,UNKN,IF \
CDEF:cdefce=d,3,GT,d,5,GT,UNKN,b,IF,UNKN,IF \
CDEF:cdefcf=d,5,GT,d,10,GT,UNKN,b,IF,UNKN,IF \
CDEF:cdefcg=d,10,GT,d,15,GT,UNKN,b,IF,UNKN,IF \
CDEF:cdefch=d,15,GT,d,50,GT,b,INF,IF,UNKN,IF \
CDEF:cdefci=d,50,GT,d,95,GT,UNKN,b,IF,UNKN,IF \
CDEF:cdefcj=d,95,GT,d,100,GT,UNKN,b,IF,UNKN,IF \
LINE1:a:"" \
LINE1:g:"" \
LINE1:c:"" \
LINE1:d:"" \
LINE1:e:"" \
COMMENT:" Pkt Loss:" \
AREA:cdefg#AFECED:"1-2%" \
AREA:cdefh#55D6D3:"3-5%" \
AREA:cdefi#7CB3F1:"6-10%" \
AREA:cdefj#4668E4:"11-15%" \
AREA:cdefba#A150AA:"16-50%" \
AREA:cdefbb#FF00FF:"51-95%" \
AREA:cdefbc#F51D30:"96-100%" \
COMMENT:"Unknown\n" \
AREA:g#FFFFFF:"" \
STACK:cdefbf#333333:"" \
STACK:cdefbf#555555:"" \
STACK:cdefbh#888888:"" \
STACK:cdefbh#AAAAAA:"" \
STACK:cdefbh#CCCCCC:"" \
GPRINT:d:AVERAGE:" Avg Loss\:%6.2lf%%" \
GPRINT:d:MAX:"Max Loss\:%6.2lf%%\n" \
COMMENT:" Latency:" \
AREA:cdefcd#AFECED:"" \
AREA:cdefce#55D6D3:"" \
AREA:cdefcf#7CB3F1:"" \
AREA:cdefcg#4668E4:"" \
AREA:cdefch#A150AA:"" \
AREA:cdefci#FF00FF:"" \
AREA:cdefcj#F51D30:"" \
GPRINT:a:AVERAGE:"Min\:%8.2lf ms" \
GPRINT:g:AVERAGE:"Avg\:%8.2lf ms" \
GPRINT:c:MAX:"Max\:%8.2lf ms" \
GPRINT:e:AVERAGE:"Dev\:%8.2lf ms\n" \
COMMENT:"Avg Latency:" \
LINE1:g#00BD27:"
"
RRDTool Says:

ERROR: Garbage ':' after command:

And the graph is shown as a red 'X'.

I wondered if anyone has any idea why this is happening.

Thanks,
Peter

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

#131 Post by TheWitness » Mon Feb 27, 2006 10:35 pm

What version of RRDtool? If it's 1.0.x, then edit the graph template and place a valid character in the green line at the very bottom of the template, something like an underscore for the "value". Keep us posted.

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.

pjb01
Posts: 4
Joined: Mon Feb 27, 2006 12:58 pm

#132 Post by pjb01 » Mon Feb 27, 2006 11:49 pm

RRD Tool Version = 1.2.11.

The relevant RRD Tool Version setting in Cacti has been changed to match this.

Thanks,
Peter

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

#133 Post by TheWitness » Tue Feb 28, 2006 7:02 am

So, your issue is resolved?

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.

pjb01
Posts: 4
Joined: Mon Feb 27, 2006 12:58 pm

#134 Post by pjb01 » Tue Feb 28, 2006 7:52 pm

TheWitness,

Thanks for your help. I double checked and I did in fact have the wrong version of RRDTool selected (I have 1.2.x, but had 1.0 selected).

Now I've made the change everything works OK...

Thanks again,
Peter

PS. I've put Cacti on a couple of machines and I definately changed it on the other one... :-)

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

#135 Post by nerdtalker » Tue Feb 28, 2006 10:19 pm

TheWitness wrote: c) Run from the script server

Paste the entire line ending in "TCP 80" into the script server window and hit <CR>

d) Quit the script server

quit <CR>

Post the output.
By <CR>, I assume you meant enter or something?

Regardless, I get this:

Code: Select all

XboxServ:/usr/share/cacti/site# php script_server.php 
PHP Script Server has Started - Parent is cmd
/usr/share/cacti/site/scripts/ss_fping.php ss_fping 4.2.2.1 5 TCP 80
loss:100.00

Post Reply