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
coucou78
Posts: 3
Joined: Thu Nov 15, 2007 10:58 am

shit

Post by coucou78 »

this script is a pure shit ....

sorry but no comments, no debugging options .... doesn't work ...

i'm going to write new one ..pfffff
User avatar
Gabriel
Posts: 28
Joined: Sun Jan 04, 2009 7:08 pm
Location: Auckland, NZ

Post by Gabriel »

so I have installed the plugin which is posted by Jug at 29/10/08.
Made the changes in ss_fping.php as per reboot's comment at 13/12/08 and I can run the php script returning results.
I've installed the original template as per reboot's comment at 16/12/08.

Created the graphs but the graphs are on straight 100% packet loss.
This is the error I get in the log:

01/16/2009 05:11:04 PM - CMDPHP: Poller[0] Host[5] Description[CommsRoom 6509] DS[1908] Graphs['CommsRoom 6509 - Advanced Ping'] WARNING: Result from SERVER not valid. Partial Result: Notice: Undefined va
01/16/2009 05:11:04 PM - CMDPHP: Poller[0] Host[5] Description[CommsRoom 6509] DS[1907] Graphs['CommsRoom 6509 - Advanced Ping'] WARNING: Result from SERVER not valid. Partial Result:

some help please?

Also I had an assumption that fping is the answer to non-root pings.
however, when you add device and set availability via ICMP, it seems to use ping not fping. howcome?
Moreover, can you explain how cacti uses ss_fping.php and ping.php?


Cheers,
Gabriel

p.s

reading the whole thread I start to have a feeling that one's using this script with Windows installs works, while the linux crowd had a hard time making this to work.
Cacti Version - 0.8.7b
Plugin Architecture - 2.1
Poller Type - CMD.php
Server Info - Linux 2.6.24-19-server
Web Server - Apache/2.2.8 (Ubuntu) PHP/5.2.4-2ubuntu5.4 with Suhosin-Patch
PHP - 5.2.4-2ubuntu5.4
PHP Extensions - zip, xmlwriter, libxml, xml, wddx, tokenizer, sysvshm, sysvsem, sysvmsg, session, SimpleXML, sockets, soap, SPL, shmop, standard, Reflection, posix, mime_magic, mbstring, json, iconv, hash, gettext, ftp, filter, exif, dom, dba, date, ctype, calendar, bz2, bcmath, zlib, pcre, openssl, xmlreader, apache2handler, gd, mysql, mysqli, PDO, pdo_mysql, snmp
MySQL - 5.0.51a-3ubuntu5.4
RRDTool - 1.2.19
SNMP - 5.4.1
Plugins
  • Global Plugin Settings (settings - v0.5)
    Network Tools (tools - v0.3)
    Thresholds (thold - v0.3.9)
    Realtime for Cacti (realtime - v0.32)
    Device Monitoring (monitor - v0.8.2)
    Cacti Log View (CLog - v1.1)
    Network Discovery (discovery - v0.8.4)
    Host Info (hostinfo - v0.2)
    Login Page Mod (loginmod - v1.0)
    PHP Network Managing (PHP Network Managing - v0.6)
fxef79
Posts: 9
Joined: Fri Jun 08, 2007 11:10 am

Post by fxef79 »

I'm curious about the "normal" appearance of the graphs using this template when there is packet loss...

I've used advanced ping 1.3 on a number of 0.8.6<x> cacti builds, and would get vertical colored bars showing percentage packet loss during "outages". However I recently completely rebuilt a cacti server with 0.8.7c (my first 0.8.7<x> build) and used the recently posted "2.1" version, including installing fping binary.

Now I just get "gaps" in the graphs rather than colored bars. Is this a change and thus normal for the 2.1 template, or am I missing something obvious? Or, is this more likely something due to 0.8.7<x> cacti ?

Thanks!!
kevin_taco
Posts: 37
Joined: Fri Feb 11, 2005 5:32 pm

Post by kevin_taco »

Thanks for the Advanced Ping. It's awesome.

I'm having the same problem felimwhiteley is havin with exporting these graphs.

I'm using 8.7c and have set Classic Presentation to a local path.

The non Advanced Ping graphs export just find with the daily,weekly,year, drill downs but the Advanced Ping graphs only display the initial graph.

Anyone else having this problem?

Any help is greatly appreciated...

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

Post by jbarbieri »

I am getting a loss of 100%

Code: Select all

02/18/2009 04:00:05 PM - SPINE: Poller[0] Host[9] DS[7145] SS[0] SERVER: /opt/mrtg01/cacti/scripts/ss_fping.php ss_fping 172.17.1.1 20 ICMP , output: loss:100.00
Even though I can ping from the server.
iso1779
Posts: 17
Joined: Fri Feb 20, 2009 1:32 pm

Post by iso1779 »

