PDA

View Full Version : Ip address not defined for poller ??


parcival
19th March 2009, 18:02
Hi all,
If I try to start "External Command" get i this error message in centcore.log.

"Ip address not defined for poller"

I defined two Poller, once as local host and on the other hand as external host (Satellite).
In centcore i found this. Where is the problem here?

###snipp###

my $server_info = getServerConfig($id);
# check if ip address is defined
if (defined($server_info->{'ns_ip_address'})){
my $cmd = "$ssh -q ".$server_info->{'ns_ip_address'}." echo \"".$cmd."\" >> $command_file\n";
my $stdout = `$cmd`;
writeLogFile("External command : poller $id : \"".$cmd."\"\n");
if (defined($stdout) && $stdout){
writeLogFile("Result : $stdout\n");
}
# Free
undef($stdout);
} else {
writeLogFile("Ip address not defined for poller $id \n");
}

####snapp###

Also in the Debugmodus there is no information in the log file.

Thank you for each assistance.

Stefan

parcival
21st March 2009, 15:24
I found this.
the "centcore.cmd" does not generate correctly. Here are contents.

#-#-#-#-
SENDCFGFILE:2
EXTERNALCMD::[1237639014] RESTART_PROGRAM
#-#-#-#-

The Sattelite ID is missing between the ::
This line would be correct:

#-#-#-#-
SENDCFGFILE:2
EXTERNALCMD:2:[1237639014] RESTART_PROGRAM
#.#.#.#.

bug or feature ?

If i this file (centcore.cmd) with correct entries test, then shows up the following.

Although this written in the logfile, the Satellite is not restartet.
1237639121 - External command : 192.168.100.154 (2) : "/usr/bin/ssh -o ConnectTimeout=5 -q 192.168.100.154 'echo "[1237639014] RESTART_PROGRAM" >> /usr/local/nagios/var/rw/nagios.cmd'"

and there is error messages in the console:
scp: /usr/local/nagios/etc/services.cfg: Permission denied Bad Copy

"centcore" runs as "nagios" and ssh works without password (nagios user) to the Sattelite server.

Who brings light in the dark?

thx

Stefan