Need help?

Our experts have had an average response time of 12.14 minutes in September 2021 to fix urgent issues.

We will keep your servers stable, secure, and fast at all times for one fixed price.

SNMP Trap v3 Configuration in Nagios – How to do

by | May 2, 2021

Wondering how to set up SNMP Trap v3 Configuration in Nagios? We can help you!

By default, the Nagios XI server will accept inbound SNMP v2 traps from any device. SNMP v3 traps will not be accepted by Nagios XI, unless the server is specifically configured for SNMP v3 traps.

The main difference between v2 and v3 traps is the authentication mechanisms.v2 is much simpler by design, whereas v3 has multiple layers of authentication to strengthen it.

Here at Bobcares, we handle requests from our customers using Nagios XI servers to configure SNMP Trap v3  as a part of Server Management Services.

Today, let us see how our Support techs do this for our customers.

Steps for SNMP Trap v3 Configuration in Nagios

Now we will see the steps that our Support Techs follow to configure trap V3 for our customers.

1. SNMP v3 traps require the following:
Engine ID

With Engine ID we can identify the device sending the SNMP trap (engineID).

Each and every device will have a unique engineID which is a hexadecimal number, for example 0x0102030405.

We can refer to our device SNMP settings to determine what the engineID is.

Username

Generally, this is a username that will help to authenticate the incoming trap. It is also known as the securityName.

Security Level

The security level determines if passphrase(s) are required:

noAuthNoPriv

The username does not require any passphrases

authNoPriv

The username requires an authentication passphrase

After gathering all the above requirements, we will be ready to configure snmptrapd to accept SNMP v3 traps.

2. Send Test Trap

To send a test trap, we can run the following command:

snmptrap -v <snmp_version> -e <engine_id> -u <security_username> -a <authentication_protocal> -A <authentication_protocal_pass_phrase> -x <privacy_protocol> -X <privacy_protocol_pass_phrase> <destination_host> <uptime> <OID_or_MIB> <object> <value_type> <value>

When the Nagios XI server receives this, it will be logged in the /var/log/snmptt/snmpttunknown.log file.

3. Default Configuration

The default SNMP Trap configuration is found in the /etc/snmp/snmptrapd.conf file. It contains the following two lines:

disableAuthorization yes
traphandle default /usr/sbin/snmptthandler

The disableAuthorization directive allows SNMP v2 traps from any device to be sent to Nagios XI.

For disabling this we can comment out the disableAuthorization directive by adding a # to the beginning of the line.

#disableAuthorization yes
traphandle default /usr/sbin/snmptthandler

Some other authorization methods:

Following are other methods that we can use for authorization:

Restrict To SNMP v3 User – noAuthNoPriv

Here we will allow SNMP v3 traps from the user called user_one for noAuthNoPriv.

Following are the changes that will be made to the configuration:

#disableAuthorization yes
createUser -e 0x0102030405 user_one
authUser log,execute user_one noauth
traphandle default /usr/sbin/snmptthandler

After making the change, we will need to restart the snmptrapd service and send a test trap to confirm the settings are correct.

Restrict To SNMP v3 User – authNoPriv

Here we will allow SNMP v3 traps from the user called user_two for authNoPriv.

Following are the changes that will be made to the configuration:

#disableAuthorization yes
createUser -e 0x0102030405 user_one
authUser log,execute user_one noauth
createUser -e 0x0203040506 user_two SHA "Auth3nticati0n PASSPHRAS3"
authUser log,execute user_two
traphandle default /usr/sbin/snmptthandler

Finally, restart the snmptrapd service.

Restrict To SNMP v3 User – authPriv

Here we will allow SNMP v3 traps from the user called user_three for authPriv.

Following are the changes that will be made to the configuration:

#disableAuthorization yes
createUser -e 0x0102030405 user_one
authUser log,execute user_one noauth
createUser -e 0x0203040506 user_two SHA "Auth3nticati0n PASSPHRAS3"
authUser log,execute user_two
createUser -e 0x0304050607 user_three SHA "Auth3nticati0n PASSPHRAS3" AES "3ncrypti0n PASSPHRAS3"
authUser log,execute user_three
traphandle default /usr/sbin/snmptthandler

Finally, after making the changes we must restart snmptrapd service.

4. Restart SNMPTRAPD Service

It is important that whenever we make a change to the /etc/snmp/snmptrapd.conf file, we must restart the snmptrapd service with the following command:

RHEL 7+|CentOS 7+|Debian|Ubuntu 16/18/20

systemctl restart snmptrapd.service

Conclusion

To conclude, we saw the steps that our Support Techs follow to configure SNMP Trap v3 on the Nagios XI server.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

var google_conversion_label = "owonCMyG5nEQ0aD71QM";

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Privacy Preference Center

Necessary

Necessary cookies help make a website usable by enabling basic functions like page navigation and access to secure areas of the website. The website cannot function properly without these cookies.

PHPSESSID - Preserves user session state across page requests.

gdpr[consent_types] - Used to store user consents.

gdpr[allowed_cookies] - Used to store user allowed cookies.

PHPSESSID, gdpr[consent_types], gdpr[allowed_cookies]
PHPSESSID
WHMCSpKDlPzh2chML

Statistics

Statistic cookies help website owners to understand how visitors interact with websites by collecting and reporting information anonymously.

_ga - Preserves user session state across page requests.

_gat - Used by Google Analytics to throttle request rate

_gid - Registers a unique ID that is used to generate statistical data on how you use the website.

smartlookCookie - Used to collect user device and location information of the site visitors to improve the websites User Experience.

_ga, _gat, _gid
_ga, _gat, _gid
smartlookCookie

Marketing

Marketing cookies are used to track visitors across websites. The intention is to display ads that are relevant and engaging for the individual user and thereby more valuable for publishers and third party advertisers.

IDE - Used by Google DoubleClick to register and report the website user's actions after viewing or clicking one of the advertiser's ads with the purpose of measuring the efficacy of an ad and to present targeted ads to the user.

test_cookie - Used to check if the user's browser supports cookies.

1P_JAR - Google cookie. These cookies are used to collect website statistics and track conversion rates.

NID - Registers a unique ID that identifies a returning user's device. The ID is used for serving ads that are most relevant to the user.

DV - Google ad personalisation

IDE, test_cookie, 1P_JAR, NID, DV, NID
IDE, test_cookie
1P_JAR, NID, DV
NID
hblid

Security

These are essential site cookies, used by the google reCAPTCHA. These cookies use an unique identifier to verify if a visitor is human or a bot.

SID, APISID, HSID, NID, PREF
SID, APISID, HSID, NID, PREF