Page 2 of 2

Re: NRPE client configuration on HP-UX

Posted: Wed Dec 11, 2013 11:52 am
by RDMaroto
I restart the daemon xinetd that contained the nrpe whit the command:
service xinetd restart.

Re: NRPE client configuration on HP-UX

Posted: Wed Dec 11, 2013 1:28 pm
by abrist
After restarting xinetd, please run another check to the HP-UX system. Afterwards, post the ouput of the log:

Code: Select all

tail -25 /var/adm/syslog/syslog.log

Re: NRPE client configuration on HP-UX

Posted: Thu Dec 12, 2013 3:01 am
by RDMaroto
Sorry, in the HP-UX we restart the inetd daemon, because in the hp-ux machine no xinetd.

/sbin/init.d> ps -ef | grep inetd
root 13730 1 0 08:47:07 ? 0:00 /usr/sbin/inetd
root 13829 3913 1 08:47:14 pts/0 0:00 grep inetd

/sbin/init.d> kill -9 13730
/sbin/init.d> ./inetd start
Internet Services started

--At moment in the restart daemon:
/var/adm/syslog> tail -f syslog.log

Dec 12 08:49:39 centauro inetd[17411]: Reading configuration
Dec 12 08:49:39 centauro inetd[17411]: ftp/tcp: Added service, server /usr/lbin/ftpd
Dec 12 08:49:39 centauro inetd[17411]: telnet/tcp: Added service, server /usr/lbin/telnetd
Dec 12 08:49:39 centauro inetd[17411]: login/tcp: Added service, server /usr/lbin/rlogind
Dec 12 08:49:39 centauro inetd[17411]: shell/tcp: Added service, server /usr/lbin/remshd
Dec 12 08:49:39 centauro inetd[17411]: exec/tcp: Added service, server /usr/lbin/rexecd
Dec 12 08:49:39 centauro inetd[17411]: ntalk/udp: Added service, server /usr/lbin/ntalkd
Dec 12 08:49:39 centauro inetd[17411]: auth/tcp: Added service, server /usr/lbin/identd
Dec 12 08:49:39 centauro inetd[17411]: printer/tcp: Added service, server /usr/sbin/rlpdaemon
Dec 12 08:49:39 centauro inetd[17411]: daytime/tcp: Added service, server internal
Dec 12 08:49:39 centauro inetd[17411]: daytime/udp: Added service, server internal
Dec 12 08:49:39 centauro inetd[17411]: time/tcp: Added service, server internal
Dec 12 08:49:39 centauro inetd[17411]: echo/tcp: Added service, server internal
Dec 12 08:49:39 centauro inetd[17411]: echo/udp: Added service, server internal
Dec 12 08:49:39 centauro inetd[17411]: discard/tcp: Added service, server internal
Dec 12 08:49:39 centauro inetd[17411]: discard/udp: Added service, server internal
Dec 12 08:49:39 centauro inetd[17411]: chargen/tcp: Added service, server internal
Dec 12 08:49:39 centauro inetd[17411]: chargen/udp: Added service, server internal
Dec 12 08:49:39 centauro inetd[17411]: kshell/tcp: Added service, server /usr/lbin/remshd
Dec 12 08:49:39 centauro inetd[17411]: klogin/tcp: Added service, server /usr/lbin/rlogind
Dec 12 08:49:39 centauro inetd[17411]: dtspc/tcp: Added service, server /usr/dt/bin/dtspcd
Dec 12 08:49:39 centauro inetd[17411]: swat/tcp: Added service, server /opt/samba/bin/swat
Dec 12 08:49:39 centauro inetd[17411]: registrar/tcp: Added service, server /etc/opt/resmon/lbin/registrar
Dec 12 08:49:39 centauro inetd[17411]: hacl-probe/tcp: Added service, server /opt/cmom/lbin/cmomd
Dec 12 08:49:39 centauro inetd[17411]: hacl-cfg/udp: bind: Address already in use
Dec 12 08:49:39 centauro inetd[17411]: hacl-cfg/udp: Added service, server /usr/lbin/cmclconfd
Dec 12 08:49:39 centauro inetd[17411]: hacl-cfg/tcp: Added service, server /usr/lbin/cmclconfd
Dec 12 08:49:39 centauro inetd[17411]: omni/tcp: Added service, server /opt/omni/lbin/inet
Dec 12 08:49:39 centauro inetd[17411]: recserv/tcp: Added service, server /usr/lbin/recserv
Dec 12 08:49:39 centauro inetd[17411]: nrpe/tcp: Added service, server /opt/iexpress/nagios/bin/nrpe
Dec 12 08:49:39 centauro inetd[17411]: rpc.cmsd/udp: Added service, server /usr/dt/bin/rpc.cmsd
Dec 12 08:49:39 centauro inetd[17411]: rpc.ttdbserver/tcp: Added service, server /usr/dt/bin/rpc.ttdbserver
Dec 12 08:49:39 centauro inetd[17411]: Configuration complete

--In the nagios machines:
[root@nagios libexec]#./check_nrpe -H 192.168.42.129 -c check_correlacion -a /usr/local/nagios/libexec/fichero.txt "1800 integraci+"
CHECK_NRPE: Received 0 bytes from daemon. Check the remote server logs for error messages.

----In hp-ux the result in syslog when I exectue the command ./check_nrpe -H 192.168.42.129 -c check_correlacion -a /usr/local/nagios/libexec/fichero.txt "1800 integraci+"

/var/adm/syslog> tail -f syslog.log:

Dec 12 08:55:58 centauro nrpe[29519]: Error: Request contained command arguments!
Dec 12 08:55:58 centauro nrpe[29519]: Client request was invalid, bailing out...


