Check

Schimpke, Dr. Thomas - bhn Schimpke.Thomas at bhn-services.com
Thu Oct 6 14:32:03 CEST 2011


Hi,

what about HOST-RESOURCES-MIB::hrSystemNumUsers.0 ?

snmpget -v2c -c xxx  belinda HOST-RESOURCES-MIB::hrSystemNumUsers.0
HOST-RESOURCES-MIB::hrSystemNumUsers.0 = Gauge32: 2

You have to load the MIB of cause. If you prefer the numerical OID:

snmptranslate -On HOST-RESOURCES-MIB::hrSystemNumUsers.0
..1.3.6.1.2.1.25.1.5.0

Thomas

On 10/06/2011 01:25 PM, Marc-André Doll wrote:
> Hi,
>
> I don't know about some SNMP OID which lists the connected users on
> Linux servers (and if someone knows about it, I will be glad to be
> updated). You can however interface your script with the UCD MIB on your
> monitored servers using the extTable table (1.3.6.1.4.1.2021.8).
>
> Marc-André
>
> On Thu, 2011-10-06 at 12:54 +0200, Anthony BRODARD wrote:
>> Hi list,
>>
>>
>> I would to detect if any user is directly connected (console) on my
>> Linux servers (Debian, CentOS).
>> I've created this bash simply bash script :
>>
>>
>>          #!/bin/bash
>>
>>
>>          WHO=`which who`
>>          GREP=`which grep`
>>          WC=`which wc`
>>
>>
>>          RESULT=`$WHO | $GREP tty | $WC -l`
>>
>>
>>          if [ $RESULT -ne 0 ]
>>          then
>>            echo $RESULT "utilisateur(s) connecte(s) en console"
>>            exit 1
>>          else
>>            echo "OK"
>>            exit 0
>>          fi
>>
>>
>> It works fine, but I prefer to use an other method, most lighter than
>> the check_by_ssh.
>> Do you know an other way to do that, via SNMP for exemple.
>>
>>
>> Regards
>> ------------------------------------------------------------------------------
>> All the data continuously generated in your IT infrastructure contains a
>> definitive record of customers, application performance, security
>> threats, fraudulent activity and more. Splunk takes this data and makes
>> sense of it. Business sense. IT sense. Common sense.
>> http://p.sf.net/sfu/splunk-d2dcopy1
>> _______________________________________________ Nagios-users mailing list Nagios-users at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null
>
>
> ------------------------------------------------------------------------------
> All the data continuously generated in your IT infrastructure contains a
> definitive record of customers, application performance, security
> threats, fraudulent activity and more. Splunk takes this data and makes
> sense of it. Business sense. IT sense. Common sense.
> http://p.sf.net/sfu/splunk-d2dcopy1
> _______________________________________________
> Nagios-users mailing list
> Nagios-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-users
> ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
> ::: Messages without supporting info will risk being sent to /dev/null
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null


More information about the Users mailing list