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

#16 Post by XStrafer » Mon Oct 31, 2005 10:34 am

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: 14817
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

#17 Post by TheWitness » Mon Oct 31, 2005 10:42 am

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 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.

XStrafer
Posts: 2
Joined: Mon Oct 31, 2005 10:29 am

#18 Post by XStrafer » Mon Oct 31, 2005 11:26 am

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: 22375
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

#19 Post by gandalf » Mon Oct 31, 2005 3:39 pm

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

#20 Post by JaMa » Tue Nov 01, 2005 2:36 am

Hello,

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

It would be nice.

Thanks

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

#21 Post by TheWitness » Tue Nov 01, 2005 5:32 am

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 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: 14817
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

#22 Post by TheWitness » Tue Nov 01, 2005 5:34 am

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 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: 14817
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

#23 Post by TheWitness » Tue Nov 01, 2005 5:39 am

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 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.

ioiioi
Cacti User
Posts: 52
Joined: Mon Mar 28, 2005 8:57 am

#24 Post by ioiioi » Tue Nov 01, 2005 7:49 am

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: 14817
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

#25 Post by TheWitness » Tue Nov 01, 2005 8:18 am

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

#26 Post by gandalf » Tue Nov 01, 2005 8:50 am

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.

#27 Post by Skept » Wed Nov 02, 2005 3:26 am

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: 14817
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

#28 Post by TheWitness » Wed Nov 02, 2005 5:50 am

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 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.

Skept
Posts: 12
Joined: Sun Jul 03, 2005 1:30 pm

#29 Post by Skept » Wed Nov 02, 2005 8:47 am

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:

#30 Post by seraph » Thu Nov 03, 2005 3:06 am

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