Note:
When I stop the inetd daemon, and I execute in nagios
. / check_nrpe -H IP.machine.hpux
Connection refuse by host

Re: NRPE client configuration on HP-UX

Posted: Thu Dec 12, 2013 10:30 am
by abrist
RDMaroto wrote:Note:
When I stop the inetd daemon, and I execute in nagios
. / check_nrpe -H IP.machine.hpux
Connection refuse by host
This is expected if inetd is managing the nrpe daemon and inetd is stopped.
RDMaroto wrote:/var/adm/syslog> tail -f syslog.log:

Dec 12 08:55:58 centauro nrpe[29519]: Error: Request contained command arguments!
Dec 12 08:55:58 centauro nrpe[29519]: Client request was invalid, bailing out...
One of the following is most likely the cause:
1) "dont_blame_nrpe=1" is not set in nrpe.cfg on the HP-UX.
2) the nrpe daemon has not been restarted since adding "dont_blame_nrpe=1" to the HP-UX's nrpe.cfg:
3) multiple nrpe processes are running on the HP-UX.

Re: NRPE client configuration on HP-UX

Posted: Thu Dec 12, 2013 12:11 pm
by RDMaroto
Thanks abrist.

How I can check if I started nrpe?

If I do in hpux machine
ps-ef | grep nagios
   nagios 4117 1 0 17:57:36? 0:00 / opt / iexpress / nagios / bin / nagios-d / opt / iexpress / nagios / etc / nagios.cfg
   nagios 15569 21179 0 18:03:54 pts / 0 0:00 grep nagios

but If I do in hpux machine
ps-ef | grep nrpe
   nagios 17251 21179 0 18:04:39 pts / 0 0:00 grep nrpe

I understand that he is running because the devil run from nagios:
. / check_nrpe-H ip.machine.hpux
NRPE v2.12

But, how do I reset it?

/opt/iexpress/nagios/bin> ls
nagios nagiostats nrpe nsca

centauro(root):/opt/iexpress/nagios/bin> ./nrpe start

NRPE - Nagios Remote Plugin Executor
Copyright (c) 1999-2008 Ethan Galstad ([email protected])
Version: 2.12
Last Modified: 03-10-2008
License: GPL v2 with exemptions (-l for more info)
SSL/TLS Available: Anonymous DH Mode, OpenSSL 0.9.6 or higher required

***************************************************************
** POSSIBLE SECURITY RISK - TCP WRAPPERS ARE NOT AVAILABLE! **
** Read the NRPE SECURITY file for more information **
***************************************************************

Usage: nrpe [-n] -c <config_file> <mode>

Options:
-n = Do not use SSL
<config_file> = Name of config file to use
<mode> = 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.

centauro(root):/opt/iexpress/nagios/bin> ./nrpe -i
root 27169 14248 1 18:09:57 pts/4 0:00 grep nrpe
centauro(root):/opt/iexpress/nagios/bin> ./nrpe -d
centauro(root):/opt/iexpress/nagios/bin> ps -ef | grep nrpe
root 27929 14248 1 18:10:12 pts/4 0:00 grep nrpe

The error in nagios continue...
Thanks for your time abrist

Re: NRPE client configuration on HP-UX

Posted: Thu Dec 12, 2013 12:20 pm
by abrist
The nrpe daemon on the remote host should be restarted when inetd is restarted. If you stop inetd, you should not be able to check the nrpe version from the nagios server:
1) kill inetd (stop the service, etc)
2) Try to check the nrpe version from the XI server once again - it should not work this time:

Code: Select all

. / check_nrpe-H ip.machine.hpux
3) Restart inetd.

Re: NRPE client configuration on HP-UX

Posted: Fri Dec 13, 2013 2:44 am
by RDMaroto
Good morning abrist.
I execute in HPUX:

ps -ef | grep inetd
root 6863 15889 0 08:38:14 pts/5 0:00 grep inetd
root 26857 1 0 08:54:31 ? 0:31 /usr/sbin/inetd
/sbin/init.d> kill -9 26857
/sbin/init.d> ps -ef | grep inetd
root 7488 15889 0 08:38:25 pts/5 0:00 grep inetd

In this moment in NAGIOS:
./check_nrpe -H IP.MACHINE.HPUX
Connection refused by host

Restart inetd in HPUX:

/sbin/init.d> ./inetd start
Internet Services started

And execute in NAGIOS:
./check_nrpe -H IP.MACHINE.HPUX
NRPE v2.12

And execute also in NAGIOS:
./check_nrpe -H IP.MACHINE.HPUX -c check_correlacion -a /opt/iexpress/nagios/etc/nrpe.cfg "test one"
CHECK_NRPE: Received 0 bytes from daemon. Check the remote server logs for error messages.

Thanks for your time abrist
Regards

Re: NRPE client configuration on HP-UX

Posted: Fri Dec 13, 2013 10:22 am
by abrist
You most likely have argument mismatch issues. See section "V. CHECK_NRPE: Received 0 bytes from daemon. Check the remote server logs for error
messages
" from the following document:
http://assets.nagios.com/downloads/nagi ... utions.pdf

Re: NRPE client configuration on HP-UX

Posted: Mon Dec 16, 2013 3:12 am
by RDMaroto
Good morning abrist

I performed all the steps in the document. pdf and the result is always the same.

CHECK_NRPE: Received 0 bytes from daemon. Check the remote server logs for error messages.

What is the problem in hp-ux machines?

At my company we bought the license nagios, and this point is very important monitoring

Thanks for your time.
Regards

Re: NRPE client configuration on HP-UX

Posted: Mon Dec 16, 2013 10:40 am
by abrist
If you have paid for support for XI, send an email to [email protected] to open a ticket. We may move to a remote session.