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
XStrafer
Posts: 2
Joined: Mon Oct 31, 2005 10:29 am

Post by XStrafer »

Got a problem...

Advanced ping draws me a 100%LOSS red area...

when run from command line like:
php /opt/apache/htdocs/cacti/scripts/ss_fping.php 10.0.0.1 20 ICMP
i'm getting results like:
min:3.0200 avg:7.1660 max:18.1600 dev:3.8572 loss:0.0000
looks good...

but when run under the scripts_server, I'm getting just this line:
loss:100.00

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

Post by TheWitness »

If you are running UNIX, the script_server has to have rights to create a RAW socket (aka root or asroot). Otherwise use something like "TCP 80" or something similar. Windows does not care.

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?
XStrafer
Posts: 2
Joined: Mon Oct 31, 2005 10:29 am

Post by XStrafer »

Byt how to ping this way GOOGLE.com or YAHOO.de or NS.RIPE.net as they show LOSS 100% when trying to ping them by TCP 80 port...
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

XStrafer wrote:Byt how to ping this way GOOGLE.com or YAHOO.de or NS.RIPE.net as they show LOSS 100% when trying to ping them by TCP 80 port...
Hmm, I'm kinda worried about your statement. As I'm polling one of those with exactly this script using TCP 80 without any problems (how the hell would google.com answer to http requests if it does not SYN to TCP 80?).
May you please check the function against some local hosts of your own? To get results quick, please run the script from command line providing hostname, number of requests, protocol (ICMP, TCP, UDP) and port.
Reinhard
JaMa
Posts: 1
Joined: Tue Nov 01, 2005 2:30 am

Advanced ping to IPv6 address

Post by JaMa »

Hello,

it's possible to add IPv6 support to ss_fping.php?

It would be nice.

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

Post by TheWitness »

Use the Script Server debug statement to determine what is going on:

1) login as the cactid demon user account:

2) cd to the cacti web root

3) run: "php <path_cacti>/script_server.php"

NOTE: you should not get any errors or warnings

4) enter one of your ss_fping commands from the poller_cache

5) post anything out of the ordinary

BTB, my testing was ICMP'ing and TCP 80 pinging www.google.com no problem.

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?
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

JaMa,

I will check into IPv6 for you. This will be somewhat dependent on PHP.

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?
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Off hand, it does not look too difficult to add an IPv6 to ss_fping.php. However, I have a question. Is your cacti installation today working properly with IPv6? I have not implemented it in Cactid, so I was just wondering.

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?
ioiioi
Cacti User
Posts: 52
Joined: Mon Mar 28, 2005 8:57 am

Post by ioiioi »

Can this plugin be use for masuring a specific network service's latency?
I know I can specific the port number when creating a graph, but maybe this Plugin is not smart enough to construct such specific packet.
for example, the LDAP request should including this info within the packet.

Code: Select all

host = my.host
attrs = uid,someotherattr
base = dc=foo,dc=bar
binddn = uid=testuser,dc=foo,dc=bar
filter = uid=testuser # mandatory
mininterval = 1
password = mypass
pings = 5
port = 389
start_tls = 1
timeout = 10
version = 3
copied from http://people.ee.ethz.ch/~oetiker/webtools/smokeping/probe/LDAP.en.html
Maybe, my request is far from this plugin's original purose, forgive me.
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

I know where you are going. This is not too difficult, but I have other priorities.

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?
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

ioiioi wrote:Can this plugin be use for masuring a specific network service's latency?
I know I can specific the port number when creating a graph, but maybe this Plugin is not smart enough to construct such specific packet.
for example, the LDAP request should including this info within the packet.

Code: Select all

host = my.host
attrs = uid,someotherattr
base = dc=foo,dc=bar
binddn = uid=testuser,dc=foo,dc=bar
filter = uid=testuser # mandatory
mininterval = 1
password = mypass
pings = 5
port = 389
start_tls = 1
timeout = 10
version = 3
copied from http://people.ee.ethz.ch/~oetiker/webtools/smokeping/probe/LDAP.en.html
Maybe, my request is far from this plugin's original purose, forgive me.
You may create it on your own, e.g. using shell/perl/php or the like. Run the probing command against the server and print the time difference. There has been a Template for OpenLDAP in the forum, search/google for that. More examples are available at the original smokeping site at http://people.ee.ethz.ch/~oetiker/webtools/smokeping/. When it comes to coloring and statistics it would be best to read the code of "Advanced Ping" itself.
Reinhard
Skept
Posts: 12
Joined: Sun Jul 03, 2005 1:30 pm

Error: XML: Hash version does not exist.

Post by Skept »

Importing the graph template gives me this error. Error: XML: Hash version does not exist. Are there any other modules required for successful import of this one?
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

What is your cacti version. You need to be on 0.8.6g.

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?
Skept
Posts: 12
Joined: Sun Jul 03, 2005 1:30 pm

Post by Skept »

That did the trick. Thank you very much. I was using 0.8.6d.
seraph
Posts: 16
Joined: Thu Mar 31, 2005 9:38 am
Location: Zuerich
Contact:

Post by seraph »

hi i have install this scirpt and i have this error:

Code: Select all

reanimation:/opt/cacti/lib # /opt/lampp/bin/php /opt/cacti/scripts/ss_fping.php ss_fping 127.0.0.1 5 ICMP

Notice: Undefined variable:  method in /opt/cacti/scripts/ss_fping.php on line 56

Warning: socket_connect() expects parameter 3 to be long, string given in /opt/cacti/lib/ping.php on line 220

Warning: socket_write() unable to write to socket [89]: Destination address required in /opt/cacti/lib/ping.php on line 244
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests