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.
NRPE checks do not work for Linux hosts
Re: NRPE checks do not work for Linux hosts
Last edited by gormank on Tue Nov 24, 2015 3:25 pm, edited 1 time in total.
Re: NRPE checks do not work for Linux hosts
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
@gormank - Thank you for all of your help around the forums
Former Nagios Employee.
me.
me.
Re: NRPE checks do not work for Linux hosts
Found it, thank you.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
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
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$
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$
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: NRPE checks do not work for Linux hosts
In addition to what @gormank has said.dlukinski wrote:Found it, thank you.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
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
There might be some confusion going on here.Of course there is no handler for "Check_OS_Version"
OR for http://sites.box293.com/nagios/guides/common-checks
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:
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.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|
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.
Looking at that check, it appears to be a JMX style plugin which can be run from the Nagios server without needing NRPE.How do I configure NRPE check for this one - https://exchange.nagios.org/directory/P ... co/details
I suggest looking at this guide: https://assets.nagios.com/downloads/nag ... ios-XI.pdf
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: NRPE checks do not work for Linux hosts
Thank you, I'll give it shotBox293 wrote:In addition to what @gormank has said.dlukinski wrote:Found it, thank you.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
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
There might be some confusion going on here.Of course there is no handler for "Check_OS_Version"
OR for http://sites.box293.com/nagios/guides/common-checks
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:
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.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|
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.
Looking at that check, it appears to be a JMX style plugin which can be run from the Nagios server without needing NRPE.How do I configure NRPE check for this one - https://exchange.nagios.org/directory/P ... co/details
I suggest looking at this guide: https://assets.nagios.com/downloads/nag ... ios-XI.pdf
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: NRPE checks do not work for Linux hosts
Great, let us know how it goes.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: NRPE checks do not work for Linux hosts
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
We now know why NRPE did not work for SLES 11 SP3 and in required to chmod plugins in other cases