OS: Windows 7
I have a problem with a device availability. I have found that ping.php requires that a ping utility must have an English interface.
But my Windows has a localized interface:
Code: Select all
>ping google.com
Обмен пакетами с google.com [74.125.232.4] с 32 байтами данных:
Ответ от 74.125.232.4: число байт=32 время=10мс TTL=53
Ответ от 74.125.232.4: число байт=32 время=10мс TTL=53
Ответ от 74.125.232.4: число байт=32 время=13мс TTL=53
Ответ от 74.125.232.4: число байт=32 время=13мс TTL=53
Статистика Ping для 74.125.232.4:
Пакетов: отправлено = 4, получено = 4, потеряно = 0
(0% потерь)
Приблизительное время приема-передачи в мс:
Минимальное = 10мсек, Максимальное = 13 мсек, Среднее = 11 мсек
As a way to fix this problem I do the following:
1. Use a tool with English text ( fping, use Google to find it )
2. Modify ping.php like this:
Is it possible to fix an official Cacti release to support it?}else if (substr_count(strtolower(PHP_OS), "aix")) {
$result = shell_exec("ping -i " . ceil($this->timeout/1000) . " -c " . $this->retries . " " . $this->host["hostname"]);
}else if (substr_count(strtolower(PHP_OS), "winnt")) {
$result = shell_exec("fping " . $this->host["hostname"] . " -w " . $this->timeout . " -n " . $this->retries);
}else{
$result = shell_exec("ping -W " . ceil($this->timeout/1000) . " -c " . $this->retries . " -p " . $pattern . " " . $this->host["hostname"]);
}
It will be perfect:
- to have an alternative ping method in Downed Host Detection like fping or similar
- to have a possibility to setup a ping utility path and settings