Installing NRPE

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Installing NRPE

Post by abrist »

toleolu wrote: That's not a Windows versus Linux statement mind you, just trying to understand how all this works.
No problem, we do not engage in religious wars here, so all is well. We save that for time-honored arguments like Batman vs. Spiderman, Romans vs. Gauls, and Acetone vs. Mineral Spirits.

Well, I digress. Digest what myself and Trevor posted, and we can pick this up on Monday. If you have access to the ticket system, it may be beneficial to open a ticket so you can get a small demo of installing and configuring the linux agent during a remote session.

Enjoy the weekend!
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 »

Well isn't this special:
Capture.JPG
I moved all of the checks in the ARG2 to ARG1 and it's working. I put the comment symbols back in the nrpe.cfg file, and ran the command per abrist's suggestion and that worked as well.

So the big question is, how did those commands get placed in the ARG2 line? I didn't do that.My other question is, now that's it's working, I want to wipe it and do it again. What's the best way to remove nrpe from the Linux laptop? yum remove?
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 »

Nope, as the agent was installed from source. I would just install right over the top as it will overwrite all the files anyways.
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 »

Cool beans, close this out.

Have a great weekend gents, I know I will.

Mahalo
Charles Masteller
Information Systems Specialist
Hawaii Health Systems Corp.
"No one will ever need more than 640K RAM". Bill Gates
toleolu
Posts: 294
Joined: Fri Jul 19, 2013 7:02 pm
Location: Honolulu Hawaii

Re: Installing NRPE

Post by toleolu »

Well wait a minute.

Kind of a slow day today, so I wiped that Linux laptop and reinstalled CentOS 6 just to make sure there weren't any bunny tracks still lingering from the old config, downloaded and installed nrpe, ran the Linux Server config wizard, and it did the same thing with the can't parse argument and putting those check commands in $ARG2$. Cut and pasted the line from ARG2 to ARG1 and like before, it started working.

Anyone have any ideas about what's causing this? We only have a handful of Linux Servers so it's no big deal to go in and edit these commands after setting up the host, just wondering if this is a glitch, or is something else going on.

Mahalo
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 »

I believe the core of your issue is that your check_nrpe command has been changed from the default.

When the wizards run and create services, they assume the commands they are using have not been changed. Because your command has been changed, this has caused your issues.

Specifically check_nrpe is as follows by default:

Code: Select all

$USER1$/check_nrpe -H $HOSTADDRESS$ -t 30 -c $ARG1$ $ARG2$
However yours is defined as so:

Code: Select all

$USER1$/check_nrpe -H $HOSTADDRESS$ -t 600 -p 5666 -c $ARG1$
If you changed yours to have the $ARG2$ value present all of your problems would go away:

Code: Select all

$USER1$/check_nrpe -H $HOSTADDRESS$ -t 600 -p 5666 -c $ARG1$ $ARG2$
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 »

Don't recall doing anything with that, but that doesn't mean it didn't happen somewhere along the line. The check_nrpe_ssl doesn't have a $ARG2$ in it either.

Do I need a -w in there somewhere? Like -w $ARG1$ -c $ARG2$.
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 »

No, because the wizard adds those arguments to the value of $ARG2$.

Exactly how the screenshot is defined in this post of yours http://support.nagios.com/forum/viewtop ... 10#p109342.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
rajasegar
Posts: 1018
Joined: Sun Mar 30, 2014 10:49 pm

Re: Installing NRPE

Post by rajasegar »

Mine is defined like this.

Code: Select all

$USER1$/check_nrpe -u -H $HOSTADDRESS$ -t 60 -c $ARG1$ -a $ARG2$ $ARG3$ $ARG4$ $ARG5$ $ARG6$ $ARG7$ $ARG8$
Each argument corresponds to the UI.
26-08-2014 03-32-02 PM.png
I discovered that I need a lot of arguments when using complex monitoring plugins and to have a nice organisation in the UI.
Of course 2 also works but one needs to cramp everything into $ARG2$. Then there is the added hassle of scrolling to see the whole list.
You do not have the required permissions to view the files attached to this post.
5 x Nagios 5.6.9 Enterprise Edition
RHEL 6 & 7
rrdcached & ramdisk optimisation
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Installing NRPE

Post by slansing »

Agreed, it can be nice to have those extra arguments available at a moment's notice. That is something you may want to take a look at doing down the line. If you were unable to find it, you can find your command definitions at CCM > Commands. You also have the ability to copy them, so if you want to slightly alter a single command's hard-coded line for a few checks, you may want to copy it out and name it similarly (not the case here).
Locked