Manually add SNMPT trap for host
Posted: Thu Jan 11, 2018 3:15 pm
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
$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