8

I see in a lot of the Nagios documentation references to check_nrpe_1arg.

Can anyone explain exactly what this is, or does? I see nothing in the Nagios documentation, or anywhere else on the web, that comes right out and says "check_nrpe_1arg does __". At best, it's "you need check_nrpe_1arg here", but without explaining what or why.

Thanks!

3
  • I've never seen that before. Have some links?
    – VxJasonxV
    Oct 26, 2010 at 0:12
  • @VxJasonxV, for numerous links Google check_nrpe_1arg Oct 26, 2010 at 1:11
  • Three steps ahead of you :). Note the timestamps on both this comment and my answer.
    – VxJasonxV
    Oct 26, 2010 at 21:39

2 Answers 2

11

Based off a quick cursory search, check_nrpe_1arg is nothing special compared to check_nrpe, it has a bit of a backstory too.

check_nrpe by default does not accept command line arguments to be sent, just the command_name to run on the remote NRPE server host. In order to get NRPE to accept arguments beyond that (if memory serves), you have to enable a compile-time definition, AS WELL AS configure it in check_nrpe as well as the NRPE server nrpe.cfg file.

check_nrpe_1arg appears to be a mnemonic that is configured into the core NAGIOS commands.cfg file; specifically, telling the installer that this command will accept only 1 argument (the name of the command to execute on the remote host) and will not honor any additional arguments.

It's a weird way to do it, given the default behavior of NAGIOS, but it gained traction nevertheless.

The quickest answer to this:
check_nrpe_1arg does exactly what it is configured to do in commands.cfg on the core NAGIOS server. In this context, it provides the command name to execute on the remote NRPE server, and nothing additional will be accepted.

[edit]
Also, it appears to have originated out of the default configs in "Untangle" (a Linux based firewall/routing software package), that or Debian, it's hard to tell without following a handful of links around.

4

I can only answer this as far as Debian distributions go (at the time of wheezy)... check_nrpe_1arg is a command name defined in /etc/nagios-plugins/check_nrpe.cfg.

check_nrpe accepts the name of the nrpe command to run on the remote host along with arguments (space separated) to pass to the remotely executing command. check_nrpe_1arg, by contrast, only accepts the name of the command to run on the remote host (i.e., no arguments are passed to the remotely executing command).

check_nrpe_1arg is useful if you have hard-coded a very specific command on the remote host and wish to call it without passing it any parameters. An example of this you sometimes see is check_hda1 or check_sda1 which is defined in /etc/nagios/nrpe.cfg. check_hda1 and check_sda1 are hard-coded commands that call check_disk with specific parameters.

You must log in to answer this question.