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
galco
Cacti User
Posts: 63
Joined: Fri Aug 03, 2007 3:09 am
Location: Barcelona, Catalunya

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

#436 Post by galco » Tue Oct 19, 2010 5:29 am

Hi,
I've installed/imported Advanced Ping v1.3 graph template and I'm not sure if it's correctly installed.
Is it normal that the graph template doesn't have any data source associated?

Look at items 7-13, 16-20 and 24-30 from the attachment.

If it's not correct which data source would be used? loss?

Thank you for your help

--
Gerard
Attachments
aping.png
graph template advanced ping
aping.png (96.8 KiB) Viewed 7291 times

mydream
Posts: 1
Joined: Wed Oct 13, 2010 2:47 am

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

#437 Post by mydream » Mon Mar 21, 2011 1:14 am

advanced ping template setting...
- CDEF
d,0,GT,d,2,GT,UNKN,INF,IF,UNKN,IF --> value 'd' means DEF's 'loss' (DEF:d="cactipath/test_loss_xxx.rrd":loss:AVERAGE \)
d,0,GT,d,2,GT,UNKN,d,IF,UNKN,IF --> value 'd' means DEF's 'loss'
Advanced Ping - Position 1,2: cdef=e,2,/ --> 'e' means DEF's 'dev'
Advanced Ping - Position 3,4,5: cdef=c,b,-,e,-,3,/ --> 'c' means 'max', 'b' means 'avg', 'e' means 'dev'
Advanced Ping - Stack Min - 20 %: cdef=b,a,-,0.2,* --> 'b' means 'avg', 'a' means 'min'

- if latency time > 400 ms then, (too many ping loss)
data template > PING - Advanced Ping > Data Source Item (all) > Maximum Value : greater 1000 (graph limit)
console > settings > poller > host availability setting > ping timeout value : greater 1000 (default host ping timeout value)

thanks.

soulraven
Posts: 18
Joined: Mon Jan 08, 2007 2:40 am
Location: Campulung Muscel
Contact:

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

#438 Post by soulraven » Tue Apr 26, 2011 2:26 pm

whay look so big...is any setting to make it smaller.....

LE: and way the IP is not show in the graphs?

LEE:
PHP Deprecated: Function split() is deprecated in /usr/share/cacti/site/scripts/ss_fping.php on line 113
PHP Warning: Division by zero in /usr/share/cacti/site/scripts/ss_fping.php on line 134
min:9999.9900 avg:0.0000 max:0.0000 dev:0.0000 loss:[email protected]:~#
Attachments
strange look.PNG
strange look
strange look.PNG (26.81 KiB) Viewed 6344 times

noname
Cacti Guru User
Posts: 1566
Joined: Thu Aug 05, 2010 2:04 am
Location: Japan

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

#439 Post by noname » Tue Apr 26, 2011 11:54 pm

soulraven wrote:whay look so big...is any setting to make it smaller.....
In 'Settings -> Visual', set font size smaller or specify alternate font as you like
soulraven wrote:and way the IP is not show in the graphs?
Add "|host_hostname|" to title settings in Graph Template
e.g. "|host_description| (|host_hostname|) - Advanced Ping"
advanced_ping_template.png
advanced_ping_template.png (3.75 KiB) Viewed 6337 times
advanced_ping_graph.png
Please don't care about packet loss
advanced_ping_graph.png (16.59 KiB) Viewed 6337 times
soulraven wrote:PHP Deprecated: Function split() is deprecated in /usr/share/cacti/site/scripts/ss_fping.php on line 113
PHP Warning: Division by zero in /usr/share/cacti/site/scripts/ss_fping.php on line 134
min:9999.9900 avg:0.0000 max:0.0000 dev:0.0000 loss:[email protected]:~#
Replace split() with explode()
But I think ss_fping.php (v1.3) doesn't have lines so much (113 or 134)

pharoz
Posts: 8
Joined: Wed Apr 27, 2011 4:35 pm

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

#440 Post by pharoz » Wed Apr 27, 2011 4:44 pm

Hi,

I'm pulling out my hair trying to get this script to work. :cry:

I'm running Cacti 0.8.7g with Advance Ping 1.3.

I copied the ss_ping.php file to the scripts directory and imported the XML templates.

Added the graphs for the host, but nothing shows up. The RRD does not get created either (I'm thinking this may be the culprit?).

I made sure to install fping on the server as well. Also tried using the cuurent ss_fping.php that came with the latest version of Cacti, and I also cleared the poller cache.

Here's the error I'm getting:

Code: Select all

04/27/2011 02:35:08 PM - CMDPHP: Poller[0] Host[14] DS[2056] WARNING: Result from SERVER not valid. Partial Result: WARNING: Function do
04/27/2011 02:35:08 PM - PHPSVR: Poller[0] WARNING: Function does not exist
04/27/2011 02:35:08 PM - PHPSVR: Poller[0] WARNING: PHP Script File to be included, does not exist 
Here's the poller cache item:

Code: Select all

	Script Server: path_cacti/scripts/ss_fping.php ss_fping hostnameattemptsprotocolport
	RRD: /usr/share/cacti/rra/pma-sw1_loss_2056.rrd 
I also ran the script_server.php with the ss_ping script and verify that it is indeed working.

Any ideas??? I would really like to get this script to work.

pharoz
Posts: 8
Joined: Wed Apr 27, 2011 4:35 pm

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

#441 Post by pharoz » Wed Apr 27, 2011 4:44 pm

Hi,

I'm pulling out my hair trying to get this script to work. :cry:

I'm running Cacti 0.8.7g with Advance Ping 1.3.

I copied the ss_ping.php file to the scripts directory and imported the XML templates.

Added the graphs for the host, but nothing shows up. The RRD does not get created either (I'm thinking this may be the culprit?).

I made sure to install fping on the server as well. Also tried using the cuurent ss_fping.php that came with the latest version of Cacti, and I also cleared the poller cache.

Here's the error I'm getting:

Code: Select all

04/27/2011 02:35:08 PM - CMDPHP: Poller[0] Host[14] DS[2056] WARNING: Result from SERVER not valid. Partial Result: WARNING: Function do
04/27/2011 02:35:08 PM - PHPSVR: Poller[0] WARNING: Function does not exist
04/27/2011 02:35:08 PM - PHPSVR: Poller[0] WARNING: PHP Script File to be included, does not exist 
Here's the poller cache item:

Code: Select all

	Script Server: path_cacti/scripts/ss_fping.php ss_fping hostnameattemptsprotocolport
	RRD: /usr/share/cacti/rra/pma-sw1_loss_2056.rrd 
I also ran the script_server.php with the ss_ping script and verify that it is indeed working.

Any ideas??? I would really like to get this script to work.

CCNAJ
Posts: 30
Joined: Fri Apr 15, 2011 7:13 am
Location: Australia

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

#442 Post by CCNAJ » Mon May 02, 2011 4:44 am

Jitter calculation.

Nice template template TheWitness - many thanks up front.

Just wondering if anyone has attempted to add a jitter calculation to this graph?

No idea where to start since jitter is the calculation of delta in pings (average of the variation in ping times)

Where would I start to get this going?

EDIT : found it - a Line 1 item on the Ping -dev (Max) task does exactly this - [dev = deviation]
Last edited by CCNAJ on Thu May 05, 2011 10:42 pm, edited 1 time in total.
++++++ Cacti Newbie ++++++++++++++++++++++++++++++++++++++++++
Cacti 0.8.8f with PIA on a Centos6 VM
Plugins Used: Infopage | RouterConfigs | Spikekill | BOOST | REALTIME | CLOG

matthys
Posts: 9
Joined: Tue Oct 28, 2008 1:50 pm

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

#443 Post by matthys » Thu May 05, 2011 4:02 pm

I just installed this template and have 2 questions:

1) Would it be able to mention destination in header, like "[host] - Advanced Ping to [Destination]"?

2) Also would be nice to have additional parameter of ping size (fping -b 1000 etc).

Thanks,
Matthijs

noname
Cacti Guru User
Posts: 1566
Joined: Thu Aug 05, 2010 2:04 am
Location: Japan

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

#444 Post by noname » Thu May 05, 2011 9:06 pm

matthys wrote:1) Would it be able to mention destination in header, like "[host] - Advanced Ping to [Destination]"?
In Graph Template, use '|host_hostname|' as destination. (see the above post)
matthys wrote:2) Also would be nice to have additional parameter of ping size (fping -b 1000 etc).
Modify '$data = ...' at lines the below in 'lib/ping.php'.

For ICMP ping,
if your Cacti's os is "unix" (see "Technical Support" or click cactus icon at the bottom of console),

