EDIT: Advanced Ping Template Version 1.3 for Cacti 0.8.6g
Moderators: Developers, Moderators
advanced ping for slow hosts
Anything I can do for slow hosts on the other side of the planet? The graph comes back all red as the latency is over 100ms?
min:304.6700 avg:305.7500 max:308.8100 dev:1.4193 loss:0.0000
min:304.6700 avg:305.7500 max:308.8100 dev:1.4193 loss:0.0000
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
Increase your ping timeout under Setting->Poller
TheWitness
TheWitness
True understanding begins only when we realize how little we truly understand...
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Has anyone out there an idea of what's wrong in here. I've got a number of devices which are monitored using the script. Some of them have good graphs and some of the are not. Like on the screenshot. All devices have equal settings - ICMP, 20 times. If I try to recreate graphs for both hosts the problem persist.
I just have no idea on where to dig. Here's a debug log from failing graph - looks good.
02/26/2007 01:11:05 PM - POLLER: Poller[0] CACTI2RRD: c:/rrdtool/rrdtool.exe update C:\Inetpub\wwwroot\cacti\rra\wan_bishkek_loss_70.rrd --template min:avg:max:dev:loss 1172484651:510.0500:561.3825:617.8700:22.9727:0.0000
02/26/2007 01:11:05 PM - CMDPHP: Poller[0] DEBUG: SQL Exec: "delete from poller_output where local_data_id='70' and rrd_name='' and time='2007-02-26 13:10:51'"
02/26/2007 01:11:05 PM - POLLER: Poller[0] Parsed MULTI output field 'loss:0.0000' [map loss->loss]
02/26/2007 01:11:05 PM - POLLER: Poller[0] Parsed MULTI output field 'dev:22.9727' [map dev->dev]
02/26/2007 01:11:05 PM - POLLER: Poller[0] Parsed MULTI output field 'max:617.8700' [map max->max]
02/26/2007 01:11:05 PM - POLLER: Poller[0] Parsed MULTI output field 'avg:561.3825' [map avg->avg]
02/26/2007 01:11:05 PM - POLLER: Poller[0] Parsed MULTI output field 'min:510.0500' [map min->min]
02/26/2007 01:11:05 PM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "select data_template_rrd.data_source_name, data_input_fields.data_name from (data_template_rrd,data_input_fields) where data_template_rrd.data_input_field_id=data_input_fields.id and data_template_rrd.local_data_id=70"
02/26/2007 01:11:05 PM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "select poller_output.output, poller_output.time, poller_output.local_data_id, poller_item.rrd_path, poller_item.rrd_name, poller_item.rrd_num from (poller_output,poller_item) where (poller_output.local_data_id=poller_item.local_data_id and poller_output.rrd_name=poller_item.rrd_name) LIMIT 10000"
02/26/2007 01:11:05 PM - CMDPHP: Poller[0] DEBUG: SQL Exec: "insert into poller_output (local_data_id, rrd_name, time, output) values (70, '', '2007-02-26 13:10:51', 'min:510.0500 avg:561.3825 max:617.8700 dev:22.9727 loss:0.0000')"
02/26/2007 01:11:05 PM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "select poller_id,end_time from poller_time where poller_id = 0"
02/26/2007 01:11:05 PM - CMDPHP: Poller[0] Host[9] DS[70] SERVER: C:/Inetpub/wwwroot/cacti/scripts/ss_fping.php ss_fping 10.163.156.254 20 ICMP , output: min:510.0500 avg:561.3825 max:617.8700 dev:22.9727 loss:0.0000
I just have no idea on where to dig. Here's a debug log from failing graph - looks good.
02/26/2007 01:11:05 PM - POLLER: Poller[0] CACTI2RRD: c:/rrdtool/rrdtool.exe update C:\Inetpub\wwwroot\cacti\rra\wan_bishkek_loss_70.rrd --template min:avg:max:dev:loss 1172484651:510.0500:561.3825:617.8700:22.9727:0.0000
02/26/2007 01:11:05 PM - CMDPHP: Poller[0] DEBUG: SQL Exec: "delete from poller_output where local_data_id='70' and rrd_name='' and time='2007-02-26 13:10:51'"
02/26/2007 01:11:05 PM - POLLER: Poller[0] Parsed MULTI output field 'loss:0.0000' [map loss->loss]
02/26/2007 01:11:05 PM - POLLER: Poller[0] Parsed MULTI output field 'dev:22.9727' [map dev->dev]
02/26/2007 01:11:05 PM - POLLER: Poller[0] Parsed MULTI output field 'max:617.8700' [map max->max]
02/26/2007 01:11:05 PM - POLLER: Poller[0] Parsed MULTI output field 'avg:561.3825' [map avg->avg]
02/26/2007 01:11:05 PM - POLLER: Poller[0] Parsed MULTI output field 'min:510.0500' [map min->min]
02/26/2007 01:11:05 PM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "select data_template_rrd.data_source_name, data_input_fields.data_name from (data_template_rrd,data_input_fields) where data_template_rrd.data_input_field_id=data_input_fields.id and data_template_rrd.local_data_id=70"
02/26/2007 01:11:05 PM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "select poller_output.output, poller_output.time, poller_output.local_data_id, poller_item.rrd_path, poller_item.rrd_name, poller_item.rrd_num from (poller_output,poller_item) where (poller_output.local_data_id=poller_item.local_data_id and poller_output.rrd_name=poller_item.rrd_name) LIMIT 10000"
02/26/2007 01:11:05 PM - CMDPHP: Poller[0] DEBUG: SQL Exec: "insert into poller_output (local_data_id, rrd_name, time, output) values (70, '', '2007-02-26 13:10:51', 'min:510.0500 avg:561.3825 max:617.8700 dev:22.9727 loss:0.0000')"
02/26/2007 01:11:05 PM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "select poller_id,end_time from poller_time where poller_id = 0"
02/26/2007 01:11:05 PM - CMDPHP: Poller[0] Host[9] DS[70] SERVER: C:/Inetpub/wwwroot/cacti/scripts/ss_fping.php ss_fping 10.163.156.254 20 ICMP , output: min:510.0500 avg:561.3825 max:617.8700 dev:22.9727 loss:0.0000
- Attachments
-
- graph_image.php.png (26.15 KiB) Viewed 12166 times
Any doubts
Hi,
I have installed the plugin in 0.8.6j version. It run well.
When the device is down or disconnected, in the graph appear like 'Unknown'.
This is correct? or it must appear 'PKt Loss 96-100%'.
What is the meaning of 'Unknown'?
Thks to all
I have installed the plugin in 0.8.6j version. It run well.
When the device is down or disconnected, in the graph appear like 'Unknown'.
This is correct? or it must appear 'PKt Loss 96-100%'.
What is the meaning of 'Unknown'?
Thks to all
Re: Any doubts
I get the same problem that I don't see nothing when the device is down instead of a red line.KARLOS wrote:Hi,
I have installed the plugin in 0.8.6j version. It run well.
When the device is down or disconnected, in the graph appear like 'Unknown'.
This is correct? or it must appear 'PKt Loss 96-100%'.
What is the meaning of 'Unknown'?
Thks to all
thx alex
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
I hope to correct this in the next point release. It's basically due to the fact that Cacti is "pinging" before the actual attempts to run any polling and if the device is down, I don't poll it.
Therefore, I am adding the requisite information into the hosts table in the next release and when I do my precheck, I will add all the information that Advance Ping needs to graph.
Once that is done, I will update this template to provide a new function to grab the required information. You will get RED then.
TheWitness
Therefore, I am adding the requisite information into the hosts table in the next release and when I do my precheck, I will add all the information that Advance Ping needs to graph.
Once that is done, I will update this template to provide a new function to grab the required information. You will get RED then.
TheWitness
True understanding begins only when we realize how little we truly understand...
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Using Advanced Ping Against Non SNMP Device
I have setup and I am using Advanced Ping on a whole series of SNMP enabled devices and it works like a charm, but I am wondering if it is possible to use this tool against non-SNMP enabled devices? I created the device where I get a "SNMP Information; SNMP error", obviously because this is not a SNMP enabled device, but when I try and create the graph I am getting no love.
Does Advanced Ping require that SNMP be enabled on all remote devices?
Am I simply being daft, or am I missing something?
Also a huge kudos for the work and development on this tool.
Cheers
Does Advanced Ping require that SNMP be enabled on all remote devices?
Am I simply being daft, or am I missing something?
Also a huge kudos for the work and development on this tool.
Cheers
Is it possible to ping multiple interfaces on a device? For instance, I have a couple of multi-homed Asterisk PBXs over in Germany and I'd like to be able to ping their outside interfaces (which connect into the local POTS) as well as the internal interfaces which we use to talk to them over SIP and gather SNMP stats.
Problem with Advanced Ping
I have the current version installed. I am not getting any data back. From a debug log file I see:
05/24/2007 01:27:41 PM - PHPSVR: Poller[0] DEBUG: INC: 'c:/xampp/htdocs/cacti/scripts/ss_fping.php' FUNC: '' PARMS: ''
05/24/2007 01:27:41 PM - PHPSVR: Poller[0] WARNING: Function does not exist
05/24/2007 01:27:41 PM - CMDPHP: Poller[0] Host[3] DS[1384] WARNING: Result from SERVER not valid. Partial Result: WARNING: Function do
05/24/2007 01:27:41 PM - CMDPHP: Poller[0] Host[3] DS[1384] SERVER: c:/xampp/htdocs/cacti/scripts/ss_fping.php, output: U
But if I run php c:/xampp/htdocs/cacti/scripts/ss_fping.php <host> 5 icmp I get valid numbers back..
05/24/2007 01:27:41 PM - PHPSVR: Poller[0] DEBUG: INC: 'c:/xampp/htdocs/cacti/scripts/ss_fping.php' FUNC: '' PARMS: ''
05/24/2007 01:27:41 PM - PHPSVR: Poller[0] WARNING: Function does not exist
05/24/2007 01:27:41 PM - CMDPHP: Poller[0] Host[3] DS[1384] WARNING: Result from SERVER not valid. Partial Result: WARNING: Function do
05/24/2007 01:27:41 PM - CMDPHP: Poller[0] Host[3] DS[1384] SERVER: c:/xampp/htdocs/cacti/scripts/ss_fping.php, output: U
But if I run php c:/xampp/htdocs/cacti/scripts/ss_fping.php <host> 5 icmp I get valid numbers back..
i try to debug :
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
Paste the entire line ending in "TCP 80" into the script server window and hit <CR>
quit <CR>
someon can explain me what is wrong please?
thanks to
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 serverroot@localhost cacti]# php /var/www/html/cacti/scripts/ss_fping.php ss_fping 192.168.0.5 20 ICMP
PHP Notice: Undefined variable: method in /var/www/html/cacti/scripts/ss_fping.php on line 61
PHP Warning: socket_connect() expects parameter 3 to be long, string given in /var/www/html/cacti/lib/ping.php on line 356
PHP Warning: socket_write() unable to write to socket [89]: Destination address required in /var/www/html/cacti/lib/ping.php on line 379
PHP Notice: Undefined variable: method in /var/www/html/cacti/scripts/ss_fping.php on line 61
PHP Warning: socket_connect() expects parameter 3 to be long, string given in /var/www/html/cacti/lib/ping.php on line 356
PHP Warning: socket_write() unable to write to socket [89]: Destination address required in /var/www/html/cacti/lib/ping.php on line 379
Paste the entire line ending in "TCP 80" into the script server window and hit <CR>
d) Quit the script server[root@localhost cacti]# php /var/www/html/cacti/scripts/ss_fping.php ss_fping 192.168.0.5 TCP 80
Content-type: text/html
X-Powered-By: PHP/4.3.9
loss:100.00[root@localhost cacti]# php /var/www/html/cacti/scripts/ss_fping.php ss_fping 192.168.0.5 80 TCP
PHP Notice: Undefined variable: method in /var/www/html/cacti/scripts/ss_fping.php on line 61
PHP Warning: socket_connect() expects parameter 3 to be long, string given in /var/www/html/cacti/lib/ping.php on line 356
PHP Warning: socket_write() unable to write to socket [89]: Destination address required in /var/www/html/cacti/lib/ping.php on line 379
PHP Notice: Undefined variable: method in /var/www/html/cacti/scripts/ss_fping.php on line 61
PHP Warning: socket_connect() expects parameter 3 to be long, string given in /var/www/html/cacti/lib/ping.php on line 356
PHP Warning: socket_write() unable to write to socket [89]: Destination address required in /var/www/html/cacti/lib/ping.php on line 379
quit <CR>
someon can explain me what is wrong please?
thanks to
|Cacti Version - 0.8.6j||Plugin Architecture - 1.1||Poller Type - CMD.php|
|os - Red hat 4es | |Web Server - Apache/2.0.52 (Red Hat)|
|PHP - 4.3.9| |MySQL - 4.1.20| |RRDTool - 1.2.13||SNMP - 5.1.2|
|Plugins| Host Info (hostinfo - v0.1)
|os - Red hat 4es | |Web Server - Apache/2.0.52 (Red Hat)|
|PHP - 4.3.9| |MySQL - 4.1.20| |RRDTool - 1.2.13||SNMP - 5.1.2|
|Plugins| Host Info (hostinfo - v0.1)
-
- Posts: 1
- Joined: Wed May 30, 2007 12:17 pm
OSX/Unix Advanced Ping issues. ss_fping
In scriptserver either run via sudo or not:
a) TCP 80 ping works fine
b) ICMP and UDP 53 doesn't work and generates 100% packet loss
cactiuser has been added to sudoers but not really helpful without dropping sudo in somewhere -> though cactiuser not asked for password in sudoers file etc. I think it's the parent scripts privileges that are inherited?
Is this a socket issue again and what would be the fastest way to remedy?
Also: ping.pl is working now and again.. mostly not for standard unix host ping. This is intermittent and may be more a blocking and FOPEN issue?
Poller is running in root's crontab.
Mac OS X 10.4.9 (8P2137)
Server version: Apache/1.3.33 (Darwin)
PHP 5.2.2 (cli) (built: May 30 2007 03:14:09)
Cacti 0.8.6j ( from darwinports )
I also tweaked ping.pl a bit....
Am using cmd.php and not cactid.. maybe I shoould try cactid poller again?
Any thoughts guys?
Is is possible for ping.php to su itself?
AM A MUPPETITTO. ALSO IF SOMEONE COULD EDIT MY USERNAME AS I USED A FULL EMAIL ADDRESS ACCIDENTALLY IN A RUSH. ITS A THROW AWAY ACCOUNT BUT MAYBE YOU GUYS COULD EDIT DOWN TO THE USERID ONLY? TKS.
a) TCP 80 ping works fine
b) ICMP and UDP 53 doesn't work and generates 100% packet loss
cactiuser has been added to sudoers but not really helpful without dropping sudo in somewhere -> though cactiuser not asked for password in sudoers file etc. I think it's the parent scripts privileges that are inherited?
Is this a socket issue again and what would be the fastest way to remedy?
Also: ping.pl is working now and again.. mostly not for standard unix host ping. This is intermittent and may be more a blocking and FOPEN issue?
Poller is running in root's crontab.
Mac OS X 10.4.9 (8P2137)
Server version: Apache/1.3.33 (Darwin)
PHP 5.2.2 (cli) (built: May 30 2007 03:14:09)
Cacti 0.8.6j ( from darwinports )
I also tweaked ping.pl a bit....
Code: Select all
#!/usr/bin/perl
open(PROCESS, "ping -D -c 1 -n -Q -z 184 $ARGV[0] | grep icmp_seq |");
$ping = <PROCESS>;
$ping =~ m/(.*time=)(.*) (ms|usec)/;
close(PROCESS);
print $2;
exit;
Any thoughts guys?
Code: Select all
php /opt/local/share/cacti/scripts/ss_fping.php www.cymru.com 2 ICMP
PHP Warning: socket_create(): Unable to create socket [1]: Operation not permitted in /opt/local/share/cacti/lib/ping.php on line 150
PHP Warning: socket_set_block() expects parameter 1 to be resource, boolean given in /opt/local/share/cacti/lib/ping.php on line 152
PHP Warning: socket_create(): Unable to create socket [1]: Operation not permitted in /opt/local/share/cacti/lib/ping.php on line 150
PHP Warning: socket_set_block() expects parameter 1 to be resource, boolean given in /opt/local/share/cacti/lib/ping.php on line 152
sudo php /opt/local/share/cacti/scripts/ss_fping.php www.cymru.com 2 ICMP
min:210.0300 avg:210.0300 max:210.0300 dev:0.0000 loss:50.0000
php /opt/local/share/cacti/scripts/ss_fping.php www.cymru.com 2 TCP 80
min:210.7500 avg:235.2050 max:259.6600 dev:24.4550 loss:0.0000
id uid=503(cacti) gid=503(cacti) groups=503(cacti), 81(appserveradm), 79(appserverusr), 80(admin)
AM A MUPPETITTO. ALSO IF SOMEONE COULD EDIT MY USERNAME AS I USED A FULL EMAIL ADDRESS ACCIDENTALLY IN A RUSH. ITS A THROW AWAY ACCOUNT BUT MAYBE YOU GUYS COULD EDIT DOWN TO THE USERID ONLY? TKS.
and i have no graph created with this plug can hel please?
when i lunch ss_fping i have this
can help me please:
when i lunch ss_fping i have this
can help me please:
[root@localhost scripts]# php ss_fping.php
Content-type: text/html
X-Powered-By: PHP/4.3.9
<br />
<b>Fatal error</b>: Cannot instantiate non-existent class: net_ping in <b>/mnt/150/sda/0/6/ychouchane/cacti/Template/fping/ss_fping.php</b> on line <b>25</b><br />
- Attachments
-
- No grpah why???
- pingooooo.JPG (38.32 KiB) Viewed 10331 times
|Cacti Version - 0.8.6j||Plugin Architecture - 1.1||Poller Type - CMD.php|
|os - Red hat 4es | |Web Server - Apache/2.0.52 (Red Hat)|
|PHP - 4.3.9| |MySQL - 4.1.20| |RRDTool - 1.2.13||SNMP - 5.1.2|
|Plugins| Host Info (hostinfo - v0.1)
|os - Red hat 4es | |Web Server - Apache/2.0.52 (Red Hat)|
|PHP - 4.3.9| |MySQL - 4.1.20| |RRDTool - 1.2.13||SNMP - 5.1.2|
|Plugins| Host Info (hostinfo - v0.1)
I have the same problem.a) TCP 80 ping works fine
b) ICMP and UDP 53 doesn't work and generates 100% packet loss
As root
Code: Select all
php /var/www/cacti/script_server.php
PHP Script Server has Started - Parent is cmd
/var/www/cacti/scripts/ss_fping.php ss_fping www.google.com
min:51.4300 avg:53.9317 max:55.0000 dev:1.2807 loss:0.0000
Code: Select all
06/07/2007 11:55:10 AM - CMDPHP: Poller[0] Host[4] DS[64] SERVER: /var/www/cacti/scripts/ss_fping.php ss_fping www.google.com 20 ICMP , output: loss:100.00
Code: Select all
06/07/2007 11:55:09 AM - CMDPHP: Poller[0] Host[2] DS[63] SERVER: /var/www/cacti/scripts/ss_fping.php ss_fping www.google.com 20 TCP 80, output: min:6.8000 avg:14.9305 max:16.9500 dev:2.0806 loss:0.0000
Who is online
Users browsing this forum: No registered users and 1 guest