Hi,
I am running cacti 0.8.7d and PA2.4
I am having exactly the same problem as jbarbieri
when using ping mode icmp I get 100% packet loss.
when using ping mode TCP, Advanced ping is running fine.
I have tried running ss_fping from command line after starting script_server but I get following error: ping: invalid linger time.
I have tried setting suid for ping ss_fping script_server ping etc... but without any success.

Any help would be appreciated.

br
iso1779
iso1779
Posts: 17
Joined: Fri Feb 20, 2009 1:32 pm

ping: invalid linger time

Post by iso1779 »

Hi,
I have managed to solve the issue I described above.
I had changed the ping timeout to 5000 in the poller configuration, this caused the error.
Once I changed the timeout back to 2000 (the maximum apparently) the error went away.

Hopefully this helps others too.

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

Post by jbarbieri »

Hmm, my timeout was set to 400 :/
arturrenato
Posts: 2
Joined: Wed Dec 10, 2008 2:42 pm

working

Post by arturrenato »

Hi,

I've modified this part of the script, and it's working for me:

include_once(dirname(__FILE__) . "/../include/config.php");
include_once(dirname(__FILE__) . "/../include/global.php");
include_once(dirname(__FILE__) . "/../lib/snmp.php");
include_once(dirname(__FILE__) . "/../lib/ping.php");

Added line 2.

# php ss_fping.php localhost
min:0.0300 avg:0.0583 max:0.1300 dev:0.0362 loss:0.0000


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

Post by jbarbieri »

Still not working for me :(


Code: Select all

/opt/mrtg01/cacti/scripts/ss_fping.php ss_fping 172.16.1.3 10 ICMP
loss:100.00

Code: Select all

bash-3.00# php ss_fping.php localhost
loss:100.00bash-3.00#
iso1779
Posts: 17
Joined: Fri Feb 20, 2009 1:32 pm

Post by iso1779 »

Hi Jbarbieri (doesn't that mean hearcutter in polish lol?)
can you try following.
first, a manual ping, then a manual telnet and or ssh from you cacti device to the target.
second try

Code: Select all

/opt/mrtg01/cacti/scripts/ss_fping.php ss_fping 172.16.1.3 10 ICMP
//if telnet responds try
/opt/mrtg01/cacti/scripts/ss_fping.php ss_fping 172.16.1.3 1 TCP 23
//if ssh responds try
/opt/mrtg01/cacti/scripts/ss_fping.php ss_fping 172.16.1.3 1 TCP 22
/code]
you can also try to run these commands within the script_server.
post the results
br
Olivier
iso1779
Posts: 17
Joined: Fri Feb 20, 2009 1:32 pm

Re: working

Post by iso1779 »

arturrenato wrote:Hi,

I've modified this part of the script, and it's working for me:

include_once(dirname(__FILE__) . "/../include/config.php");
include_once(dirname(__FILE__) . "/../include/global.php");
include_once(dirname(__FILE__) . "/../lib/snmp.php");
include_once(dirname(__FILE__) . "/../lib/ping.php");

Added line 2.

# php ss_fping.php localhost
min:0.0300 avg:0.0583 max:0.1300 dev:0.0362 loss:0.0000


Artur
Hi arturrenato,
what was the initial issue you had?
br
Olivier
jbarbieri
Cacti User
Posts: 101
Joined: Tue May 24, 2005 8:46 am
Location: Rochester, New Hampshire
Contact:

Post by jbarbieri »

Heres the interesting part, if I try and ping a device that does not exist, I dont get a response for a good while, whereas, the good device responds instantly with loss of 100


Code: Select all

bash-3.00# php ../script_server.php
PHP Script Server has Started - Parent is cmd
/opt/mrtg01/cacti/scripts/ss_fping.php ss_fping 172.16.1.3 10 ICMP
loss:100.00
/opt/mrtg01/cacti/scripts/ss_fping.php ss_fping 172.16.1.10 10 ICMP

<hung here>
Took about 2 minutes for it to finally time out.
User avatar
Gabriel
Posts: 28
Joined: Sun Jan 04, 2009 7:08 pm
Location: Auckland, NZ

Gaps in Advanced ping graph, I want to see Color!

Post by Gabriel »

I really hope some still read this old topic..

My advanced ping graph only shows latency not packet loss.

When there is a packet loss, all it does is to leave a gap in the advacnced ping graph. I'm expecting to see some colors indicating % of packet loss rather.

And this gap is happening across all other graphs out of the same device too.

How do I fix this?

I have a gut feeling it's resolved somewhere in the post, but trust me, I did try hard to find the solution from the forum but just couldn't find that page!

Cheers,
Gabriel
iso1779
Posts: 17
Joined: Fri Feb 20, 2009 1:32 pm

no ping loss shown

Post by iso1779 »

Hi Gabriel,
I had the same issue.
I went to page 3 of this post and downloaded the ping.php and ss_fping.php

copy the ping.php into the lib directory of cacti and the ss_fping.php to the normal scripts directory of cacti.

this fixed my issue.

br
Olivier
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests