Page 2 of 4
Re: Installing NRPE
Posted: Thu Aug 21, 2014 5:17 pm
by toleolu
Well, that's how I installed it.
When it comes to the monitoring wizard, do you run the NRPE wizard or the Linux Server wizard, or does it matter?
Re: Installing NRPE
Posted: Thu Aug 21, 2014 8:50 pm
by Box293
Yes I can see there are some differences between the NRPE wizard vs the Linux Server wizard and how it creates the services.
I think everything is OK on the client.
On the Nagios XI server do the following:
- CCM
Delete all the services the wizard created for the laptop
Apply Config
This time run the Linux Server wizard. You should have more sucess with this. You might still have some commands that need tweaking on the client side but some of them should work straight away.
Re: Installing NRPE
Posted: Fri Aug 22, 2014 12:59 pm
by toleolu
Thanks.
Ran the Linux Server Wizard and most services are now checking properly. I am getting "Could not parse argument" and Status Unknown for disk usage and cpu load.
Capture.JPG
Here's the command for check disk:
check_nrpe!check_disk!-a '-w 20% -c 10% -p /dev/sda1'
Mahalo
Re: Installing NRPE
Posted: Fri Aug 22, 2014 1:12 pm
by slansing
For the could not parse arguments ones, can you show us the command definition/arguments being passed from those services in the ccm? And also, a copy of the remote host's nrpe.cfg would be great. Unless it is the same one you posted previously, and you have not modified it.
Re: Installing NRPE
Posted: Fri Aug 22, 2014 1:16 pm
by toleolu
At the bottom of the nrpe.cfg file, all the command lines involving -w $ARG1$ -c $ARG2$ were commented out.
I removed the # on those lines and now I get Status Unknown. Unknown Argument.
Should I try removing the client then reinstalling it? Thinking there might be something left over from when I originally tried to set this up with nrpe wizard?
Re: Installing NRPE
Posted: Fri Aug 22, 2014 1:38 pm
by abrist
toleolu wrote:Should I try removing the client then reinstalling it?
No, if some checks are working, then your issue is most likely with the configuration of the agent.
Could you post your XI $ARG$ configuration and the remote nrpe.cfg?
Re: Installing NRPE
Posted: Fri Aug 22, 2014 1:46 pm
by toleolu
I hope this is what you meant.
Capture.JPG
The nrpe.cfg is attached.
Re: Installing NRPE
Posted: Fri Aug 22, 2014 1:55 pm
by abrist
We usually include the command definitions for our agent in the common.cfg config. Is it located in the follow directory:
If so, you may want to comment out whatever command lines you uncommented from nrpe.cfg, as the proper commands are located in common.cfg.
As far as the partition checks are concerned, lets try to run the check locally (on the remote system) as user nagios with the "very, very verbose" flag (-vvv):
Code: Select all
cd /usr/local/nagios/libexec
su nagios -c "./check_disk -vvv -w 20% -c 10% -p /dev/sda1"
Post the output of the command.
Re: Installing NRPE
Posted: Fri Aug 22, 2014 1:57 pm
by slansing
Edit: Woops, take a look at abrist's post first
Ahhh there is the problem, you have an ARG2 defined but only one ARG slot on the actual command. Additionally, this is what NRPE expects to receive:
Code: Select all
command[check_disk]=/usr/local/nagios/libexec/check_disk -w $ARG1$ -c $ARG2$ -p $ARG3$
I would honestly shift your entire $ARG2$ line in nagios to the $ARG1$ line to make it easier, and then remove everything from your NRPE command but:
Code: Select all
command[check_disk]=/usr/local/nagios/libexec/check_disk $ARG1$
Your new command in XI should look like the following on the $ARG1$ line:
Code: Select all
check_disk -a '-w 20% -c 10% -p /dev/sda1'
Re: Installing NRPE
Posted: Fri Aug 22, 2014 2:29 pm
by toleolu
Wow, that's a lot to digest.
Except for going in and removing the comment marker on those lines in the nrpe.cfg file, I've stayed out of these files and just ran everything per the default installation and wizard config documentation.
All the Windows Server install and configs went off without a hitch, so I'm wondering if I'm doing something wrong on the Linux side, or this is just kind of how things go when setting these agents up on a Linux box.
That's not a Windows versus Linux statement mind you, just trying to understand how all this works.