[solved] ICMP Ping Error over Windows OS
Moderators: Developers, Moderators
[solved] ICMP Ping Error over Windows OS
Hi all.
I have installed cacti with BSOD Windows installation:
Cacti Version 0.8.8a
Cacti OS win32
SNMP Version NET-SNMP version: 5.5
RRDTool Version RRDTool 1.4.x
Poller Information
Interval 60
Type SPINE 0.8.8a Copyright 2002-2012 by The Cacti Group
PHP Information
PHP Version 5.3.17
PHP OS WINNT
PHP uname Windows NT MGMT-EDE-01 6.1 build 7601 (Windows 7 Business Edition Service Pack 1) i586
PHP SNMP Installed
My problem is when i try to ping a host with ICMP using Cacti Host Downed Device Detection or using Advanced Ping to get a graph, in both cases i only get data if i use UDP PORT 23 PING.
From what i saw in forum and support cacti pages this can be a problem of permission on spine poller, but i have windows admin rights so i dont know where to look.
This is what cacti.log show for a host configured with icmp:
SPINE: Poller[0] Host[74] TH[1] DS[1878] SS[0] SERVER: C:/Apache2/htdocs/cacti/scripts/ss_fping.php ss_fping XXXX.XXXX.XXXX.XXXX 5 ICMP , output: min:U avg:U max:U dev:U loss:100.00
And this with udp:
SPINE: Poller[0] Host[73] TH[1] DS[1867] SS[0] SERVER: C:/Apache2/htdocs/cacti/scripts/ss_fping.php ss_fping XXXX.XXXX.XXXX.XXXX 5 UDP 23, output: min:5.9200 avg:5.9200 max:5.9200
Hope someone can help!
Thanks in advance,
Julio
I have installed cacti with BSOD Windows installation:
Cacti Version 0.8.8a
Cacti OS win32
SNMP Version NET-SNMP version: 5.5
RRDTool Version RRDTool 1.4.x
Poller Information
Interval 60
Type SPINE 0.8.8a Copyright 2002-2012 by The Cacti Group
PHP Information
PHP Version 5.3.17
PHP OS WINNT
PHP uname Windows NT MGMT-EDE-01 6.1 build 7601 (Windows 7 Business Edition Service Pack 1) i586
PHP SNMP Installed
My problem is when i try to ping a host with ICMP using Cacti Host Downed Device Detection or using Advanced Ping to get a graph, in both cases i only get data if i use UDP PORT 23 PING.
From what i saw in forum and support cacti pages this can be a problem of permission on spine poller, but i have windows admin rights so i dont know where to look.
This is what cacti.log show for a host configured with icmp:
SPINE: Poller[0] Host[74] TH[1] DS[1878] SS[0] SERVER: C:/Apache2/htdocs/cacti/scripts/ss_fping.php ss_fping XXXX.XXXX.XXXX.XXXX 5 ICMP , output: min:U avg:U max:U dev:U loss:100.00
And this with udp:
SPINE: Poller[0] Host[73] TH[1] DS[1867] SS[0] SERVER: C:/Apache2/htdocs/cacti/scripts/ss_fping.php ss_fping XXXX.XXXX.XXXX.XXXX 5 UDP 23, output: min:5.9200 avg:5.9200 max:5.9200
Hope someone can help!
Thanks in advance,
Julio
Re: ICMP Ping Error over Windows OS
did you manually validate the script works?
cmd
php script_server.php
C:/Apache2/htdocs/cacti/scripts/ss_fping.php ss_fping XXXX.XXXX.XXXX.XXXX 5 ICMP
does this output data? If not, try running cmd with an administrator account and then try again.
cmd
php script_server.php
C:/Apache2/htdocs/cacti/scripts/ss_fping.php ss_fping XXXX.XXXX.XXXX.XXXX 5 ICMP
does this output data? If not, try running cmd with an administrator account and then try again.
| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |
Re: ICMP Ping Error over Windows OS
BSOD,
First, thanks in advance for the quick reply.
I did what you told me to do and here are the outputs for ICMP and UDP:
(CMD in admin or normal mode had the same result)
C:\Apache2\htdocs\cacti>php script_server.php
PHP Script Server has Started - Parent is cmd
C:/Apache2/htdocs/cacti/scripts/ss_fping.php ss_fping xxxxxxx 5 ICMP
min:U avg:U max:U dev:U loss:100.00
C:\Apache2\htdocs\cacti>php script_server.php
PHP Script Server has Started - Parent is cmd
C:/Apache2/htdocs/cacti/scripts/ss_fping.php ss_fping xxxxxxxx 5 UDP 23
min:1.6500 avg:14.2860 max:64.2100 dev:24.9622 loss:0.0000
First, thanks in advance for the quick reply.
I did what you told me to do and here are the outputs for ICMP and UDP:
(CMD in admin or normal mode had the same result)
C:\Apache2\htdocs\cacti>php script_server.php
PHP Script Server has Started - Parent is cmd
C:/Apache2/htdocs/cacti/scripts/ss_fping.php ss_fping xxxxxxx 5 ICMP
min:U avg:U max:U dev:U loss:100.00
C:\Apache2\htdocs\cacti>php script_server.php
PHP Script Server has Started - Parent is cmd
C:/Apache2/htdocs/cacti/scripts/ss_fping.php ss_fping xxxxxxxx 5 UDP 23
min:1.6500 avg:14.2860 max:64.2100 dev:24.9622 loss:0.0000
Last edited by juliop on Thu Apr 04, 2013 12:51 pm, edited 1 time in total.
Re: ICMP Ping Error over Windows OS
Are you certain the device responds to ICMP pings and/or a firewall isnt blocking ICMP?
| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |
Re: ICMP Ping Error over Windows OS
BSOD,
Yes im sure, this is the output for a ping request from cmd:
C:\>ping xxxx.xxxx.xxxx.xxxx
Haciendo ping a xxxx.xxxx.xxxx.xxxx con 32 bytes de datos:
Respuesta desde xxxx.xxxx.xxxx.xxxx: bytes=32 tiempo<1m TTL=63
Respuesta desde xxxx.xxxx.xxxx.xxxx: bytes=32 tiempo<1m TTL=63
Respuesta desde xxxx.xxxx.xxxx.xxxx: bytes=32 tiempo<1m TTL=63
Respuesta desde xxxx.xxxx.xxxx.xxxx: bytes=32 tiempo<1m TTL=63
Estadísticas de ping para xxxx.xxxx.xxxx.xxxx:
Paquetes: enviados = 4, recibidos = 4, perdidos = 0
(0% perdidos),
Tiempos aproximados de ida y vuelta en milisegundos:
Mínimo = 0ms, Máximo = 0ms, Media = 0ms
From Cacti device menu, if i add a device with icmp detection i have this
SNMP Information
System:Juniper Networks, Inc. j4350 internet router, kernel JUNOS 9.3S5.1 #0:
lume/build/junos/9.3/service/9.3S5.1/obj-i386/sys/compile/JSERIES
Build date: 2009-09-23 22:40:36 UTC Copyright (c) 1996-200
Uptime: 1719997476 (199 days, 1 hours, 46 minutes)
Hostname: amoron-j
Location:
Contact:
Ping Results
ICMP ping Timed out
I cant imagine what is going wrong. Any idea where to look at ?
Thanks !!!!
Yes im sure, this is the output for a ping request from cmd:
C:\>ping xxxx.xxxx.xxxx.xxxx
Haciendo ping a xxxx.xxxx.xxxx.xxxx con 32 bytes de datos:
Respuesta desde xxxx.xxxx.xxxx.xxxx: bytes=32 tiempo<1m TTL=63
Respuesta desde xxxx.xxxx.xxxx.xxxx: bytes=32 tiempo<1m TTL=63
Respuesta desde xxxx.xxxx.xxxx.xxxx: bytes=32 tiempo<1m TTL=63
Respuesta desde xxxx.xxxx.xxxx.xxxx: bytes=32 tiempo<1m TTL=63
Estadísticas de ping para xxxx.xxxx.xxxx.xxxx:
Paquetes: enviados = 4, recibidos = 4, perdidos = 0
(0% perdidos),
Tiempos aproximados de ida y vuelta en milisegundos:
Mínimo = 0ms, Máximo = 0ms, Media = 0ms
From Cacti device menu, if i add a device with icmp detection i have this
SNMP Information
System:Juniper Networks, Inc. j4350 internet router, kernel JUNOS 9.3S5.1 #0:
lume/build/junos/9.3/service/9.3S5.1/obj-i386/sys/compile/JSERIES
Build date: 2009-09-23 22:40:36 UTC Copyright (c) 1996-200
Uptime: 1719997476 (199 days, 1 hours, 46 minutes)
Hostname: amoron-j
Location:
Contact:
Ping Results
ICMP ping Timed out
I cant imagine what is going wrong. Any idea where to look at ?
Thanks !!!!
Re: ICMP Ping Error over Windows OS
ah-ha. non-English locale is the problem.
\cacti\lib\ping.php function ping_icmp() expects to find the word "Minimum" in the ping output, which of course it will not with your locale.
Bug logged - http://bugs.cacti.net/view.php?id=2351
\cacti\lib\ping.php function ping_icmp() expects to find the word "Minimum" in the ping output, which of course it will not with your locale.
Bug logged - http://bugs.cacti.net/view.php?id=2351
| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |
Re: ICMP Ping Error over Windows OS
what the f.... !!!
Well at least its a well known issue. So i tried to change my system language from Spanish to English, but its W7Professional and you only can do that if you have Ultimate.
I downloaded and installed Fping for Windows on c:\fping folder, it comes with .reg file that modified register and its become executable from everywhere like the normal ping.
So i tested it and this is the output :
C:\Apache2\htdocs\cacti>fping xxxx.xxxx.xxxx.xxxx
Fast pinger version 3.00
(c) Wouter Dhondt (http://www.kwakkelflap.com)
Pinging xxxx.xxxx.xxxx.xxxx with 32 bytes of data every 1000 ms:
Reply[1] from xxxx.xxxx.xxxx.xxxx: bytes=32 time=0.4 ms TTL=63
Reply[2] from xxxx.xxxx.xxxx.xxxx: bytes=32 time=0.8 ms TTL=63
Reply[3] from xxxx.xxxx.xxxx.xxxx: bytes=32 time=0.8 ms TTL=63
Reply[4] from xxxx.xxxx.xxxx.xxxx: bytes=32 time=0.4 ms TTL=63
Ping statistics for xxxx.xxxx.xxxx.xxxx:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss)
Approximate round trip times in milli-seconds:
Minimum = 0.4 ms, Maximum = 0.8 ms, Average = 0.6 ms
Everything goes ok at this point. Next step was to edit ping.php:
}else if (substr_count(strtolower(PHP_OS), "winnt")) {
$result = shell_exec("fping " . $this->host["hostname"] . " -w " . $this->timeout . " -n " . $this->retries);
I saved it and then restarted the server. Then i tried:
C:\Apache2\htdocs\cacti>php script_server.php
PHP Script Server has Started - Parent is cmd
C:/apache2/htdocs/cacti/scripts/ss_fping.php ss_fping 192.168.181.142 5 ICMP
"fping" no se reconoce como un comando interno o externo,
programa o archivo por lotes ejecutable.
"fping" no se reconoce como un comando interno o externo,
programa o archivo por lotes ejecutable.
"fping" no se reconoce como un comando interno o externo,
programa o archivo por lotes ejecutable.
"fping" no se reconoce como un comando interno o externo,
programa o archivo por lotes ejecutable.
"fping" no se reconoce como un comando interno o externo,
programa o archivo por lotes ejecutable.
min:U avg:U max:U dev:U loss:100.00
Translation: "fping" not recognized as a command, program or executable file.
So now i think that maybe i have to put fping.exe in some specific cacti folder ? because maybe ping_icmp() its looking for the program in a specific folder. Just a thought...
We are getting closer !!
Thanks for all your help.
Well at least its a well known issue. So i tried to change my system language from Spanish to English, but its W7Professional and you only can do that if you have Ultimate.
I downloaded and installed Fping for Windows on c:\fping folder, it comes with .reg file that modified register and its become executable from everywhere like the normal ping.
So i tested it and this is the output :
C:\Apache2\htdocs\cacti>fping xxxx.xxxx.xxxx.xxxx
Fast pinger version 3.00
(c) Wouter Dhondt (http://www.kwakkelflap.com)
Pinging xxxx.xxxx.xxxx.xxxx with 32 bytes of data every 1000 ms:
Reply[1] from xxxx.xxxx.xxxx.xxxx: bytes=32 time=0.4 ms TTL=63
Reply[2] from xxxx.xxxx.xxxx.xxxx: bytes=32 time=0.8 ms TTL=63
Reply[3] from xxxx.xxxx.xxxx.xxxx: bytes=32 time=0.8 ms TTL=63
Reply[4] from xxxx.xxxx.xxxx.xxxx: bytes=32 time=0.4 ms TTL=63
Ping statistics for xxxx.xxxx.xxxx.xxxx:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss)
Approximate round trip times in milli-seconds:
Minimum = 0.4 ms, Maximum = 0.8 ms, Average = 0.6 ms
Everything goes ok at this point. Next step was to edit ping.php:
}else if (substr_count(strtolower(PHP_OS), "winnt")) {
$result = shell_exec("fping " . $this->host["hostname"] . " -w " . $this->timeout . " -n " . $this->retries);
I saved it and then restarted the server. Then i tried:
C:\Apache2\htdocs\cacti>php script_server.php
PHP Script Server has Started - Parent is cmd
C:/apache2/htdocs/cacti/scripts/ss_fping.php ss_fping 192.168.181.142 5 ICMP
"fping" no se reconoce como un comando interno o externo,
programa o archivo por lotes ejecutable.
"fping" no se reconoce como un comando interno o externo,
programa o archivo por lotes ejecutable.
"fping" no se reconoce como un comando interno o externo,
programa o archivo por lotes ejecutable.
"fping" no se reconoce como un comando interno o externo,
programa o archivo por lotes ejecutable.
"fping" no se reconoce como un comando interno o externo,
programa o archivo por lotes ejecutable.
min:U avg:U max:U dev:U loss:100.00
Translation: "fping" not recognized as a command, program or executable file.
So now i think that maybe i have to put fping.exe in some specific cacti folder ? because maybe ping_icmp() its looking for the program in a specific folder. Just a thought...
We are getting closer !!
Thanks for all your help.
Re: ICMP Ping Error over Windows OS
Where did you install fping to? I'd recommend c:\windows, which is already in the system path.juliop wrote:Translation: "fping" not recognized as a command, program or executable file.
| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |
Re: ICMP Ping Error over Windows OS
Ok, so now i move it to c:\windows and its working!!!!!!Where did you install fping to? I'd recommend c:\windows, which is already in the system path.
C:\Apache2\htdocs\cacti>php script_server.php
PHP Script Server has Started - Parent is cmd
C:/apache2/htdocs/cacti/scripts/ss_fping.php ss_fping xxxx.xxxx.xxxx.xxxx 5 ICMP
min:0.3000 avg:0.6200 max:0.8000 dev:0.2227 loss:0.0000
Thanks for the patience !!!!!
Regards,
Julio
Who is online
Users browsing this forum: No registered users and 2 guests