|
|
| Author |
Message |
XStrafer
Joined: 31 Oct 2005 Posts: 2
|
Posted: Mon Oct 31, 2005 10:34 am Post subject: |
|
|
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? |
|
| Back to top |
|
 |
TheWitness Developer
Joined: 14 May 2002 Posts: 9736 Location: MI, USA
|
Posted: Mon Oct 31, 2005 10:42 am Post subject: |
|
|
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 |
|
| Back to top |
|
 |
XStrafer
Joined: 31 Oct 2005 Posts: 2
|
Posted: Mon Oct 31, 2005 11:26 am Post subject: |
|
|
| 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... |
|
| Back to top |
|
 |
gandalf Developer
Joined: 02 Dec 2004 Posts: 12604 Location: Muenster, Germany
|
Posted: Mon Oct 31, 2005 3:39 pm Post subject: |
|
|
| 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 |
|
| Back to top |
|
 |
JaMa
Joined: 01 Nov 2005 Posts: 1
|
Posted: Tue Nov 01, 2005 2:36 am Post subject: Advanced ping to IPv6 address |
|
|
Hello,
it's possible to add IPv6 support to ss_fping.php?
It would be nice.
Thanks |
|
| Back to top |
|
 |
TheWitness Developer
Joined: 14 May 2002 Posts: 9736 Location: MI, USA
|
Posted: Tue Nov 01, 2005 5:32 am Post subject: |
|
|
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 |
|
| Back to top |
|
 |
TheWitness Developer
Joined: 14 May 2002 Posts: 9736 Location: MI, USA
|
Posted: Tue Nov 01, 2005 5:34 am Post subject: |
|
|
JaMa,
I will check into IPv6 for you. This will be somewhat dependent on PHP.
TheWitness |
|
| Back to top |
|
 |
TheWitness Developer
Joined: 14 May 2002 Posts: 9736 Location: MI, USA
|
Posted: Tue Nov 01, 2005 5:39 am Post subject: |
|
|
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 |
|
| Back to top |
|
 |
ioiioi Cacti User
Joined: 28 Mar 2005 Posts: 51
|
Posted: Tue Nov 01, 2005 7:49 am Post subject: |
|
|
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: |
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. |
|
| Back to top |
|
 |
TheWitness Developer
Joined: 14 May 2002 Posts: 9736 Location: MI, USA
|
Posted: Tue Nov 01, 2005 8:18 am Post subject: |
|
|
I know where you are going. This is not too difficult, but I have other priorities.
TheWitness |
|
| Back to top |
|
 |
gandalf Developer
Joined: 02 Dec 2004 Posts: 12604 Location: Muenster, Germany
|
Posted: Tue Nov 01, 2005 8:50 am Post subject: |
|
|
| 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: |
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 |
|
| Back to top |
|
 |
Skept
Joined: 03 Jul 2005 Posts: 12
|
Posted: Wed Nov 02, 2005 3:26 am Post subject: Error: XML: Hash version does not exist. |
|
|
| 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? |
|
| Back to top |
|
 |
TheWitness Developer
Joined: 14 May 2002 Posts: 9736 Location: MI, USA
|
Posted: Wed Nov 02, 2005 5:50 am Post subject: |
|
|
What is your cacti version. You need to be on 0.8.6g.
TheWitness |
|
| Back to top |
|
 |
Skept
Joined: 03 Jul 2005 Posts: 12
|
Posted: Wed Nov 02, 2005 8:47 am Post subject: |
|
|
| That did the trick. Thank you very much. I was using 0.8.6d. |
|
| Back to top |
|
 |
seraph
Joined: 31 Mar 2005 Posts: 16 Location: Zuerich
|
Posted: Thu Nov 03, 2005 3:06 am Post subject: |
|
|
hi i have install this scirpt and i have this error:
| Code: |
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
|
|
|
| Back to top |
|
 |
|