Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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
add comment

4 Answers

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
add comment

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 (.1.3.6.1.2.1.25.1.5.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
add comment

NRPE-2.14 ;)

install the plugins and NRPE on the remote server

share|improve this answer
add comment

Your Answer

 
discard

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