NRPE configuration question
Re: NRPE configuration question
Here are the other two screen shots.
You do not have the required permissions to view the files attached to this post.
-
npolovenko
- Support Tech
- Posts: 3457
- Joined: Mon May 15, 2017 5:00 pm
Re: NRPE configuration question
@rferebee, Looks like you've changed the check_nrpe command in the past?
Here's the standard command that is compatible with the wizard.
And then change the check_nrpe command to:
Here's the standard command that is compatible with the wizard.
How many checks are already using the new check_nrpe command? You could rename your current check_nrpe command to check_nrpe_old and assign it to current services.$USER1$/check_nrpe -2 -H $HOSTADDRESS$ -t 30 -c $ARG1$ $ARG2$
And then change the check_nrpe command to:
That way when you run the linux wizard next time all checks will start working right away.$USER1$/check_nrpe -2 -H $HOSTADDRESS$ -t 30 -c $ARG1$ $ARG2$
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: NRPE configuration question
Dang. I don't know when that would have happened or why the default check would have been changed.
We have 1252 services using the current check, so I don't think changing it is an option. Unless there's a way I can rename the current check while leaving it applied to the services its on?
We have 1252 services using the current check, so I don't think changing it is an option. Unless there's a way I can rename the current check while leaving it applied to the services its on?
-
npolovenko
- Support Tech
- Posts: 3457
- Joined: Mon May 15, 2017 5:00 pm
Re: NRPE configuration question
@rferebee, Actually, you're right! Just rename the existing check_nrpe command to check_nrpe_old. Do it from the command menu in the CCM. It will automatically get updated for all existing services already using it. Then create a new command "check_nrpe":
The wizard will use check_nrpe next time it runs.$USER1$/check_nrpe -2 -H $HOSTADDRESS$ -t 30 -c $ARG1$ $ARG2$
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: NRPE configuration question
Ok. I made the change to the 'check_nrpe' command.
Unfortunately, I'm still having issues. The checks are telling me either "Command 'abcdef' not defined" or "*** You must define WARN and CRITICAL levels!" or "check_swap: Warning threshold must be integer or percentage!".
The latter 2 are already defined and are integers or percentages. It seems that perhaps my nrpe.cfg file is not default or maybe missing some data? I don't know.
Unfortunately, I'm still having issues. The checks are telling me either "Command 'abcdef' not defined" or "*** You must define WARN and CRITICAL levels!" or "check_swap: Warning threshold must be integer or percentage!".
The latter 2 are already defined and are integers or percentages. It seems that perhaps my nrpe.cfg file is not default or maybe missing some data? I don't know.
-
npolovenko
- Support Tech
- Posts: 3457
- Joined: Mon May 15, 2017 5:00 pm
Re: NRPE configuration question
@rferebee, Are all checks failing or just some? Please open the service check configuration page, click on Run check Command and take a screenshot of the output.
Also, please upload the /usr/local/nagios/etc/nrpe.cfg file from the remote server.
You do not have the required permissions to view the files attached to this post.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: NRPE configuration question
Here's the output of 'CPU Stats':
[nagios@nagiosxi ~]$ /usr/local/nagios/libexec/check_nrpe -2 -H 10.131.11.249 -t 30 -c check_cpu_stats -a '-w 85 -c 95' NRPE: Command 'check_cpu_stats' not defined
Attached is the nrpe.cfg file. Thank you.
[nagios@nagiosxi ~]$ /usr/local/nagios/libexec/check_nrpe -2 -H 10.131.11.249 -t 30 -c check_cpu_stats -a '-w 85 -c 95' NRPE: Command 'check_cpu_stats' not defined
Attached is the nrpe.cfg file. Thank you.
You do not have the required permissions to view the files attached to this post.
Re: NRPE configuration question
The "check_cpu_stats" command is not defined in the nrpe.cfg file. Depending on how you installed NRPE on the client, you may have two options.
1. If you used our official Linux agent installer script, you would have this file - /usr/local/nagios/etc/nrpe/common.cfg. It is possible that you have "check_cpu_stats" command already defined there. Check to see if the command is defined there. If it is, you can simply add the path to the directory in the nrpe.cfg file by changing this:
to this:
and restarting xinetd:
2. If you don't find the /usr/local/nagios/etc/nrpe/common.cfg file on the client machine, define the "check_cpu_stats" command in the nrpe.cfg file:
and restart xinetd.
Test to see if your check works now by running the following command from the CLI on the Nagios XI server:
1. If you used our official Linux agent installer script, you would have this file - /usr/local/nagios/etc/nrpe/common.cfg. It is possible that you have "check_cpu_stats" command already defined there. Check to see if the command is defined there. If it is, you can simply add the path to the directory in the nrpe.cfg file by changing this:
Code: Select all
#include_dir=<somedirectory>
#include_dir=<someotherdirectory>Code: Select all
#include_dir=<somedirectory>
include_dir=/usr/local/nagios/etc/nrpeCode: Select all
service xinetd restartCode: Select all
command[check_cpu_stats]=/usr/local/nagios/libexec/check_cpu_stats.sh $ARG1$Code: Select all
service xinetd restartCode: Select all
/usr/local/nagios/libexec/check_nrpe -2 -H 10.131.11.249 -t 30 -c check_cpu_stats -a '-w 85 -c 95'Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: NRPE configuration question
Thanks for the reply. We do not have the common.cfg file on our system.
In order for this (command[check_cpu_stats]=/usr/local/nagios/libexec/check_cpu_stats.sh $ARG1$), I would need to have check_cpu_stats.sh located here: /usr/local/nagios/libexec
I do not have that plugin.
Is there a way to perform a mass addition of the most commonly used plugins? I feel that we're missing things that should be there based on checks that the build in wizards create. For example, I feel like check_cpu_stats.sh should already be there otherwise why would the Linux Wizard create a check that uses that plugin?
Am I way off base in my thinking?
In order for this (command[check_cpu_stats]=/usr/local/nagios/libexec/check_cpu_stats.sh $ARG1$), I would need to have check_cpu_stats.sh located here: /usr/local/nagios/libexec
I do not have that plugin.
Is there a way to perform a mass addition of the most commonly used plugins? I feel that we're missing things that should be there based on checks that the build in wizards create. For example, I feel like check_cpu_stats.sh should already be there otherwise why would the Linux Wizard create a check that uses that plugin?
Am I way off base in my thinking?
Re: NRPE configuration question
You can download the linux-nrpe-agent tarball on the client machine, and copy the check_cpu_stats.sh plugin to the libexec directory.
Update:
As far as the most commonly used plugins goes, when installing NRPE on clients, we always recommend using our official Linux agent installer.
https://assets.nagios.com/downloads/nag ... _Agent.pdf
The script installs most commonly used plugins, official nagios plugins, and the NRPE agent. Most common commands are placed in a config file, called common.cfg, which is used by the "Linux Server" wizard.
Code: Select all
cd /tmp
wget https://assets.nagios.com/downloads/nagiosxi/agents/linux-nrpe-agent.tar.gz
tar xvf linux-nrpe-agent.tar.gz
cd linux-nrpe-agent/subcomponents/extraplugins/plugins
cp check_cpu_stats.sh /usr/local/nagios/libexecAs far as the most commonly used plugins goes, when installing NRPE on clients, we always recommend using our official Linux agent installer.
https://assets.nagios.com/downloads/nag ... _Agent.pdf
The script installs most commonly used plugins, official nagios plugins, and the NRPE agent. Most common commands are placed in a config file, called common.cfg, which is used by the "Linux Server" wizard.
Be sure to check out our Knowledgebase for helpful articles and solutions!