How do we manually add SNMP traps to an existing server. I've tried using the SNMP Trap Wizard, but once it's done, all I end up with is a check that uses a host template called "xiwizard_snmptrap_service" and apparently the host template uses the command 'check_dummy' - I'm guessing 'check_dummy' is pretty much useless. Below is the command the template uses:
$USER1$/check_dummy $ARG1$ $ARG2$
- where
$ARG1$ = 0
$ARG2$ = "Trap host assumed to be UP"
Also, while going through the snmp trap wizard, on the 'Monitoring Settings' page, I see the message 'There are no monitoring options to configure with SNMP Traps. Click Next to continue.' So I continue which is when I end up with the 'check_dummy' command.
I've checked '/var/log/snmptt/snmptt.log' so I know I'm correctly translating the received SNMP traps, but it's not linking them to my monitored host. Below is a sample from 'snmptt.log' and 'snmptt.conf.'
-- Sample snmp message in snmptt.log:
Thu Jan 11 13:57:10 2018 .1.3.6.1.4.1.2312.13.1.1.0.1 Normal "Status Events" server1 - Defines an audit log event sent by ovirt-engine-notifier. 11933 USER_VDC_LOGIN 30 0 User admin@internal-authz logged in. 1 2018-01-11T13:56Z admin@internal-authz 5a2078e3-0346-0252-0258-0000000000b4
-- MIB from snmptt.conf
MIB: OVIRT-MIB (file:./OVIRT-MIB.txt) converted on Wed Jan 10 15:05:49 2018 using snmpttconvertmib v1.4beta2
#
#
#
EVENT ovirtEngineNotifierNotificationsAudit .1.3.6.1.4.1.2312.13.1.1.0.1 "Status Events" Normal
FORMAT Defines an audit log event sent by ovirt-engine-notifier. $*
# EXEC /usr/local/nagios/libexec/eventhandlers/submit_check_result $r TRAP 1 "Defines an audit log event sent by ovirt-engine-notifier. $*"
EXEC /usr/local/bin/snmptraphandling.py $r TRAP 1 "Defines an audit log event sent by ovirt-engine-notifier. $*"
SDESC
Defines an audit log event sent by ovirt-engine-notifier.
Variables:
1: ovirtEngineNotifierInstanceId
2: ovirtEngineNotifierName
3: ovirtEngineNotifierId
4: ovirtEngineNotifierSeverity
5: ovirtEngineNotifierMessage
6: ovirtEngineNotifierStatus
7: ovirtEngineNotifierDatetime
EDESC
Manually add SNMPT trap for host
-
npolovenko
- Support Tech
- Posts: 3457
- Joined: Mon May 15, 2017 5:00 pm
Re: Manually add SNMPT trap for host
Hello, @osk.dthompson. Have you checked out the "Unconfigured Objects" section in XI yet? It is located in the Admin menu/Monitoring config/Unconfigured Objects. If your XI is receiving traps but you can't see them in the web interface that would be the place to add new checks.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
-
osk.dthompson
- Posts: 16
- Joined: Tue Oct 18, 2016 2:58 pm
Re: Manually add SNMPT trap for host
Hello,
I have checked 'Unconfigured Objects' but nothing shows up in there.
I have checked 'Unconfigured Objects' but nothing shows up in there.
-
npolovenko
- Support Tech
- Posts: 3457
- Joined: Mon May 15, 2017 5:00 pm
Re: Manually add SNMPT trap for host
@osk.dthompson, Can you change the following line in your snmptt.conf file:
After that please run:
Let it run for a 5-10 minutes and post the /var/log/snmptt/snmptt.log, /var/log/snmptt/snmpttunknown.log and /usr/local/nagios/var/nagios.log log files.
Code: Select all
EXEC /usr/local/bin/snmptraphandling.py "$r" "SNMP Traps" "Defines an audit log event sent by ovirt-engine-notifier. $*"
SDESCCode: Select all
service snmptt restartAs of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
-
osk.dthompson
- Posts: 16
- Joined: Tue Oct 18, 2016 2:58 pm
Re: Manually add SNMPT trap for host
I did change the EXEC line as requested, then forced an event on the monitored host. Still not seeing any traps being associated to the host.
Just an FYI, the event I triggered was around 15:25.
I have attached the logs you requested.
Thank you,
Forgot to add the EXEC line:
EXEC /usr/local/bin/snmptraphandling.py "$r" "SNMP Traps" "Defines an audit log event sent by ovirt-engine-notifier. $*"
Just an FYI, the event I triggered was around 15:25.
I have attached the logs you requested.
Thank you,
Forgot to add the EXEC line:
EXEC /usr/local/bin/snmptraphandling.py "$r" "SNMP Traps" "Defines an audit log event sent by ovirt-engine-notifier. $*"
You do not have the required permissions to view the files attached to this post.
Re: Manually add SNMPT trap for host
The EXEC line looks like it is missing some options that are needed to send the trap information to Nagios.
Try using the following example in your /etc/snmp/snmptt.conf file for that OID.
After the change is done, you will have to restart the Trap Translator daemon by running.
Then, it you can generate a Trap from the device, it should either show up in the SNMP Traps service for that host or if it is a new Trap, it will be in the Admin > Unconfigured Objects menu so it can have it's final configuration setup.
You may want to look at the SNMP Trap Tutorial at the link below for how Nagios XI receives and processes Traps.
https://support.nagios.com/kb/article/n ... al-77.html
Try using the following example in your /etc/snmp/snmptt.conf file for that OID.
Code: Select all
EXEC /usr/local/bin/snmptraphandling.py "$r" "SNMP Traps" "$s" "$@" "$-*" "Defines an audit log event sent by ovirt-engine-notifier. $*"Code: Select all
service snmptt restartYou may want to look at the SNMP Trap Tutorial at the link below for how Nagios XI receives and processes Traps.
https://support.nagios.com/kb/article/n ... al-77.html
Be sure to check out our Knowledgebase for helpful articles and solutions!