Page 2 of 2

Re: NRPE checks do not work for Linux hosts

Posted: Tue Nov 24, 2015 3:24 pm
by gormank
Uncomment any you want. I was just looking at a previous post with some commands commented out.
You may want to run your .cfg files through strings and/or file and maybe dos2unix. They seem to have garbage in them.

Re: NRPE checks do not work for Linux hosts

Posted: Tue Nov 24, 2015 3:25 pm
by hsmith
We're looking for the common.cfg file on the remote server you're trying to check, not the XI server itself. Sorry I didn't clarify that a little more.

@gormank - Thank you for all of your help around the forums :)

Re: NRPE checks do not work for Linux hosts

Posted: Wed Nov 25, 2015 5:19 pm
by dlukinski
hsmith wrote:We're looking for the common.cfg file on the remote server you're trying to check, not the XI server itself. Sorry I didn't clarify that a little more.

@gormank - Thank you for all of your help around the forums :)
Found it, thank you.

Looks nice and clean and similar to yours (standard Linux client install)
Of course there is no handler for "Check_OS_Version"

Now please explain to me in lemon terms (if applicable :-)
How do I configure NRPE check for this one - https://exchange.nagios.org/directory/P ... co/details
OR for http://sites.box293.com/nagios/guides/common-checks

with respect to NRPE client/server command configurations?
Thanks,
Dimitri

Re: NRPE checks do not work for Linux hosts

Posted: Wed Nov 25, 2015 6:15 pm
by gormank
I think your best bet is to get a standard check running on your Nagios server before worrying about new ones.

I'd uncomment the following line:
#command[check_load]=/usr/local/nagios/libexec/check_load -w $ARG1$ -c $ARG2$
command[check_load]=/usr/local/nagios/libexec/check_load -w $ARG1$ -c $ARG2$
Check that the script exists and is executable:
ls -l /usr/local/nagios/libexec/check_load
And finally define a service in Nagios to run on the Nagios server to check load.

I checked your nrpe.cfg.cfg and sure enough it has Windows/DOS CRLFs in it. Or the one attached previously does.
# file /tmp/nrpe.cfg.txt
/tmp/nrpe.cfg.txt: ASCII English text, with CRLF line terminators

Also, if you click the attached nrpe.cfg.txt file and open it in a Windows editor, you'll find that Windows thinks it has garbage in it. See the red text below.

#command[check_hda1]=/usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /dev/hda
1
#command[check_zombie_procs]=/usr/local/nagios/libexec/check_procs -w 5 -c 10 -s Z
#command[check_total_procs]=/usr/local/nagios/libexec/check_procs -w 150 -c 200


# The following examples allow user-supplied arguments and can
# only be used if the NRPE daemon was compiled with support for
# command arguments *AND* the dont_blame_nrpe directive in this
# config file is set to '1'. This poses a potential security risk, so
# make sure you read the SECURITY file before doing this.

#command[check_users]=/usr/local/nagios/libexec/check_users -w $ARG1$ -c $ARG2$
#command[check_load]=/usr/local/nagios/libexec/check_load -w $ARG1$ -c $ARG2$
#command[check_disk]=/usr/local/nagios/libexec/check_disk -w $ARG1$ -c $ARG2$ -p $A
RG3$
#command[check_procs]=/usr/local/nagios/libexec/check_procs -w $ARG1$ -c $ARG2$ -s
$ARG3$

Re: NRPE checks do not work for Linux hosts

Posted: Wed Nov 25, 2015 8:34 pm
by Box293
dlukinski wrote:
hsmith wrote:We're looking for the common.cfg file on the remote server you're trying to check, not the XI server itself. Sorry I didn't clarify that a little more.

@gormank - Thank you for all of your help around the forums :)
Found it, thank you.

Looks nice and clean and similar to yours (standard Linux client install)
Of course there is no handler for "Check_OS_Version"

Now please explain to me in lemon terms (if applicable :-)
How do I configure NRPE check for this one - https://exchange.nagios.org/directory/P ... co/details
OR for http://sites.box293.com/nagios/guides/common-checks

