NRPE client configuration on HP-UX

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
RDMaroto
Posts: 72
Joined: Wed Nov 20, 2013 10:54 am

NRPE client configuration on HP-UX

Post by RDMaroto »

Good morning,
I have the following problem.

When I run from my nagios machine.
. / check_nrpe-H 192.168.42.129-c check_correlacion-a / opt / NAGIOS / logs.log patron

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

I made.
Nrpe installed on 192.168.42.129 which is a HPUX machine

/ opt / iexpress / nagios / etc> vi nrpe.cfg
allowed_hosts = 127.0.0.1,192.168.247.128
# 192 168 247 128 is the nagios host
dont_blame_nrpe = 1

/ opt / iexpress / nagios / etc> netstat-na | grep 5666
tcp 0 0 * .5666 *. * LISTEN

/ etc> vi inetd.conf

# Nagios
nrpe stream tcp nowait nagios / opt / iexpress / nagios / bin / nrpe-n-c / opt / iexpress / nagios / etc / nrpe.cfg-i


the problem are the arguments, because an execution
. / check_nrpe-H 192.168.42.129
NRPE v2.12

Could help me?
thanks
regards
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: NRPE client configuration on HP-UX

Post by slansing »

Can you show us exactly how you are running that nrpe command? The one you posted above is a bit broken.
RDMaroto
Posts: 72
Joined: Wed Nov 20, 2013 10:54 am

Re: NRPE client configuration on HP-UX

Post by RDMaroto »

Good morning.
In the remote machine hp-ux, I installed the package depot.

After, I edited /etc/services and I added:
nrpe 5666/tcp # NAGIOS remote plugin executor

In the hpux machine does not have xinetd, and edited the file /etc /inetd.conf:

#Nagios
nrpe stream tcp nowait nagios /opt/iexpress/nagios/bin/nrpe -n -c /opt/iexpress/nagios/etc/nrpe.cfg -i

I restart the inetd.

In nagios machine, I checked the nrpe. (192.168.42.129 this is my hpux machine)

[root@nagios libexec]# ./check_nrpe -H 192.168.42.129
NRPE v2.14

But when I run the script with argument:

[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.

My file nrpe.cfg in the hpux machines I edited:

dont_blame_nrpe=1

command[check_correlacion]=/opt/inversis/UTIL/SCRIPTS/NAGIOS/scripts/check_correlacion_logs.sh $ARG1$ "$ARG2$"


Thanks
Reegards
Last edited by slansing on Tue Dec 03, 2013 11:04 am, edited 1 time in total.
Reason: Do not double post, it will bump you to the bottom of our "to check" list.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: NRPE client configuration on HP-UX

Post by abrist »

RDMaroto wrote:CHECK_NRPE: Received 0 bytes from daemon. Check the remote server logs for error messages.
Can post a tail of the system messages on the remote system?

Code: Select all

tail -25 /var/log/messages
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
RDMaroto
Posts: 72
Joined: Wed Nov 20, 2013 10:54 am

Re: NRPE client configuration on HP-UX

Post by RDMaroto »

Good afternoon,
In the hp-ux machine (my remote machine), there is no file messages in the path /var/log

In nagios machine, the execution does not return any result in /var/log/messages.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: NRPE client configuration on HP-UX

Post by abrist »

On the HP-UX, the system messages may be located at:

Code: Select all

/var/adm/syslog/syslog.log
But it is modifiable, so your mileage may vary.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
RDMaroto
Posts: 72
Joined: Wed Nov 20, 2013 10:54 am

Re: NRPE client configuration on HP-UX

Post by RDMaroto »

Thank you very much abrist.

The result in the syslog.log is:

Dec 5 08:21:23 centauro nrpe[8932]: Error: Request contained command arguments!
Dec 5 08:21:23 centauro nrpe[8932]: Client request was invalid, bailing out...

Thanks for your time.
Regards
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: NRPE client configuration on HP-UX

Post by abrist »

Alright. Can you post the full service check command?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
RDMaroto
Posts: 72
Joined: Wed Nov 20, 2013 10:54 am

Re: NRPE client configuration on HP-UX

Post by RDMaroto »

My script in my linux machine working properly.
check_correlacion_logs.sh
nrpe.cfg
Thanks for your time.
Regards
You do not have the required permissions to view the files attached to this post.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: NRPE client configuration on HP-UX

Post by abrist »

Your command uses args:

Code: Select all

command[check_correlacion]=/opt/inversis/UTIL/SCRIPTS/NAGIOS/scripts/check_correlacion_logs.sh $ARG1$ "$ARG2$"
I see you have enabled "dont_blame_nrpe", so that is in order. Did you restart the nrpe daemon after changing dont_blame_nrpe" to 1 in nagios.cfg?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Locked