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
mikes1p
Posts: 8
Joined: Mon Oct 10, 2005 5:46 pm

Advanced Ping not graphing anything

#46 Post by mikes1p » Wed Nov 30, 2005 5:38 pm

I can't get the graphs to show any data. I am running windows Cacti 0.8.6g, all patches, PHP 5.0.5, latest versions (that I could find) of ping.php, ss_fping.php, and the Adv Ping template. Oh yea also using cactid for polling.

Image


If I run ss_fping from a command prompt, it returns some data, I get:
  • c:\php\php-win.exe c:\cacti\scripts\ss_fping.php route079 15 ICMP
    min:36.4700 avg:39.9187 max:49.6600 dev:3.7547 loss:0.0000Creating directory: /c:
    Creating directory: /c:/usr
    Creating directory: /c:/usr/snmp
    Creating directory: /c:
    Creating directory: /c:/usr
    Creating directory: /c:/usr/snmp
    Creating directory: /c:
    Creating directory: /c:/usr
    Creating directory: /c:/usr/snmp
Flipping logging to DEBUG mode, I get this:
  • 11/30/2005 12:20:59 PM - WEBLOG: Poller[0] CACTI2RRD: c:/rrdtool/rrdtool.exe graph - --imgformat=PNG --start=1133374852 --end=1133382052 --title="Route079 - Advanced Ping" --base=1000 --height=120 --width=500 --upper-limit=10 --lower-limit=0 --units-exponent=1 COMMENT:"From 2005/11/30 10\:20\:52 To 2005/11/30 12\:20\:52\c" COMMENT:" \n" --vertical-label="milliseconds" --slope-mode DEF:a="C\:/cacti/rra/route079_loss_394.rrd":min:AVERAGE DEF:b="C\:/cacti/rra/route079_loss_394.rrd":avg:AVERAGE DEF:c="C\:/cacti/rra/route079_loss_394.rrd":max:AVERAGE DEF:d="C\:/cacti/rra/route079_loss_394.rrd":loss:AVERAGE DEF:e="C\:/cacti/rra/route079_loss_394.rrd":dev:AVERAGE DEF:f="C\:/cacti/rra/route079_loss_394.rrd":avg:AVERAGE DEF:g="C\:/cacti/rra/route079_loss_394.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 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:"" AREA:cdefbf#333333:"":STACK AREA:cdefbf#555555:"":STACK AREA:cdefbh#888888:"":STACK AREA:cdefbh#AAAAAA:"":STACK AREA:cdefbh#CCCCCC:"":STACK 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:"
RRA files are being created, other SNMP interface graphs work for the routers I am trying to graph.

Any pointers?

Thanks
Mike
Attachments
advanceping_graph.png
advanceping_graph.png (14.91 KiB) Viewed 16280 times

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

#47 Post by TheWitness » Wed Nov 30, 2005 9:20 pm

Does the "creating directory..." happen every time? Otherwise, please wait a polling cycle or two for the graph to appear. Also, what happens when your run "php <path_cacti>/cmd.php" at MEDIUM logging level?

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.

tamaqua
Posts: 7
Joined: Fri Apr 29, 2005 12:06 pm

2 things..

#48 Post by tamaqua » Thu Dec 01, 2005 3:43 am

I love this script! It is so great to see how much
it has progressed.

1) Can you tell me the best way to modify ping.php to
somehow lower the "intensity" or rate of pings? Is there
a simple way to put a small pause between pings? My
issue: some of devices I have out there are qos / firewall
boxes and will return 0% loss with a normal ping (bash# ping 10.1.1.1)
but with this script I often show 20% or more loss. Ex: See graph below.
Again, I see the need for balance here, (more gap = longer poll), and
am having deja-vu back to one of my posts in orig thread.
http://forums.cacti.net/viewtopic.php?p ... ght=#37161


2) On this graph below, Is the cause of the purple (color A150AA) covering the smoke a result of the cdef values duplicating? I.E.
Loss 11 - 15 % cdef = d,10,GT,d,15...
Loss 16 - 50 % cdef = d,15,GT,d,50...
Does that 15 value matching both cases cause this?
Attachments
advping.jpg
advping.jpg (76.56 KiB) Viewed 16297 times

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

#49 Post by TheWitness » Thu Dec 01, 2005 6:07 am

I think maybe the lack of black bar could be the lack/number of successful ping results. You could add some delay using the usleep(xxx) function in ss_fping.php between ping attempts, where xxx are microseconds.

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.

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

#50 Post by TheWitness » Thu Dec 01, 2005 6:09 am

Oh, relative to item 2) above. I think you are correct. I think a new version of the Advance Ping Template is on the way. Until then, feel free to correct on your own.

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.

