Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Hello. I have a system CentOS 6.5. I need receive and write in snmptrap.log snmptrap v3 or snmpinform v3. At the same time I need receive snmptrap v1.
I created user for snmp v3:
OK so let's start from the beginning, what exactly are you attempting to achieve? The ability to recieve snmptraps of both v1 and v3? Is that all, I ask because you are doing snmp walks and creating snmpd users, which are not needed for traps as far as I know.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
sreinhardt wrote:OK so let's start from the beginning, what exactly are you attempting to achieve? The ability to recieve snmptraps of both v1 and v3? Is that all, I ask because you are doing snmp walks and creating snmpd users, which are not needed for traps as far as I know.
I need ro receive traps from eqipment. Now I adjust nagios 3.5.1. I first want to try snmptrap v1, and then go on a snmptrap v3.
So far as i know, to receive snmptrap v3, i need create user snmp v3 on nagios server and on equipment. I done it and snmpwalk v3 completed successfully. But when snmptrap v3 come from equipment, i dont see them. I dont know, what setting need make in snmptrapd.conf to receive traps and write their in /etc/snmp/snmptrap.log
No worries on the english, you sound just fine. That clears things up quite a bit on what you are looking to do. Presently do you have snmpv1 traps coming in and working properly or are we still having issues there?
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
sreinhardt wrote:No worries on the english, you sound just fine. That clears things up quite a bit on what you are looking to do. Presently do you have snmpv1 traps coming in and working properly or are we still having issues there?
SNMP v1 is working. I can see snmptrap v1, which come from equipment. Now i need receive snmptrap v3, but i can't configure it.
OK, let me do some digging and testing. This isn't something we run into too often.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
[root@localhost snmptt]# cat /etc/snmp/snmptrapd.conf
# Example configuration file for snmptrapd
#
# No traps are handled by default, you must edit this file!
#
# authCommunity log,execute,net public
# traphandle SNMPv2-MIB::coldStart /usr/bin/bin/my_great_script cold
logoption f /var/log/snmptrap.log
createUser public SHA "password" AES "password"
authUser log,execute,net public
traphandle default /usr/sbin/snmptthandler
authcommunity log,execute,net public
disableAuthorization no
nano /var/log/snmptt/snmptt.debug
Raw trap passed from snmptrapd:
1393902873
<UNKNOWN>
UDP: [192.168.0.2]:1027->[192.168.0.1]
.1.3.6.1.2.1.1.3.0 0:20:38:55.08
.1.3.6.1.6.3.1.1.4.1.0 .1.3.6.1.4.1.2.6.158.5.30
.1.3.6.1.4.1.2.6.158.5.1.1 "03:11:06 03/04/2014"
.1.3.6.1.4.1.2.6.158.5.1.3 "backupsvr"
.1.3.6.1.4.1.2.6.158.5.1.5 "5F1353EEBB9130FDB4BD1C7E98EA4B47"
.1.3.6.1.4.1.2.6.158.5.1.6 "KD43DZY"
.1.3.6.1.4.1.2.6.158.5.1.8 4
.1.3.6.1.4.1.2.6.158.5.1.9 "Remote Login Successful. Login ID: user from Web $
.1.3.6.1.4.1.2.6.158.5.1.10 14
.1.3.6.1.4.1.2.6.158.5.1.11 "IMM"
.1.3.6.1.4.1.2.6.158.5.1.12 "Andrey"
.1.3.6.1.4.1.2.6.158.5.1.13 "COD"
Items passed from snmptrapd:
value 0: 192.168.0.2
value 1: 192.168.0.2
value 2: .1.3.6.1.2.1.1.3.0
value 3: 0:20:38:55.08
value 4: .1.3.6.1.6.3.1.1.4.1.0
value 5: .1.3.6.1.4.1.2.6.158.5.30
value 6: .1.3.6.1.4.1.2.6.158.5.1.1
value 7: 03:11:06 03/04/2014
value 8: .1.3.6.1.4.1.2.6.158.5.1.3
value 9: backupsvr
value 10: .1.3.6.1.4.1.2.6.158.5.1.5
value 11: 5F1353EEBB9130FDB4BD1C7E98EA4B47
value 12: .1.3.6.1.4.1.2.6.158.5.1.6
value 13: KD43DZY
value 14: .1.3.6.1.4.1.2.6.158.5.1.8
value 15: 4
value 16: .1.3.6.1.4.1.2.6.158.5.1.9
value 17: Remote Login Successful. Login ID: user from Web at IP address 192.168.0.1
value 18: .1.3.6.1.4.1.2.6.158.5.1.10
value 19: 14
value 20: .1.3.6.1.4.1.2.6.158.5.1.11
value 21: IMM
value 21: IMM
value 22: .1.3.6.1.4.1.2.6.158.5.1.12
value 23: Andrey
value 24: .1.3.6.1.4.1.2.6.158.5.1.13
value 25: COD
Agent IP address was blank, so setting to the same as the host IP address of 192.168.0.2
Agent IP address (192.168.0.2) is the same as the host IP, so copying the host name: 192.168.0.2
Trap received from 192.168.0.2: .1.3.6.1.4.1.2.6.158.5.30
0: hostname
1: ip address
2: uptime
3: trapname / OID
4: ip address from trap agent
5: trap community string
6: enterprise
7: securityEngineID (snmptthandler-embedded required)
8: securityName (snmptthandler-embedded required)
9: contextEngineID (snmptthandler-embedded required)
10: contextName (snmptthandler-embedded required)
0+: passed variables
Value 0: 192.168.0.2
Value 1: 192.168.0.2
Value 2: 0:20:38:55.08
Value 3: .1.3.6.1.4.1.2.6.158.5.30
Value 4: 192.168.0.2
Value 5:
Value 6:
Value 7:
Value 8:
Value 9:
Value 10:
Agent dns name: 192.168.0.2
Ent Value 0 ($1): .1.3.6.1.4.1.2.6.158.5.1.1=03:11:06 03/04/2014
Ent Value 1 ($2): .1.3.6.1.4.1.2.6.158.5.1.3=backupsvr
Ent Value 2 ($3): .1.3.6.1.4.1.2.6.158.5.1.5=5F1353EEBB9130FDB4BD1C7E98EA4B47
Ent Value 3 ($4): .1.3.6.1.4.1.2.6.158.5.1.6=KD43DZY
Ent Value 4 ($5): .1.3.6.1.4.1.2.6.158.5.1.8=4
Ent Value 5 ($6): .1.3.6.1.4.1.2.6.158.5.1.9=Remote Login Successful. Login ID:$
Ent Value 6 ($7): .1.3.6.1.4.1.2.6.158.5.1.10=14
Ent Value 7 ($8): .1.3.6.1.4.1.2.6.158.5.1.11=IMM
Ent Value 8 ($9): .1.3.6.1.4.1.2.6.158.5.1.12=Andrey
Ent Value 9 ($10): .1.3.6.1.4.1.2.6.158.5.1.13=COD
Exact match of trap NOT found in EVENT hash table
Looking for wildcards in the EVENT hash table
Drilling down looking for wildcards in the EVENT hash table
.1.3.6.1.4.1.2.6.158.5.*
Drilling down looking for wildcards in the EVENT hash table
.1.3.6.1.4.1.2.6.158.*
Drilling down looking for wildcards in the EVENT hash table
.1.3.6.1.4.1.2.6.*
Drilling down looking for wildcards in the EVENT hash table
.1.3.6.1.4.1.2.*
Drilling down looking for wildcards in the EVENT hash table
.1.3.6.1.4.1.*
Drilling down looking for wildcards in the EVENT hash table
.1.3.6.1.4.*
Drilling down looking for wildcards in the EVENT hash table
.1.3.6.1.*
Drilling down looking for wildcards in the EVENT hash table
.1.3.6.*
Drilling down looking for wildcards in the EVENT hash table
.1.3.*
Drilling down looking for wildcards in the EVENT hash table
.1.*
Drilling down looking for wildcards in the EVENT hash table
.*
Trap not defined...
Sleeping for 5 seconds
Sleeping for 5 seconds
SNMPTT v1.4 shutdown: Tue Mar 4 11:14:43 2014
Total traps received: 1
Total traps translated: 0
Total traps ignored: 0
Total unknown traps: 1
Help, please. I have MIB for this equipment. snmptrap v1 was working with this MIB.
v1, v2, and v3 are generally completely separate oids and mibs. Could you provide the mib you think should work with this please?
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.