Upgrading nagios 1.2 to nagios 2.9 - nrpe problem (very de


#1

Hi,

I’m trying to upgrading my actual nagios server(PEGASUS) for a new nagios server (ASCLEPIUS) because the new machine to nagios is a XEN VM.

the actual server is a nagios 1.2 on Redhat 9 with:
[blockquote]
[[email protected] etc]# rpm -qa | grep nagios
nagios-plugins-nrpe-2.0-3.rh90.dag
nagios-nrpe-2.0-3.rh90.dag
[[email protected] etc]#
[/blockquote]

This server works fine, have no problems.

the future server is a nagios 2.9 on RedHat EL 5.1 x86_64 with:
[blockquote]
[[email protected] ~]# rpm -qa | grep nagios
nagios-plugins-tcp-1.4.6-3.el5
nagios-plugins-load-1.4.6-3.el5
nagios-plugins-swap-1.4.6-3.el5
nagios-plugins-hpjd-1.4.6-3.el5
nagios-plugins-perl-1.4.6-3.el5
nagios-plugins-sensors-1.4.6-3.el5
nagios-plugins-nt-1.4.6-3.el5
nagios-plugins-ping-1.4.6-3.el5
nagios-plugins-nagios-1.4.6-3.el5
nagios-plugins-mrtg-1.4.6-3.el5
nagios-plugins-oracle-1.4.6-3.el5
nagios-plugins-file_age-1.4.6-3.el5
nagios-plugins-game-1.4.6-3.el5
nagios-plugins-pgsql-1.4.6-3.el5
nagios-plugins-users-1.4.6-3.el5
nagios-plugins-icmp-1.4.6-3.el5
nagios-2.9-1.el5
nagios-plugins-ups-1.4.6-3.el5
nagios-plugins-apt-1.4.6-3.el5
nagios-plugins-by_ssh-1.4.6-3.el5
nagios-plugins-ntp-1.4.6-3.el5
nagios-plugins-snmp-1.4.6-3.el5
nagios-plugins-log-1.4.6-3.el5
nagios-plugins-mailq-1.4.6-3.el5
nagios-plugins-udp-1.4.6-3.el5
nagios-plugins-nrpe-2.7-3.el5
nagios-plugins-1.4.6-3.el5
nagios-plugins-mysql-1.4.6-3.el5
nagios-plugins-dummy-1.4.6-3.el5
nagios-plugins-disk-1.4.6-3.el5
nagios-plugins-ssh-1.4.6-3.el5
nagios-plugins-smtp-1.4.6-3.el5
nagios-plugins-ide_smart-1.4.6-3.el5
nagios-plugins-dhcp-1.4.6-3.el5
nagios-plugins-nwstat-1.4.6-3.el5
nagios-plugins-overcr-1.4.6-3.el5
nagios-plugins-disk_smb-1.4.6-3.el5
nagios-plugins-wave-1.4.6-3.el5
nagios-plugins-breeze-1.4.6-3.el5
nagios-plugins-procs-1.4.6-3.el5
nagios-plugins-dig-1.4.6-3.el5
nagios-plugins-http-1.4.6-3.el5
nagios-plugins-mrtgtraf-1.4.6-3.el5
nagios-plugins-linux_raid-1.4.6-3.el5
nagios-plugins-rpc-1.4.6-3.el5
nagios-plugins-dns-1.4.6-3.el5
nagios-plugins-ldap-1.4.6-3.el5
nagios-plugins-real-1.4.6-3.el5
nagios-plugins-time-1.4.6-3.el5
nagios-plugins-flexlm-1.4.6-3.el5
nagios-plugins-ircd-1.4.6-3.el5
[[email protected] ~]#
[/blockquote]
I review the cfg files from the actual server and create a new one with all configurations ( contacts, contactgroups, hosts, hostgroups, commands, services, ) and starts Nagios fine with no errors and no warnings.
[blockquote]
[[email protected] nagios]# nagios -v nagios.cfg

Nagios 2.9
Copyright © 1999-2007 Ethan Galstad (nagios.org)
Last Modified: 04-10-2007
License: GPL

Reading configuration data…

Running pre-flight check on configuration data…

Checking services…
Checked 379 services.
Checking hosts…
Checked 29 hosts.
Checking host groups…
Checked 5 host groups.
Checking service groups…
Checked 0 service groups.
Checking contacts…
Checked 4 contacts.
Checking contact groups…
Checked 3 contact groups.
Checking service escalations…
Checked 0 service escalations.
Checking service dependencies…
Checked 0 service dependencies.
Checking host escalations…
Checked 0 host escalations.
Checking host dependencies…
Checked 0 host dependencies.
Checking commands…
Checked 41 commands.
Checking time periods…
Checked 7 time periods.
Checking extended host info definitions…
Checked 0 extended host info definitions.
Checking extended service info definitions…
Checked 0 extended service info definitions.
Checking for circular paths between hosts…
Checking for circular host and service dependencies…
Checking global event handlers…
Checking obsessive compulsive processor commands…
Checking misc settings…

Total Warnings: 0
Total Errors: 0

Things look okay - No serious problems were detected during the pre-flight check
[[email protected] nagios]#

[/blockquote]
My nagios starts monitor from ping ok, routers and windows services ok too, but Unix servers aren’t ok.

I have 4 HP-UX that i check cpu, disks, memmory, Oracle tablespace, … i check all this services on HP-UX with NRPE plugin.
at HP-UX i have nrpe 1.8 .

I read many documentations that says nrpe 1.8 and 2.0 are imcompatibles, but the actual nagios server (PEGASUS) can get all informations with no problem.

at PEGASUS nagios server i have “nagios-plugins-nrpe-2.0-3 and nagios-plugins-nrpe-2.0-3” and works fine with HP-UX nrpe 1.8.
at ASCLEPIUS nagios server (the new server) i have “nagios-plugins-nrpe-2.7-3 and nrpe-2.7-3.el5” and do cannot check services on HP-UX.

At nrpe.cfg file from the unix i change the line

[blockquote]
allowed_hosts=192.168.1.22
[/blockquote]
to
[blockquote]
allowed_hosts=192.168.1.22,192.168.1.122
[/blockquote]
where 192.168.1.22 are PEGASUS and 192.168.1.122 are ASCLEPIUS (the old and the new server), and after i reload the service with daemon standalone. Its do not fix the problem. i change the allowed_hosts only to Asclepiuss:
[blockquote]
allowed_hosts=192.168.1.122
[/blockquote]
At log from HP-UX i see:
[blockquote]
Nov 26 17:13:34 isis nrpe[26922]: Host 192.168.1.122 is not allowed to talk to us!
[/blockquote]
Then i tried to install old versions from nrpe to test:
"nagios-nrpe-2.0-3.2.el4.rf.x86_64 and nagios-plugins-nrpe-2.0-3.2.el4.rf.x86_64 "

The problem aren’t solved so i roll back the versions “nagios-plugins-nrpe-2.7-3 and nrpe-2.7-3.el5”.

At command line from Asclepius i run:
[blockquote]
[[email protected] nagios]# /usr/lib64/nagios/plugins/check_nrpe -H 192.168.1.2 -n
CHECK_NRPE: Received 0 bytes from daemon. Check the remote server logs for error messages.
[[email protected] nagios]#
[/blockquote]
and
[blockquote]
[[email protected] nagios]# /usr/lib64/nagios/plugins/check_nrpe -H 192.168.1.2
CHECK_NRPE: Error - Could not complete SSL handshake.
[[email protected] nagios]#
[/blockquote]
My nrpe_check aren’t over ssl.

From my nagios.log at asclepius i have:
[blockquote]

[1196080284] SERVICE ALERT: anubis;/;UNKNOWN;SOFT;1;Incorrect command line arguments supplied
[1196080294] SERVICE ALERT: isis;/EXPORT;UNKNOWN;SOFT;1;Incorrect command line arguments supplied
[1196080304] SERVICE ALERT: osiris;/ERPPRD/DATA1;UNKNOWN;SOFT;1;Incorrect command line arguments supplied
[1196080314] SERVICE ALERT: osiris;/ERPPRD/INDEX4;UNKNOWN;SOFT;1;Incorrect command line arguments supplied
[1196080314] SERVICE ALERT: osiris;/PERFORMANCE;UNKNOWN;SOFT;1;Incorrect command line arguments supplied
[1196080344] SERVICE ALERT: anubis;/;UNKNOWN;SOFT;2;Incorrect command line arguments supplied
[1196080354] SERVICE ALERT: isis;/EXPORT;UNKNOWN;SOFT;2;Incorrect command line arguments supplied
[1196080364] SERVICE ALERT: osiris;/ERPPRD/DATA1;UNKNOWN;SOFT;2;Incorrect command line arguments supplied
[1196080374] SERVICE ALERT: osiris;/ERPPRD/INDEX4;UNKNOWN;SOFT;2;Incorrect command line arguments supplied
[1196080374] SERVICE ALERT: osiris;/PERFORMANCE;UNKNOWN;SOFT;2;Incorrect command line arguments supplied
[1196080384] SERVICE ALERT: osiris;ERPPRD_TEMP;UNKNOWN;SOFT;1;Incorrect command line arguments supplied
[1196080394] SERVICE ALERT: seth;/ERPQAS/DATA5;UNKNOWN;SOFT;1;Incorrect command line arguments supplied
[1196080404] SERVICE ALERT: anubis;/;UNKNOWN;HARD;3;Incorrect command line arguments supplied
[1196080404] SERVICE NOTIFICATION: producao;anubis;/;UNKNOWN;notify-by-email;Incorrect command line arguments supplied
[1196080404] SERVICE ALERT: seth;/ERPQAS/RBS1;UNKNOWN;SOFT;1;Incorrect command line arguments supplied
[1196080404] SERVICE ALERT: seth;/TMSDEV/INDEX1;UNKNOWN;SOFT;1;Incorrect command line arguments supplied
[1196080414] SERVICE ALERT: seth;/WISDEV/LOG;UNKNOWN;SOFT;1;Incorrect command line arguments supplied
[1196080414] SERVICE ALERT: isis;/EXPORT;UNKNOWN;HARD;3;Incorrect command line arguments supplied
[1196080414] SERVICE NOTIFICATION: producao;isis;/EXPORT;UNKNOWN;notify-by-email;Incorrect command line arguments supplied
[1196080424] SERVICE ALERT: anubis;/EXPORT;UNKNOWN;SOFT;1;Incorrect command line arguments supplied
[1196080424] SERVICE ALERT: osiris;/ERPPRD/DATA1;UNKNOWN;HARD;3;Incorrect command line arguments supplied
[1196080434] SERVICE ALERT: isis;/HOME;UNKNOWN;SOFT;1;Incorrect command line arguments supplied
[1196080434] SERVICE ALERT: osiris;/ERPPRD/INDEX4;UNKNOWN;HARD;3;Incorrect command line arguments supplied
[1196080434] SERVICE ALERT: osiris;/PERFORMANCE;UNKNOWN;HARD;3;Incorrect command line arguments supplied
[1196080434] SERVICE NOTIFICATION: producao;osiris;/PERFORMANCE;UNKNOWN;notify-by-email;Incorrect command line arguments supplied
[1196080444] SERVICE ALERT: osiris;ERPPRD_TEMP;UNKNOWN;SOFT;2;Incorrect command line arguments supplied
[1196080444] SERVICE ALERT: osiris;/ERPPRD/DATA10;UNKNOWN;SOFT;1;Incorrect command line arguments supplied
[1196080454] SERVICE ALERT: osiris;/ERPPRD/INDEX5;UNKNOWN;SOFT;1;Incorrect command line arguments supplied
[1196080454] SERVICE ALERT: seth;/ERPQAS/DATA5;UNKNOWN;SOFT;2;Incorrect command line arguments supplied
[1196080454] SERVICE ALERT: osiris;/STAND;UNKNOWN;SOFT;1;Incorrect command line arguments supplied
[1196080464] SERVICE ALERT: seth;/ERPQAS/RBS1;UNKNOWN;SOFT;2;Incorrect command line arguments supplied
[1196080464] SERVICE ALERT: seth;/TMSDEV/INDEX1;UNKNOWN;SOFT;2;Incorrect command line arguments supplied
[1196080474] SERVICE ALERT: seth;/WISDEV/LOG;UNKNOWN;SOFT;2;Incorrect command line arguments supplied
[1196080484] SERVICE ALERT: anubis;/EXPORT;UNKNOWN;SOFT;2;Incorrect command line arguments supplied
[1196080494] SERVICE ALERT: isis;/HOME;UNKNOWN;SOFT;2;Incorrect command line arguments supplied
[1196080504] SERVICE ALERT: osiris;ERPPRD_TEMP;UNKNOWN;HARD;3;Incorrect command line arguments supplied
[1196080504] SERVICE NOTIFICATION: producao;osiris;ERPPRD_TEMP;UNKNOWN;notify-by-email;Incorrect command line arguments supplied

[/blockquote]

i attach 2 images from nagios on Asclepius.

Someone can help-me to finish this upgrade??

Thanks for all.


#2

i do not know why my attach doesn’t clip here.


#3

[html]



Try again. Attachments should work now…


#4

ok,
these are the attachs.
i make new tests, upgrade nrpe from remote host to 2.7, equal monitoring host, i paste here a resume:

On monitoring host:

At log:

[blockquote]

[1196172873] SERVICE NOTIFICATION: producao;isis;/HOME;UNKNOWN;notify-by-email;Incorrect command line arguments supplied
[1196173013] SERVICE NOTIFICATION: producao;isis;/OPT;UNKNOWN;notify-by-email;Incorrect command line arguments supplied
[1196173143] SERVICE NOTIFICATION: producao;isis;/TMP;UNKNOWN;notify-by-email;Incorrect command line arguments supplied

[/blockquote]

at services.cfg:

[blockquote]

ISIS MOUNT POINT HOME

define service{
use generic-service
host_name isis
service_description /HOME
contact_groups linux-admins
check_command check_nrpe!check_/home
}

ISIS MOUNT POINT OPT

define service{
use generic-service
host_name isis
service_description /OPT
contact_groups linux-admins
check_command check_nrpe!check_/opt
}

ISIS MOUNT POINT TMP

define service{
use generic-service
host_name isis
service_description /TMP
contact_groups linux-admins
check_command check_nrpe!check_/tmp
}

[/blockquote]

connection test:

[blockquote]
[[email protected] nagios]# /usr/lib64/nagios/plugins/check_nrpe -H 192.168.1…2
CHECK_NRPE: Error - Could not complete SSL handshake.
[[email protected] nagios]# /usr/lib64/nagios/plugins/check_nrpe -H 192.168.1.2 -n
CHECK_NRPE: Received 0 bytes from daemon. Check the remote server logs for error messages.
[[email protected] nagios]#

[/blockquote]

At Remote Unix host (HP-UX):

line on nrpe.cfg to check /home

[blockquote]

command[check_/home]=/home/nagios/nrpe/plugins/check_disk -w 5% -c 0% -p /home
command[check_/opt]=/home/nagios/nrpe/plugins/check_disk -w 5% -c 0% -p /opt
command[check_/tmp]=/home/nagios/nrpe/plugins/check_disk -w 5% -c 0% -p /tmp

[blockquote]
nrpe proccess:

[blockquote]
[isis:root]/home/nagios/nrpe > ps -ef | grep nrpe
nagios 29827 1 0 10:07:54 ? 0:00 ./nrpe -n -c isis.cfg -d
root 1545 21716 1 10:16:46 pts/td 0:00 grep nrpe
[isis:root]/home/nagios/nrpe > ./nrpe

[/blockquote]

nrpe test on Unix Host

[blockquote]
[isis:root]/home/nagios/nrpe > ./check_nrpe -H localhost
CHECK_NRPE: Error - Could not complete SSL handshake.
[isis:root]/home/nagios/nrpe > ./check_nrpe -H localhost -n
CHECK_NRPE: Received 0 bytes from daemon. Check the remote server logs for error messages.
[isis:root]/home/nagios/nrpe >

[/blockquote]

at log from unix host have no problems

NRPE informations:

at monitoring host:

[blockquote]
[[email protected] nagios]# /usr/lib64/nagios/plugins/check_nrpe --version
/usr/lib64/nagios/plugins/check_nrpe: unrecognized option `–version’

NRPE Plugin for Nagios
Copyright © 1999-2007 Ethan Galstad ([email protected])
Version: 2.7
Last Modified: 02-19-2007
License: GPL v2 with exemptions (-l for more info)
SSL/TLS Available: Anonymous DH Mode, OpenSSL 0.9.6 or higher required

Usage: check_nrpe -H -n] -u] -p ] -t ] -c ] -a <arglist…>]

Options:
-n = Do no use SSL
-u = Make socket timeouts return an UNKNOWN state instead of CRITICAL
= The address of the host running the NRPE daemon
[port] = The port on which the daemon is running (default=5666)
[timeout] = Number of seconds before connection times out (default=10)
[command] = The name of the command that the remote daemon should run
[arglist] = Optional arguments that should be passed to the command. Multiple
arguments should be separated by a space. If provided, this must be
the last option supplied on the command line.

Note:
This plugin requires that you have the NRPE daemon running on the remote host.
You must also have configured the daemon to associate a specific plugin command
with the [command] option you are specifying here. Upon receipt of the
[command] argument, the NRPE daemon will run the appropriate plugin command and
send the plugin output and return code back to this plugin. This allows you
to execute plugins on remote hosts and ‘fake’ the results to make Nagios think
the plugin is being run locally.

[[email protected] nagios]# rpm -qa | grep ssl
openssl-0.9.8b-8.3.el5_0.2
openssl-0.9.8b-8.3.el5_0.2
[[email protected] nagios]#

[/blockquote]

at Remote Host:

[blockquote]
[isis:root]/home/nagios/nrpe > ./nrpe

NRPE - Nagios Remote Plugin Executor
Copyright © 1999-2007 Ethan Galstad ([email protected])
Version: 2.7
Last Modified: 02-19-2007
License: GPL v2 with exemptions (-l for more info)
SSL/TLS Available: Anonymous DH Mode, OpenSSL 0.9.6 or higher required
TCP Wrappers Available

Usage: nrpe -n] -c <config_file>

Options:
-n = Do not use SSL
<config_file> = Name of config file to use
= One of the following two operating modes:
-i = Run as a service under inetd or xinetd
-d = Run as a standalone daemon

Notes:
This program is designed to process requests from the check_nrpe
plugin on the host(s) running Nagios. It can run as a service
under inetd or xinetd (read the docs for info on this), or as a
standalone daemon. Once a request is received from an authorized
host, NRPE will execute the command/plugin (as defined in the
config file) and return the plugin output and return code to the
check_nrpe plugin.

[isis:root]/home/nagios/nrpe >

[/blockquote]