19.4. Configuring the Red Hat Enterprise Virtualization Manager to Send SNMP Traps
Configure your Red Hat Enterprise Virtualization Manager to send Simple Network Management Protocol traps to one or more external SNMP managers. SNMP traps contain system event information; they are used to monitor your Red Hat Enterprise Virtualization environment. The number and type of traps sent to the SNMP manager can be defined within the Red Hat Enterprise Virtualization Manager.
This procedure assumes that you have configured one or more external SNMP managers to receive traps, and that you have the following details:
- The IP addresses or fully qualified domain names of machines that will act as SNMP managers. Optionally, determine the port through which the manager receives trap notifications; by default, this is UDP port 162.
- The SNMP community. Multiple SNMP managers can belong to a single community. Management systems and agents can communicate only if they are within the same community. The default community is
public. - The trap object identifier for alerts. The Red Hat Enterprise Virtualization Manager provides a default OID of 1.3.6.1.4.1.2312.13.1.1. All trap types are sent, appended with event information, to the SNMP manager when this OID is defined. Note that changing the default trap prevents generated traps from complying with the Manager's management information base.
Note
The Red Hat Enterprise Virtualization Manager provides management information bases at
/usr/share/doc/ovirt-engine/mibs/OVIRT-MIB.txt and /usr/share/doc/ovirt-engine/mibs/REDHAT-MIB.txt. Load the MIBs in your SNMP manager before proceeding.
Default SNMP configuration values exist on the Manager in the events notification daemon configuration file
/usr/share/ovirt-engine/services/ovirt-engine-notifier/ovirt-engine-notifier.conf. The values outlined in the following procedure are based on the default or example values provided in that file. It is recommended that you define an override file, rather than edit the ovirt-engine-notifier.conf file, to persist your configuration options across system changes, like upgrades.
Procedure 19.3. Configuring SNMP Traps on the Manager
- On the Manager, create the SNMP configuration file:
# touch /etc/ovirt-engine/notifier/notifier.conf.d/20-snmp.conf
- Specify the SNMP manager(s), the SNMP community, and the OID in the following format:
SNMP_MANAGERS="manager1.example.com manager2.example.com:162" SNMP_COMMUNITY=public SNMP_OID=1.3.6.1.4.1.2312.13.1.1
- Define which events to send to the SNMP manager:
FILTER="include:*(snmp:) ${FILTER}" FILTER="include:AUDIT_LOG_MSG(snmp:) ${FILTER}" FILTER="exclude:AUDIT_LOG_MSG include:*(snmp:) ${FILTER}" FILTER="exclude:*"The first line in the example above sends all alerts to the default SNMP profile. The second line sends alerts for AUDIT_LOG_MSG to the default SNMP profile. The third line sends alerts for everything but AUDIT_LOG_MSG to the default SNMP profile. The fourth line is the default filter defined inovirt-engine-notifier.conf; if you do not disable this filter or apply overriding filters, no notifications will be sent. A full list of audit log messages is available in/usr/share/doc/ovirt-engine/AuditLogMessages.properties. Alternatively, filter results within your SNMP manager. - Save the file.
- Start the
ovirt-engine-notifierservice, and ensure that this service starts on boot:# service ovirt-engine-notifier start # chkconfig ovirt-engine-notifier on
Check your SNMP manager to ensure that traps are being received.
Note
SNMP_MANAGERS, MAIL_SERVER, or both must be properly defined in ovirt-engine-notifier.conf or in an override file in order for the notifier service to run.