Page 3 of 4

Re: Installing NRPE

Posted: Fri Aug 22, 2014 2:55 pm
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!

Re: Installing NRPE

Posted: Fri Aug 22, 2014 3:02 pm
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?

Re: Installing NRPE

Posted: Fri Aug 22, 2014 3:09 pm
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.

Re: Installing NRPE

Posted: Fri Aug 22, 2014 3:14 pm
by toleolu
Cool beans, close this out.

Have a great weekend gents, I know I will.

Mahalo

Re: Installing NRPE

Posted: Fri Aug 22, 2014 6:02 pm
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

Re: Installing NRPE

Posted: Sun Aug 24, 2014 10:11 pm
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$

Re: Installing NRPE

Posted: Mon Aug 25, 2014 12:09 pm
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$.

Re: Installing NRPE

Posted: Mon Aug 25, 2014 8:25 pm
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.

Re: Installing NRPE

Posted: Tue Aug 26, 2014 2:35 am
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.

Re: Installing NRPE

Posted: Tue Aug 26, 2014 9:44 am
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).