Code: Select all

	function build_icmp_packet() {
		...
		$data = "cacti-monitoring-system"; // the actual test data
If not unix, probably these lines related. Try to add option "-l (size)".

Code: Select all

	}else if (substr_count(strtolower(PHP_OS), "winnt")) {
		$result = shell_exec("ping -w " . $this->timeout . " -n " . $this->retries . " " . $this->host["hostname"]);
For UDP ping,

Code: Select all

	function build_udp_packet() {
		$data = "cacti-monitoring-system"; // the actual test data
(For TCP ping, it seems to check only whether if can connect to given port)

Strings "cacti-monitoring-system" has the size of 23bytes, then for example, replace with this:

$data = str_repeat("A", 1000);

See also: ICMP Echo Request message format

matthys
Posts: 9
Joined: Tue Oct 28, 2008 1:50 pm

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

#445 Post by matthys » Fri May 06, 2011 11:05 am

noname wrote:In Graph Template, use '|host_hostname|' as destination.
It's not the host_hostname I want ... but the destination I ping from the host.
Something like "HOSTNAME - Advance Ping to 123.123.123.123"

And I would like to create an option (like ICMP, TCP, or UDP) to fill in the size of the ping. But I guess I have to modify the template for this.

Thanks anyway,
Matthijs

noname
Cacti Guru User
Posts: 1566
Joined: Thu Aug 05, 2010 2:04 am
Location: Japan

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

#446 Post by noname » Fri May 06, 2011 11:26 am

matthys wrote:
noname wrote:In Graph Template, use '|host_hostname|' as destination.
It's not the host_hostname I want ... but the destination I ping from the host.
Something like "HOSTNAME - Advance Ping to 123.123.123.123"
"|host_hostname|" denotes hostname or IP address of target host in Device settings.
That didn't satisfy your purpose?
matthys wrote:And I would like to create an option (like ICMP, TCP, or UDP) to fill in the size of the ping. But I guess I have to modify the template for this.
Probably you need to add argument (e.g. "<packetsize>") to Data Input Method and ss_fping.php.

matthys
Posts: 9
Joined: Tue Oct 28, 2008 1:50 pm

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

#447 Post by matthys » Sat May 07, 2011 4:47 am

Maybe we misunderstood each other?

I mean the "Hostname or IP Address of the device to ping" (under Custom Data [data input: PING - Advanced Ping]) you set for each host in the Advanced Ping.

And |host_hostname| is the hostname you ping FROM, not TO (destination), if I do not mistake.

Cheers,
Matthijs

noname
Cacti Guru User
Posts: 1566
Joined: Thu Aug 05, 2010 2:04 am
Location: Japan

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

#448 Post by noname » Mon May 09, 2011 6:35 am

matthys wrote:I mean the "Hostname or IP Address of the device to ping" (under Custom Data [data input: PING - Advanced Ping]) you set for each host in the Advanced Ping.
Oh! So sorry! :oops:
Custom Data field! That's MY misunderstanding.
Image

I had never enabled this field before..

hugleo
Posts: 10
Joined: Sat Sep 05, 2009 4:33 pm

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

#449 Post by hugleo » Sat May 14, 2011 1:36 pm

tytanick wrote: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 ?

Yes!
To draw a red line follow the steps:

1) Click on Console Tab - Templates - Graph Templates - PING - Advanced Ping v1.3 (img1.jpg -
img1.jpg
img1.jpg (342.68 KiB) Viewed 6155 times
)

2) Click on Item # 14 - (No Task): Unknown<HR> (img2.jpg -
img2.jpg
img2.jpg (314.37 KiB) Viewed 6155 times
)

3) Select a red color and Area to Graph Item Type (img3.jpg -
img3.jpg
img3.jpg (228.1 KiB) Viewed 6155 times
)

That's it! (screen.jpg -
screen.jpg
screen.jpg (138.44 KiB) Viewed 6155 times
)

noname
Cacti Guru User
Posts: 1566
Joined: Thu Aug 05, 2010 2:04 am
Location: Japan

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

#450 Post by noname » Fri May 20, 2011 3:42 am

Hi matthys,
matthys wrote: 1) Would it be able to mention destination in header, like "[host] - Advanced Ping to [Destination]"?
Now I've tried that feature -- how about this?
- http://forums.cacti.net/viewtopic.php?f=5&t=42802

Post Reply