This article outlines how you would setup the trapmon sampler when SNMP version 3 traps are to be received. These instructions assume that the traps are to be collected on a RHEL based system.
Prequisites:
- A net-snmp installation - this will be used for creating the snmp configuration file.
# yum install -y net-snmp
Creating the configuration file:
When creating the configuration file you will need to supply a username, an authentication passphrase, an encryption passphrase, and you will need the engineID of the device sending the traps.
Creating the SNMP user.
Run the net-snmp-create-v3-user utility which will add a createUser line in the file /var/lib/net-snmp/snmpd.conf
e.g. For a read-only snmp user.
# net-snmp-create-v3-user -ro -a SHA -A authpassword -x AES -X encpassword snmpV3userWith the above input you should see the following message:
adding the following line to /var/lib/net-snmp/snmpd.conf:
createUser snmpV3user SHA "authpassword " AES "encpassword "
adding the following line to /etc/snmp/snmpd.conf:
rouser snmpV3user
This will have added the following line to /var/lib/net-snmp/snmpd.conf
createUser snmpV3user SHA authpassword AES encpassword
Adding the EngineID.
You now need to get the EngineID of the device sending the snmp traps and add this in /var/lib/net-snmp/snmpd.conf
How the engineID is determined will depend entirely on the particulars of the device.
Modify the createUser line in /var/lib/net-snmp/snmpd.conf.
You need to add the engineID to this line so it will now look like the example below where 80001f888015e0c94ccade7a65000000 is the hex engine id.
createUser -e 0x80001f888015e0c94ccade7a65000000 snmpV3user SHA authpassword AES encpassword
Convert the config file entry to the correct format.
Start and stop the snmpd service to convert the createUser entry to a usmUser entry.
# systemctl start snmpd
# systemctl stop snmpd
You should now have a line similar to that shown below in /var/lib/net-snmp/snmpd.conf
usmUser 1 3 0x80001f888015e0c94ccade7a65000000 "snmpV3user" "snmpV3user" NULL .1.3.6.1.6.3.10.1.1.3 0xb
8711c0e3c6b09d837b7d7438243bcf33fbd65f5 .1.3.6.1.6.3.10.1.2.4 0x05417c575eca0d5162dde2906abd316d ""Configure the sampler:
To enable the trapmon sample to use snmp version 3 traps you must add add a configuration file entry in the Advanced tab in the GSE.
If you copy the /var/lib/net-snmp/snmpd.conf file to the netprobe directory you can specify it without a path, as shown below, otherwise you will need to specify an absolute path.
Example SNMP Trap command to generate a trap
snmptrap -v 3 -e 80001f888015e0c94ccade7a6500000 -u snmpV3user -a SHA -A <authenticatedpassword> -x AES -X <encryptedpassword> 172.16.1.31:7007 '' 1.3.6.1.2.1.2.18.2.0.1 Note from above command 172.16.1.31 is the netprobe host – 7007 is the snmp port
Example dataview
If you need further help:
- Please contact our support team via the chat service box on any of our websites or raise a support request.
- Make sure you provide us with:
- Background of the issue or request.
- Use cases, requirements, business impact, etc.
- Encountered error messages.
- Log files or diagnostic files.
- Screenshots.
- And other important information relevant to your inquiry.
Comments
0 comments
Please sign in to leave a comment.