Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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

In Nagios there exists a check_users function to check the number of users logged into the local system but how do I do the same for a remote system? I have failed in trying to find the appropirate plugin.

Help appreciated. Thanks.

share|improve this question

you can install nrpe on remote computer that you want to monitor and invoke the plugin there.

or - if you want to hack a bit - you can write your own script and use ssh + key pair and execute on remote machine command like who + parse output locally.

share|improve this answer

If you have SNMP enabled which has been my preferred method of performing remote monitoring checks. You can setup a Nagios service check that polls the HOST-RESOURCES-MIB::hrSystemNumUsers.0 (. OID to get the number of users. This will return the current user count at the time the OID is retrieved.

The biggest advantage I find in using SNMP over NRPE as otherwise suggested is that if you find a flaw in your plugin you need to push that change out to every host that has the plugin installed on. For this reason I find doing agent-less monitoring better than agent-based.

share|improve this answer

NRPE-2.14 ;)

install the plugins and NRPE on the remote server

share|improve this answer

Your Answer


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