omsnmp: SNMP Trap Output Module#
Module Name: |
omsnmp |
Author: |
Andre Lorbach <alorbach@adiscon.com> |
Purpose#
Provides the ability to send syslog messages as an SNMPv1 & v2c traps. By default, SNMPv2c is preferred. The syslog message is wrapped into a OCTED STRING variable. This module uses the NET-SNMP library. In order to compile this module, you will need to have the NET-SNMP developer (headers) package installed.
Configuration Parameters#
Note
Parameter names are case-insensitive; camelCase is recommended for readability.
Module Parameters#
Parameter |
Summary |
|---|---|
Defines the SNMP target host by hostname or IP address. |
|
Specifies the port used for sending SNMP traps. |
|
Selects the transport protocol for SNMP communication. |
|
Chooses whether SNMPv1 or SNMPv2c traps are sent. |
|
Sets the SNMP community string. |
|
Defines the notification OID used for SNMPv2 traps. |
|
Specifies the OID for the message variable carrying the syslog text. |
|
Specifies the enterprise OID used in SNMPv1 traps. |
|
Defines the SNMPv1 specific trap number. |
|
Overrides the SNMPv1 trap source address via template. |
|
Selects the SNMPv1 generic trap type. |
Caveats/Known Bugs#
In order to decode the custom OIDs, you will need to have the adiscon mibs installed.
Examples#
Sending messages as snmp traps#
The following commands send every message as a snmp trap.
module(load="omsnmp")
action(type="omsnmp" server="localhost" port="162" transport="udp"
version="1" community="public")
Support: rsyslog Assistant | GitHub Discussions | GitHub Issues: rsyslog source project
Contributing: Source & docs: rsyslog source project
© 2008–2026 Rainer Gerhards and others. Licensed under the Apache License 2.0.