hi, all

I'm recently working on a project using net-snmp. After configured 
following the man page, my snmptrapd seemed not to receive any 
notification, or maybe snmpd didn't send any.

This is my configuration. Both the snmpd and the snmptrapd are on one
machine.
------------
1. /var/lib/net-snmp/snmpd.conf
createUser agentuser MD5 mypassword
createUser internelUser MD5 mypassword

------------
2. /var/lib/net-snmp/snmptrapd.conf
createUser -e 0x8000000001020304 trapuser MD5 mypassword
createUser infromuser MD5 mypassword

------------
3. /etc/snmp/snmp.conf
defVersion 3
defSecurityLevel authNoPriv

------------
4. /etc/snmp/snmpd.conf
trapsess -e 0x8000000001020304 -u trapuser -A mypassword localhost
iquerySecName internelUser
rouser internelUser noauth
rwuser agentuser auth
linkUpDownNotifications yes
defaultMonitors yes

proc ssh 3

# We do not want annoying "Connection from UDP: " messages in syslog.
# If the following option is commented out, snmpd will print each incoming
# connection, which can be useful for debugging.

dontLogTCPWrappersConnects yes

------------
5. /etc/snmp/snmptrapd.conf
authUser log trapuser auth
authUser log informuser auth
------------

Then, I start the snmpd and snmptrapd and run 4 sshs
# ssh 193.168.10.1
# ssh 193.168.10.2
# ssh 193.168.10.3
# ssh 193.168.10.4

I could confirm that prErrorFlag was set to be 1 as the manual said 
using snmpwalk.
# snmpwalk -u agentuser -A mypassword localhost prTable
UCD-SNMP-MIB::prIndex.1 = INTEGER: 1
UCD-SNMP-MIB::prNames.1 = STRING: ssh
UCD-SNMP-MIB::prMin.1 = INTEGER: 0
UCD-SNMP-MIB::prMax.1 = INTEGER: 3
UCD-SNMP-MIB::prCount.1 = INTEGER: 4
UCD-SNMP-MIB::prErrorFlag.1 = INTEGER: error(1)
UCD-SNMP-MIB::prErrMessage.1 = STRING: Too many ssh running (# = 4)
UCD-SNMP-MIB::prErrFix.1 = INTEGER: noError(0)
UCD-SNMP-MIB::prErrFixCmd.1 = STRING:

Yet no trap log was output in /var/log/messages
# cat /var/log/messages | grep snmptrapd
Nov  7 17:58:58 localhost snmptrapd[24321]: Stopping snmptrapd
Nov  7 17:58:58 localhost snmptrapd[26969]: NET-SNMP version 5.5
Nov  7 18:00:34 localhost snmptrapd[26969]: 2013-11-07 18:00:34 NET-SNMP 
version 5.5 Stopped.
Nov  7 18:00:34 localhost snmptrapd[26969]: Stopping snmptrapd
Nov  7 18:00:34 localhost snmptrapd[27005]: NET-SNMP version 5.5
Nov  8 08:51:03 localhost snmptrapd[2237]: NET-SNMP version 5.5

And after waiting for 10 minutes or longer, there's still no 
notification logged although the man page says the default frequency is 
10 minutes.
**the snmptrap command could work correctly**

I was confused with it and did I miss anything?
How to config to make the agent to send notifications actively and the 
receiver can receive it properly?


Many thanks in advance!
Zhang Xiaohe

------------------------------------------------------------------------------
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most 
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to