Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a remote Ubuntu system, and I need to do the following checks on it in nagios:

  • check_users

  • check_procs

  • check_all_disks.

How do I do that on a remote system? I've looked around, but everything I've found seems to be from either early 2010 or ealier.

share|improve this question
Nothing of substance has changed with the Nagios code base since 2010 that would deprecate that documentation. – EEAA Jun 2 '12 at 18:58
@ErikA I deal in stuff that is fairly new and changes quick (i'm more of a programmer than a sysadmin), so I'm used to (and to a certain degree, assume) anything older than 6 months being outdated. – James Jun 2 '12 at 19:02

Just because it's from 2 years ago doesn't make it irrelevant. Nagios is a stable, robust system, and as such plenty of useful information is that old.

The tool you want is NRPE (Nagios Remote Plugin Executor); it allows you to run Nagios plugins on a remote machine over the network, and collect the results in your local Nagios server. There's bucketloads of introductory documentation available, so I won't bother going into a detailed HOWTO here.

share|improve this answer
I tend to prefer the check_snmp_* checks, as that eliminates having to deal with installing nrpe. But yes, nrpe will work fine for this – EEAA Jun 2 '12 at 19:02
I used to be like you, until I realised I'd spent far too much of my life trying to wire things into SNMP that really didn't fit well (including writing an SNMP agent of my very own and then I just gave in and started using NRPE. You can just as easily run everything over SSH, too, if NRPE bugs you (but that does leave Windows out in the cold, so we'd still have to support NRPE to some extent). – womble Jun 3 '12 at 9:51

Another option is too install these checks on the server that is to be monitored. Then create a user that on that server for these checks and setup ssh keys. You can then wrap these checks inside check_by_ssh. What happens then is Nagios user will ssh into the monitored server, execute the command, and the log out.

For example, the nagios command configuration would look something like:

define command{
        command_name check_procs
        command_line $USER1$/check_by_ssh -t $_HOSTPARAM_SSH_TIMEOUT$ -H $HOSTADDRESS$ -C "$USER1$/check_procs $ARG1$"

One downside to keep in mind is that ssh has more overhead than other options. However this not really a problem for smaller environments monitoring servers that are not too tight on resources.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.