Installing NRPE

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
toleolu
Posts: 294
Joined: Fri Jul 19, 2013 7:02 pm
Location: Honolulu Hawaii

Re: Installing NRPE

Post 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?
Charles Masteller
Information Systems Specialist
Hawaii Health Systems Corp.
"No one will ever need more than 640K RAM". Bill Gates
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Installing NRPE

Post 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.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
toleolu
Posts: 294
Joined: Fri Jul 19, 2013 7:02 pm
Location: Honolulu Hawaii

Re: Installing NRPE

Post 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
You do not have the required permissions to view the files attached to this post.
Charles Masteller
Information Systems Specialist
Hawaii Health Systems Corp.
"No one will ever need more than 640K RAM". Bill Gates
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Installing NRPE

Post 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.
toleolu
Posts: 294
Joined: Fri Jul 19, 2013 7:02 pm
Location: Honolulu Hawaii

Re: Installing NRPE

Post 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?
Charles Masteller
Information Systems Specialist
Hawaii Health Systems Corp.
"No one will ever need more than 640K RAM". Bill Gates
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Installing NRPE

Post 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?
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.
toleolu
Posts: 294
Joined: Fri Jul 19, 2013 7:02 pm
Location: Honolulu Hawaii

Re: Installing NRPE

Post by toleolu »

I hope this is what you meant.
Capture.JPG
The nrpe.cfg is attached.
You do not have the required permissions to view the files attached to this post.
Charles Masteller
Information Systems Specialist
Hawaii Health Systems Corp.
"No one will ever need more than 640K RAM". Bill Gates
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Installing NRPE

Post by abrist »

We usually include the command definitions for our agent in the common.cfg config. Is it located in the follow directory:

Code: Select all

ls -la /usr/local/nagios/etc/nrpe
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.
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.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Installing NRPE

Post 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'
toleolu
Posts: 294
Joined: Fri Jul 19, 2013 7:02 pm
Location: Honolulu Hawaii

Re: Installing NRPE

Post 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.
Charles Masteller
Information Systems Specialist
Hawaii Health Systems Corp.
"No one will ever need more than 640K RAM". Bill Gates
Locked