No host availability check possible for xxxx

Post support questions that relate to the Windows 2003/2000/XP operating systems.

Moderators: Developers, Moderators

Post Reply
geertn444
Posts: 44
Joined: Fri Dec 02, 2005 3:24 am

No host availability check possible for xxxx

Post by geertn444 »

Hi all,

I have got Cacti running to poll some devices via Telnet (perl script), since snmp access is not possible.
This works fine. However, i have configured all my devices with a blank
SNMP community string, so that Cacti known that "SNMP" is not available.

However, the "up"-detection of cacti doesnt seem to work with ICMP.
My poller logs have lots of the following messages:

No host availability check possible for xxxxx

I do have configured ICMP ping (only) as host availability check under settings->poller.
Also , on the devices page, all the "ms" and "average ms" columns remain at 0

Does ICMP checks work in Win32 ?

How can i force cacti to first ping a device before launching a script agains it ? (at this time, my script times out....)
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

What version of everything are you using?

Cacti is suppose to check if the device is up before running the scripts/snmp stuff on it. This was added in 0.8.6 or so, I believe. I am sucessfully using ICMP pings on my hosts with no problems. What do you have your uptime detection method set to in cacti?
geertn444
Posts: 44
Joined: Fri Dec 02, 2005 3:24 am

Post by geertn444 »

Hi,

I am running 0.8.6g (with i think php 4)
Uptime detection is set to: ONLY ICMP or ICMP and SNMP; it doesnt make any difference-> doesn work.

For ICMP pings to work, do i need to schedule special graphs ? Or is it standard ?

PS. I have enabled the sockets plugin for PHP.
But running the ss_ping.php from the command line, gives an error:
Undefined call to function socket_set_options or something like that.
(right now, i dont have access to the machine, i can send more detailed logs tomorrow...)

PPS. I am also running the cmd.php poller, not the cactid poller. But does that make a difference ?

regards,
Geert
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

Install the patches for cacti (documented on the website or in my guide in my signature).

ICMP pings use the PHP library, so you dont need to do anything special. Exact versions of the webserver, php, mysql, rrdool are helpful.
geertn444
Posts: 44
Joined: Fri Dec 02, 2005 3:24 am

Post by geertn444 »

Some exact versions:

PHP/4.2.2
RRDtool 1.0.49 (we will be upgrading to the latest RRDTOOL_cygwin shortly)
MYSQL 4.0.18
Cacti 0.8.6g
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

Are you running any firewalls (software/hardware) that prevents ICMP?
geertn444
Posts: 44
Joined: Fri Dec 02, 2005 3:24 am

Post by geertn444 »

No, we do not. ping is possible on the network.

I have noticed something else however. I have installed Cacti also on my portable PC and there ICMP pings work. Both systems are Win32, so i am trying to figure out the difference at this time.
I have already noticed that my portable starts a "PHP SCRIPT SERVER" in the log file. This script server does the polling.

I have NEVER seen this message on the production machine....

LOG LINES on my portable, missing on production machine:

2/05/2005 11:04:02 PM - PHPSVR: Poller[0] DEBUG: PHP Script Server Shutdown request received, exiting
12/05/2005 11:04:02 PM - CMDPHP: Poller[0] Host[2] DS[8] SNMP: v1: 192.168.21.1, dsname: traffic_out, oid: .1.3.6.1.2.1.2.2.1.16.4, output: 453763
12/05/2005 11:04:02 PM - CMDPHP: Poller[0] Host[2] DS[8] SNMP: v1: 192.168.21.1, dsname: traffic_in, oid: .1.3.6.1.2.1.2.2.1.10.4, output: 3353638
12/05/2005 11:04:02 PM - CMDPHP: Poller[0] Host[2] RECACHE: Processing 1 items in the auto reindex cache for '192.168.21.1'.
12/05/2005 11:04:02 PM - CMDPHP: Poller[0] Host[2] PING: Host is alive
12/05/2005 11:04:02 PM - CMDPHP: Poller[0] PHP Script Server Started Properly
12/05/2005 11:04:02 PM - PHPSVR: Poller[0] PHP Script Server has Started - Parent is cmd
12/05/2005 11:04:02 PM - PHPSVR: Poller[0] DEBUG: FILENM: c:\inetpub\wwwroot\cacti-0.8.6g\script_server.php
12/05/2005 11:04:02 PM - PHPSVR: Poller[0] DEBUG: DIRNAM: c:/inetpub/wwwroot/cacti-0.8.6g
12/05/2005 11:04:02 PM - PHPSVR: Poller[0] DEBUG: GETCWD: c:/inetpub/wwwroot/cacti-0.8.6g
12/05/2005 11:04:02 PM - PHPSVR: Poller[0] DEBUG: SERVER: cmd
12/05/2005 11:04:01 PM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: c:/php/php.exe, ARGS: -q c:/inetpub/wwwroot/cacti-0.8.6g/cmd.php 0 2]
12/05/2005 11:03:52 PM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: c:/php/php.exe, ARGS: -q C:/Inetpub/wwwroot/cacti-0.8.6g/poller_export.php]
12/05/2005 11:03:52 PM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: c:/php/php.exe, ARGS: -q C:/Inetpub
geertn444
Posts: 44
Joined: Fri Dec 02, 2005 3:24 am

Post by geertn444 »

Bingo. I found this piece of code in cmd.php:

if ((!function_exists("socket_create")) || (phpversion() < "4.3")) {
/* the ping test will fail under PHP < 4.3 without socket support */
$ping_availability = AVAIL_SNMP;
}else{
$ping_availability = read_config_option("availability_method");


it seems that ping is not supported on PHP < 4.3 :-)
geertn444
Posts: 44
Joined: Fri Dec 02, 2005 3:24 am

Post by geertn444 »

On my portable i am running PHP 4.4.1
On the production system PHP 4.2.2
geertn444
Posts: 44
Joined: Fri Dec 02, 2005 3:24 am

Post by geertn444 »

Upgraded to PHP 4.4.2
drop-in replacement (just renamed the directory, didnt change anything else)
and .....yes..it is working now.....
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

Ahh good to know. I missed your old version of PHP.
Post Reply

Who is online

Users browsing this forum: Mohammedejaz and 1 guest