with respect to NRPE client/server command configurations?
Thanks,
Dimitri
In addition to what @gormank has said.
Of course there is no handler for "Check_OS_Version"
OR for http://sites.box293.com/nagios/guides/common-checks
There might be some confusion going on here.

In Linux, the NRPE client has commands defined in either nagios.cfg or common.cfg.

When you are looking at my website, specifically at the Check_OS_Version section you'll notice this:
NSClient++ 0.4.3 onwards - Linux
No additional configuration is required.
Command:
check_nrpe -H centos05 -t 30 -c Check_OS_Version -a show-all 'detail-syntax=${kernel_name} Version ${kernel_release}'

Output:
Linux Version 3.10.0-123.el7.x86_64|
This is actually a command built into a separate client called NSClient++. Historically NSClient++ has been a Windows only application which can be an NRPE client, however in recent versions it's been ported to a Linux version. The point I'm making is that this Check_OS_Version check is specific to NSClient++, it will not work with the NRPE client.

Actually you'll find most of the "Common Checks" on my website focus on Windows but you will see some SNMP and others as needed. I have not yet got to the point of adding check examples for the linux NRPE client.
How do I configure NRPE check for this one - https://exchange.nagios.org/directory/P ... co/details
Looking at that check, it appears to be a JMX style plugin which can be run from the Nagios server without needing NRPE.
I suggest looking at this guide: https://assets.nagios.com/downloads/nag ... ios-XI.pdf

Re: NRPE checks do not work for Linux hosts

Posted: Thu Nov 26, 2015 2:59 pm
by dlukinski
Box293 wrote:
dlukinski wrote:
hsmith wrote:We're looking for the common.cfg file on the remote server you're trying to check, not the XI server itself. Sorry I didn't clarify that a little more.

@gormank - Thank you for all of your help around the forums :)
Found it, thank you.

Looks nice and clean and similar to yours (standard Linux client install)
Of course there is no handler for "Check_OS_Version"

Now please explain to me in lemon terms (if applicable :-)
How do I configure NRPE check for this one - https://exchange.nagios.org/directory/P ... co/details
OR for http://sites.box293.com/nagios/guides/common-checks

with respect to NRPE client/server command configurations?
Thanks,
Dimitri
In addition to what @gormank has said.
Of course there is no handler for "Check_OS_Version"
OR for http://sites.box293.com/nagios/guides/common-checks
There might be some confusion going on here.

In Linux, the NRPE client has commands defined in either nagios.cfg or common.cfg.

When you are looking at my website, specifically at the Check_OS_Version section you'll notice this:
NSClient++ 0.4.3 onwards - Linux
No additional configuration is required.
Command:
check_nrpe -H centos05 -t 30 -c Check_OS_Version -a show-all 'detail-syntax=${kernel_name} Version ${kernel_release}'

Output:
Linux Version 3.10.0-123.el7.x86_64|
This is actually a command built into a separate client called NSClient++. Historically NSClient++ has been a Windows only application which can be an NRPE client, however in recent versions it's been ported to a Linux version. The point I'm making is that this Check_OS_Version check is specific to NSClient++, it will not work with the NRPE client.

Actually you'll find most of the "Common Checks" on my website focus on Windows but you will see some SNMP and others as needed. I have not yet got to the point of adding check examples for the linux NRPE client.
How do I configure NRPE check for this one - https://exchange.nagios.org/directory/P ... co/details
Looking at that check, it appears to be a JMX style plugin which can be run from the Nagios server without needing NRPE.
I suggest looking at this guide: https://assets.nagios.com/downloads/nag ... ios-XI.pdf
Thank you, I'll give it shot

Re: NRPE checks do not work for Linux hosts

Posted: Thu Nov 26, 2015 7:02 pm
by Box293
Great, let us know how it goes.

Re: NRPE checks do not work for Linux hosts

Posted: Sun Jun 05, 2016 6:41 am
by dlukinski
Please close this one

We now know why NRPE did not work for SLES 11 SP3 and in required to chmod plugins in other cases