mikes1p
Posts: 8
Joined: Mon Oct 10, 2005 5:46 pm

#51 Post by mikes1p » Thu Dec 01, 2005 11:36 am

TheWitness wrote:Does the "creating directory..." happen every time? Otherwise, please wait a polling cycle or two for the graph to appear. Also, what happens when your run "php <path_cacti>/cmd.php" at MEDIUM logging level?
Yes the "creating dirs" happend every time.

Yep I waited several polling cycles to see if was working, the empty graph I posted was for two hours after I had created the graph


Result from running cmd.php with logging at Medium:
  • View Cacti Log File [1 Items]

    12/01/2005 08:23:07 AM - CMDPHP: Poller[0] ERROR: The PHP Script: CMD.PHP Must be started using the full path to the file and in lower case. This is a PHP Bug!!!
I started trying to find out how to fix that problem after posting on this thread yesterday but haven't found a fix yet

cpdans
Posts: 43
Joined: Mon Oct 28, 2002 7:59 am

making the poller run as "root"

#52 Post by cpdans » Fri Dec 02, 2005 2:17 pm

henryd31 wrote:I saw your other post on making the poller run as "root" to be one of the
options here to allow the sockets to be created by the process and once
I did that it started working :-)

Thanks.
I see from your post above that this fixed your problem. I have searched the message boards and can't seem to find the post you are referencing. Can you point me in the right direction please. Thanks in advance,

Dan

cpdans
Posts: 43
Joined: Mon Oct 28, 2002 7:59 am

#53 Post by cpdans » Fri Dec 02, 2005 3:41 pm

I'm sorry, I'm just stupid.

luckyksc
Posts: 22
Joined: Tue Apr 19, 2005 5:24 pm

problem with advanced ping

#54 Post by luckyksc » Tue Dec 13, 2005 3:22 pm

cacti uses snmp to determine if a host is down. If I create a host and use the advance ping, if that host is down, the poller won't pull for that host and I won't get any data for the ping. Is there a way I can use none for host, so if there is a problem with the host, I would still get loss:100%, since it can't be ping?

Thanks,

User avatar
gandalf
Developer
Posts: 22375
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

#55 Post by gandalf » Tue Dec 13, 2005 5:04 pm

To suspend snmp tests, please clear the community string for that very device
Reinhard

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

#56 Post by TheWitness » Tue Dec 13, 2005 5:39 pm

The advanced ping template was/is intended to be a workaround until such time that Cacti 0.9 is released. At that point, the ping statistics would be stored in the database and the method would change to read the database, thus improving efficiency.

So, I guess what I'm saying is can you wait?

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.

luckyksc
Posts: 22
Joined: Tue Apr 19, 2005 5:24 pm

#57 Post by luckyksc » Tue Dec 13, 2005 5:42 pm

Thanks Reinhard ,

That's what I really needed.

mikes1p
Posts: 8
Joined: Mon Oct 10, 2005 5:46 pm

#58 Post by mikes1p » Wed Dec 14, 2005 5:49 pm

Bumping this since I'm not sure if any of replies relate to my last post:
mikes1p wrote:
TheWitness wrote:Does the "creating directory..." happen every time? Otherwise, please wait a polling cycle or two for the graph to appear. Also, what happens when your run "php <path_cacti>/cmd.php" at MEDIUM logging level?
Yes the "creating dirs" happend every time.

Yep I waited several polling cycles to see if was working, the empty graph I posted was for two hours after I had created the graph


Result from running cmd.php with logging at Medium:
  • View Cacti Log File [1 Items]

    12/01/2005 08:23:07 AM - CMDPHP: Poller[0] ERROR: The PHP Script: CMD.PHP Must be started using the full path to the file and in lower case. This is a PHP Bug!!!
I started trying to find out how to fix that problem after posting on this thread yesterday but haven't found a fix yet

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

#59 Post by TheWitness » Wed Dec 14, 2005 8:21 pm

Your user does not have permission to create the directories. Please create them and then allow the poller user to wrx to them..

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.

boyyy
Posts: 2
Joined: Thu Dec 15, 2005 2:02 am

The latency time values are incorrect!!!

#60 Post by boyyy » Thu Dec 15, 2005 2:19 am

Hello everyone,
I got a problem about the Advance pingv1.3 . It looks all the latency time of graph are not correct! They are very different with the values come from cli mode. What is problem?
Appreciate your responding.
Attachments
pingtime-cli.JPG
The latency value are correct here.
pingtime-cli.JPG (30.37 KiB) Viewed 15958 times
graph.JPG
The latency value are absolutely incorrect here.
graph.JPG (44.75 KiB) Viewed 15958 times

Post Reply