I´m using net-snmp 5.2.2 on a Red Hat AS. I create a single script to get
amount user connected, only to test the pass directive:

user.sh
#!/bin/sh
echo ".1.3.6.1.4.1.2021.20.1"
echo "integer"
echo `w |grep pts |wc -l`
exit 0

In my snmpd.conf:
.
.
.
monitor -u phphomolog -r 100 "UserYES" ucdavis.20.1 > 2

pass .1.3.6.1.4.1.2021.20.1 /etc/snmpscripts/user.sh


Ok, When the amount of users exceeds 2, my server to trap, will receiver
many traps. If a don´t stop the snmp in my client itself don´t stop to send
traps.

this is log in my snmptrapd.log when the client exceed 2 users

2006-02-18 10:03:59 10.1.100.101 [UDP: [10.1.100.101]:34326]:
sysUpTimeInstance 0:0:02:02.07  snmpTrapOID.0 mteTriggerFired
mteHotTrigger UserYES   mteHotTargetName     mteHotContextName
mteHotOID ucdavis.20.1  mteHotValue 3
2006-02-18 10:04:00 10.1.100.101 [UDP: [10.1.100.101]:34326]:
sysUpTimeInstance 0:0:02:02.16  snmpTrapOID.0 mteTriggerFired
mteHotTrigger UserYES   mteHotTargetName     mteHotContextName
mteHotOID ucdavis.20.1  mteHotValue 3
2006-02-18 10:04:00 10.1.100.101 [UDP: [10.1.100.101]:34326]:
sysUpTimeInstance 0:0:02:02.26  snmpTrapOID.0 mteTriggerFired
mteHotTrigger UserYES   mteHotTargetName     mteHotContextName
mteHotOID ucdavis.20.1  mteHotValue 3
2006-02-18 10:04:00 10.1.100.101 [UDP: [10.1.100.101]:34326]:
sysUpTimeInstance 0:0:02:02.37  snmpTrapOID.0 mteTriggerFired
mteHotTrigger UserYES   mteHotTargetName     mteHotContextName
mteHotOID ucdavis.20.1  mteHotValue 3


How i resolve this problem ? I need create scripts to monitoring many things
and send traps for my trap server.


-------------
Wesley Naves de Faria
Analista de suporte
FreeBSD/OpenBSD/Linux
AGANP - Agência Goiana de Administração Negócios Públicos
Contato: +55 (0XX62) 3201-6582



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to