mooli tayer has uploaded a new change for review.
Change subject: notifier: modify the oid schema for SNMP notification.
......................................................................
notifier: modify the oid schema for SNMP notification.
MIB syntax tested using:
$ smilint -p packaging/doc/mibs/REDHAT-MIB.txt -l 6 \
packaging/doc/mibs/OVIRT-MIB.txt
Change-Id: Ic8a06063f8ebbbe4d05783cb25036e870a6be3b7
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1136818
Signed-off-by: Mooli Tayer <[email protected]>
---
M Makefile
M
backend/manager/tools/src/main/java/org/ovirt/engine/core/notifier/transport/snmp/Snmp.java
M ovirt-engine.spec.in
A packaging/doc/mibs/OVIRT-MIB.txt
A packaging/doc/mibs/REDHAT-MIB.txt
M packaging/services/ovirt-engine-notifier/ovirt-engine-notifier.conf.in
6 files changed, 429 insertions(+), 62 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/45/33745/1
diff --git a/Makefile b/Makefile
index f65f05b..98e8159 100644
--- a/Makefile
+++ b/Makefile
@@ -419,6 +419,7 @@
for d in bin branding conf files firewalld services setup; do \
$(MAKE) copy-recursive SOURCEDIR="packaging/$${d}"
TARGETDIR="$(DESTDIR)$(DATA_DIR)/$${d}" EXCLUDE_GEN="$(GENERATED)"; \
done
+ $(MAKE) copy-recursive SOURCEDIR=packaging/doc
TARGETDIR="$(DESTDIR)$(PKG_DOC_DIR)" EXCLUDE_GEN="$(GENERATED)"
$(MAKE) copy-recursive SOURCEDIR=packaging/man
TARGETDIR="$(DESTDIR)$(MAN_DIR)" EXCLUDE_GEN="$(GENERATED)"
$(MAKE) copy-recursive SOURCEDIR=packaging/pythonlib
TARGETDIR="$(DESTDIR)$(PYTHON_DIR)" EXCLUDE_GEN="$(GENERATED)"
diff --git
a/backend/manager/tools/src/main/java/org/ovirt/engine/core/notifier/transport/snmp/Snmp.java
b/backend/manager/tools/src/main/java/org/ovirt/engine/core/notifier/transport/snmp/Snmp.java
index 1001173..af3100c 100644
---
a/backend/manager/tools/src/main/java/org/ovirt/engine/core/notifier/transport/snmp/Snmp.java
+++
b/backend/manager/tools/src/main/java/org/ovirt/engine/core/notifier/transport/snmp/Snmp.java
@@ -2,6 +2,7 @@
import java.io.IOException;
import java.net.InetAddress;
+import java.text.SimpleDateFormat;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
@@ -13,6 +14,7 @@
import org.apache.log4j.Logger;
import org.ovirt.engine.core.common.AuditLogType;
import org.ovirt.engine.core.common.EventNotificationMethod;
+import org.ovirt.engine.core.compat.Guid;
import org.ovirt.engine.core.notifier.NotificationServiceException;
import org.ovirt.engine.core.notifier.dao.DispatchResult;
import org.ovirt.engine.core.notifier.filter.AuditLogEvent;
@@ -20,7 +22,9 @@
import org.ovirt.engine.core.notifier.utils.NotificationProperties;
import org.snmp4j.CommunityTarget;
import org.snmp4j.PDU;
+import org.snmp4j.Target;
import org.snmp4j.mp.SnmpConstants;
+import org.snmp4j.smi.Integer32;
import org.snmp4j.smi.OID;
import org.snmp4j.smi.OctetString;
import org.snmp4j.smi.TimeTicks;
@@ -38,7 +42,35 @@
private static final int ENTERPRISE_SPECIFIC = 6;
private static final Pattern PROFILE_PATTERN =
Pattern.compile(SNMP_MANAGERS + "(|_(?<profile>.*))");
+ /** OIDs - See OVIRT-MIB.txt */
+ public static final int AUDIT = 1;
+
+ private static final OID OBJECTS_AUDIT = new OID(new int[] {2, 1});
+
+ public static final int INSTANCE_ID = 1;
+ public static final int NAME = 2;
+ public static final int ID = 3;
+ public static final int SEVERITY = 4;
+ public static final int MESSAGE = 5;
+ public static final int STATUS = 6;
+ public static final int DATETIME = 7;
+ public static final int USERNAME = 100;
+ public static final int USER_ID = 101;
+ public static final int VM_NAME = 102;
+ public static final int VM_ID = 103;
+ public static final int VDS_NAME = 104;
+ public static final int VDS_ID = 105;
+ public static final int VM_TEMPLATE_NAME = 106;
+ public static final int VM_TEMPLATE_ID = 107;
+ public static final int STORAGE_POOL_NAME = 108;
+ public static final int STORAGE_POOL_ID = 109;
+ public static final int STORAGE_DOMAIN_NAME = 110;
+ public static final int STORAGE_DOMAIN_ID = 111;
+
+
private final Map<String, Profile> profiles = new HashMap<>();
+
+ private static final String ISO8601 = "yyyy-MM-dd'T'HH:mm'Z'";
private org.snmp4j.Snmp snmp = null;
private boolean active = false;
private static long nanoStart = System.nanoTime();
@@ -97,66 +129,10 @@
// PDU class is for SNMPv2c units
PDU v2pdu = new PDU();
v2pdu.setType(PDU.TRAP);
- int auditLogTypeVal = AuditLogType.UNASSIGNED.getValue();
- try {
- // TODO mtayer: what about db? add to audit log type
- auditLogTypeVal = AuditLogType.valueOf(event.getName()).getValue();
- } catch (IllegalArgumentException e) {
- log.warn("Could not find event: " + event.getName() + " in
auditLogTypes");
- }
- OID trapOID = SnmpConstants.getTrapOID(profile.oid,
ENTERPRISE_SPECIFIC, auditLogTypeVal);
- v2pdu.add(new VariableBinding(SnmpConstants.snmpTrapOID, trapOID));
- v2pdu.add(new VariableBinding(SnmpConstants.sysUpTime,
- new TimeTicks((System.nanoTime() -
nanoStart) / 10000000)));
- v2pdu.add(new VariableBinding(
- new OID(trapOID).append(0),
- new OctetString(event.getMessage())));
- v2pdu.add(new VariableBinding(
- new OID(trapOID).append(1),
- new OctetString(event.getSeverity().name())));
- v2pdu.add(new VariableBinding(
- new OID(trapOID).append(2),
- new OctetString(event.getType().name())));
- v2pdu.add(new VariableBinding(
- new OID(trapOID).append(3),
- new OctetString(event.getLogTime().toString())));
- v2pdu.add(new VariableBinding(
- new OID(trapOID).append(4),
- new OctetString(event.getLogTypeName())));
- if (!StringUtils.isEmpty(event.getUserName())) {
- v2pdu.add(new VariableBinding(
- new OID(trapOID).append(5),
- new OctetString(event.getUserName())));
- }
- if (!StringUtils.isEmpty(event.getVmName())) {
- v2pdu.add(new VariableBinding(
- new OID(trapOID).append(6),
- new OctetString(event.getVmName())));
- }
- if (!StringUtils.isEmpty(event.getVdsName())) {
- v2pdu.add(new VariableBinding(
- new OID(trapOID).append(7),
- new OctetString(event.getVdsName())));
- }
- if (!StringUtils.isEmpty(event.getVmTemplateName())) {
- v2pdu.add(new VariableBinding(
- new OID(trapOID).append(8),
- new OctetString(event.getVmTemplateName())));
- }
- if (!StringUtils.isEmpty(event.getStoragePoolName())) {
- v2pdu.add(new VariableBinding(
- new OID(trapOID).append(9),
- new OctetString(event.getStoragePoolName())));
- }
- if (!StringUtils.isEmpty(event.getStorageDomainName())) {
- v2pdu.add(new VariableBinding(
- new OID(trapOID).append(10),
- new OctetString(event.getStorageDomainName())));
- }
- CommunityTarget target = new CommunityTarget();
- target.setCommunity(profile.community);
- target.setVersion(SnmpConstants.version2c);
+ addPayload(v2pdu, event, profile);
+
+ Target target = createTarget(profile);
for (Host host : profile.hosts) {
try {
log.info(String.format("Generate an snmp trap for event: %s to
address: %s ",
@@ -176,6 +152,73 @@
}
}
+ private CommunityTarget createTarget(Profile profile) {
+ CommunityTarget target = new CommunityTarget();
+ target.setCommunity(profile.community);
+ target.setVersion(SnmpConstants.version2c);
+ return target;
+ }
+
+ private void addPayload(PDU v2pdu, AuditLogEvent event, Profile profile) {
+
+ v2pdu.add(new VariableBinding(SnmpConstants.sysUpTime,
+ new TimeTicks((System.nanoTime() -
nanoStart) / 10000000)));
+ // { [baseoid] notifications(0) audit(1) }
+ v2pdu.add(new VariableBinding(SnmpConstants.snmpTrapOID,
+ SnmpConstants.getTrapOID(new
OID(profile.oid),
+
ENTERPRISE_SPECIFIC,
+ AUDIT)));
+
+ int auditLogId = AuditLogType.UNASSIGNED.getValue();
+ try {
+ auditLogId = AuditLogType.valueOf(event.getName()).getValue();
+ } catch (IllegalArgumentException e) {
+ log.warn("Could not find event: " + event.getName() + " in
auditLogTypes");
+ }
+ // { [baseoid] objects(2) audit(1) }
+ OID auditObjects = new OID(profile.oid).append(OBJECTS_AUDIT);
+
+ addInt(v2pdu, auditObjects, INSTANCE_ID, auditLogId, true);
+ addString(v2pdu, auditObjects, NAME, event.getName(), true);
+ addInt(v2pdu, auditObjects, ID, auditLogId, true);
+ addInt(v2pdu, auditObjects, SEVERITY, event.getSeverity().getValue(),
true);
+ addString(v2pdu, auditObjects, MESSAGE, event.getMessage(), true);
+ addInt(v2pdu, auditObjects, STATUS, event.getType().getValue(), true);
+ addString(v2pdu, auditObjects, DATETIME, new
SimpleDateFormat(ISO8601).format(event.getLogTime()), true);
+
+ // Optional pdu:
+ addString(v2pdu, auditObjects, USERNAME, event.getUserName(), false);
+ addUuid(v2pdu, auditObjects, USER_ID, event.getUserId());
+ addString(v2pdu, auditObjects, VM_NAME, event.getVmName(), false);
+ addUuid(v2pdu, auditObjects, VM_ID, event.getVmId());
+ addString(v2pdu, auditObjects, VDS_NAME, event.getVdsName(), false);
+ addUuid(v2pdu, auditObjects, VDS_ID, event.getVdsId());
+ addString(v2pdu, auditObjects, VM_TEMPLATE_NAME,
event.getVmTemplateName(), false);
+ addUuid(v2pdu, auditObjects, VM_TEMPLATE_ID, event.getVmTemplateId());
+ addString(v2pdu, auditObjects, STORAGE_POOL_NAME,
event.getStoragePoolName(), false);
+ addUuid(v2pdu, auditObjects, STORAGE_POOL_ID,
event.getStoragePoolId());
+ addString(v2pdu, auditObjects, STORAGE_DOMAIN_NAME,
event.getStorageDomainName(), false);
+ addUuid(v2pdu, auditObjects, STORAGE_DOMAIN_ID,
event.getStorageDomainId());
+ }
+
+ private void addString(PDU v2pdu, OID prefix, int suffix, String val,
boolean allowEmpty) {
+ if (allowEmpty || !StringUtils.isEmpty(val)) {
+ v2pdu.add(new VariableBinding(new OID(prefix).append(suffix), new
OctetString(val == null ? "" : val)));
+ }
+ }
+
+ private void addInt(PDU v2pdu, OID prefix, int suffix, Integer val,
boolean allowEmpty) {
+ if (allowEmpty || val != null) {
+ v2pdu.add(new VariableBinding(new OID(prefix).append(suffix), new
Integer32(val == null ? 0 : val)));
+ }
+ }
+
+ private void addUuid(PDU v2pdu, final OID prefix, int suffix, Guid val) {
+ if (!Guid.isNullOrEmpty(val)) {
+ addString(v2pdu, prefix, suffix, val.toString(), false);
+ }
+ }
+
static class Host {
public String name;
public int port = 162;
diff --git a/ovirt-engine.spec.in b/ovirt-engine.spec.in
index 2cb5d93..6312cb3 100644
--- a/ovirt-engine.spec.in
+++ b/ovirt-engine.spec.in
@@ -896,6 +896,7 @@
%{engine_data}/conf/sysprep/
%{engine_data}/files/
%{engine_doc}/AuditLogMessages.properties
+%{engine_doc}/mibs/
%{engine_ear}/META-INF
%{engine_ear}/bll.jar
%{engine_ear}/docs.war/
diff --git a/packaging/doc/mibs/OVIRT-MIB.txt b/packaging/doc/mibs/OVIRT-MIB.txt
new file mode 100644
index 0000000..f398741
--- /dev/null
+++ b/packaging/doc/mibs/OVIRT-MIB.txt
@@ -0,0 +1,289 @@
+
+--
+-- Copyright 2014 Red Hat Inc.
+--
+-- Licensed under the Apache License, Version 2.0 (the "License");
+-- you may not use this file except in compliance with the License.
+-- You may obtain a copy of the License at
+--
+-- http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
+
+OVIRT-MIB DEFINITIONS ::= BEGIN
+
+IMPORTS
+ Integer32,
+ MODULE-IDENTITY,
+ NOTIFICATION-TYPE,
+ OBJECT-TYPE FROM SNMPv2-SMI
+ NOTIFICATION-GROUP,
+ MODULE-COMPLIANCE,
+ OBJECT-GROUP FROM SNMPv2-CONF
+ redhat FROM REDHAT-MIB
+;
+
+ovirt MODULE-IDENTITY
+ LAST-UPDATED "201409140000Z"
+ ORGANIZATION "www.ovirt.org"
+ CONTACT-INFO "TBD"
+ DESCRIPTION "TBD"
+ REVISION "201409140000Z"
+ DESCRIPTION
+ "First draft"
+ ::= { redhat 13}
+
+--
+-- top level structure
+--
+ovirtEngine OBJECT IDENTIFIER ::= { ovirt 1 }
+ovirtEngineNotifier OBJECT IDENTIFIER ::= { ovirtEngine 1 }
+
+ovirtEngineNotifierNotifications OBJECT IDENTIFIER ::= {
ovirtEngineNotifier 0 }
+
+ovirtEngineNotifierObjects OBJECT IDENTIFIER ::= {
ovirtEngineNotifier 2 }
+ovirtEngineNotifierObjectsAudit OBJECT IDENTIFIER ::= {
ovirtEngineNotifierObjects 1 }
+
+ovirtEngineNotifierGroups OBJECT IDENTIFIER ::= {
ovirtEngineNotifier 3 }
+
+ovirtEngineNotifierCompliances OBJECT IDENTIFIER ::= {
ovirtEngineNotifier 4 }
+
+--
+-- Compliance
+--
+
+ovirtEngineNotifierCompliance MODULE-COMPLIANCE
+ STATUS current
+ DESCRIPTION
+ "MANDATORY-GROUPS must be implemented to comply with this module."
+ MODULE -- this module
+ MANDATORY-GROUPS { ovirtEngineNotificationsGroup,
ovirtEngineObjectAuditGroup }
+ ::= { ovirtEngineNotifierCompliances 2 }
+
+--
+-- Trap definition
+--
+
+ovirtEngineNotificationsGroup NOTIFICATION-GROUP
+ NOTIFICATIONS { ovirtEngineNotifierNotificationsAudit }
+ STATUS current
+ DESCRIPTION "notifications defined in SMIv2 modules are required to be
listed in a group"
+::= { ovirtEngineNotifierGroups 1 }
+
+ovirtEngineNotifierNotificationsAudit NOTIFICATION-TYPE
+ OBJECTS {
+ ovirtEngineNotifierInstanceId,
+ ovirtEngineNotifierName,
+ ovirtEngineNotifierId,
+ ovirtEngineNotifierSeverity,
+ ovirtEngineNotifierMessage,
+ ovirtEngineNotifierStatus,
+ ovirtEngineNotifierDatetime
+ }
+ STATUS current
+ DESCRIPTION
+ "Defines an audit log event sent by ovirt-engine-notifier."
+::= { ovirtEngineNotifierNotifications 1 }
+
+--
+-- Objects
+--
+ovirtEngineObjectAuditGroup OBJECT-GROUP
+ OBJECTS {
+ ovirtEngineNotifierInstanceId,
+ ovirtEngineNotifierName,
+ ovirtEngineNotifierId,
+ ovirtEngineNotifierSeverity,
+ ovirtEngineNotifierMessage,
+ ovirtEngineNotifierStatus,
+ ovirtEngineNotifierDatetime,
+ ovirtEngineNotifierUsername,
+ ovirtEngineNotifierUserId,
+ ovirtEngineNotifierVmName,
+ ovirtEngineNotifierVmId,
+ ovirtEngineNotifierHostName,
+ ovirtEngineNotifierHostId,
+ ovirtEngineNotifierTemplateName,
+ ovirtEngineNotifierTemplateId,
+ ovirtEngineNotifierStoragePoolName,
+ ovirtEngineNotifierStoragePoolId,
+ ovirtEngineNotifierStorageDomainName,
+ ovirtEngineNotifierStorageDomainId
+ }
+ STATUS current
+ DESCRIPTION "A group for all mandatory and optional objects sent in
+ ovirtEngineNotifierNotificationsAudit notifications.
+ defined since every defined in an SMIv2 module is required
to be
+ listed in at least one group in order to be conformant "
+::= { ovirtEngineNotifierGroups 2 }
+
+ovirtEngineNotifierInstanceId OBJECT-TYPE
+ SYNTAX Integer32
+ MAX-ACCESS accessible-for-notify
+ STATUS current
+ DESCRIPTION
+ "The id of the audit event at ovirt-engine, e,g 83."
+::= { ovirtEngineNotifierObjectsAudit 1 }
+
+
+ovirtEngineNotifierName OBJECT-TYPE
+ SYNTAX OCTET STRING
+ MAX-ACCESS accessible-for-notify
+ STATUS current
+ DESCRIPTION
+ "The name of the audit event type, e,g VDC_STOP.
+ See AuditLogMessages.properties."
+::= { ovirtEngineNotifierObjectsAudit 2 }
+
+ovirtEngineNotifierId OBJECT-TYPE
+ SYNTAX Integer32
+ MAX-ACCESS accessible-for-notify
+ STATUS current
+ DESCRIPTION
+ "The id of the audit event type, e,g 2 (2 is the id of VDC_STOP)."
+::= { ovirtEngineNotifierObjectsAudit 3 }
+
+ovirtEngineNotifierSeverity OBJECT-TYPE
+ SYNTAX INTEGER {
+ normal (0),
+ warning (1),
+ error (2),
+ alert (10)
+ }
+ MAX-ACCESS accessible-for-notify
+ STATUS current
+ DESCRIPTION
+ "The severity of the audit event."
+::= { ovirtEngineNotifierObjectsAudit 4 }
+
+ovirtEngineNotifierMessage OBJECT-TYPE
+ SYNTAX OCTET STRING
+ MAX-ACCESS accessible-for-notify
+ STATUS current
+ DESCRIPTION
+ "The text message associated with the audit event."
+::= { ovirtEngineNotifierObjectsAudit 5 }
+
+ovirtEngineNotifierStatus OBJECT-TYPE
+ SYNTAX INTEGER {
+ resolveMessage (0),
+ alertMessage (1)
+ }
+ MAX-ACCESS accessible-for-notify
+ STATUS current
+ DESCRIPTION
+ "The lifecycle status of this audit log event."
+::= { ovirtEngineNotifierObjectsAudit 6 }
+
+ovirtEngineNotifierDatetime OBJECT-TYPE
+ SYNTAX OCTET STRING
+ MAX-ACCESS accessible-for-notify
+ STATUS current
+ DESCRIPTION
+ "The Datetime of the audit event occurred as ISO 8601
(yyyy-MM-dd'T'HH:mm'Z')."
+::= { ovirtEngineNotifierObjectsAudit 7 }
+
+-- optional pdu:
+
+ovirtEngineNotifierUsername OBJECT-TYPE
+ SYNTAX OCTET STRING
+ MAX-ACCESS accessible-for-notify
+ STATUS current
+ DESCRIPTION
+ "The Username associated with the audit event(optional)."
+::= { ovirtEngineNotifierObjectsAudit 100 }
+
+ovirtEngineNotifierUserId OBJECT-TYPE
+ SYNTAX OCTET STRING
+ MAX-ACCESS accessible-for-notify
+ STATUS current
+ DESCRIPTION
+ "The uuid associated with the audit event(optional)."
+::= { ovirtEngineNotifierObjectsAudit 101 }
+
+ovirtEngineNotifierVmName OBJECT-TYPE
+ SYNTAX OCTET STRING
+ MAX-ACCESS accessible-for-notify
+ STATUS current
+ DESCRIPTION
+ "The name of the vm associated with the audit event(optional)."
+::= { ovirtEngineNotifierObjectsAudit 102 }
+
+ovirtEngineNotifierVmId OBJECT-TYPE
+ SYNTAX OCTET STRING
+ MAX-ACCESS accessible-for-notify
+ STATUS current
+ DESCRIPTION
+ "The uuid of the vm associated with the audit event(optional)."
+::= { ovirtEngineNotifierObjectsAudit 103 }
+
+ovirtEngineNotifierHostName OBJECT-TYPE
+ SYNTAX OCTET STRING
+ MAX-ACCESS accessible-for-notify
+ STATUS current
+ DESCRIPTION
+ "The name of the host associated with the audit event(optional)."
+::= { ovirtEngineNotifierObjectsAudit 104 }
+
+ovirtEngineNotifierHostId OBJECT-TYPE
+ SYNTAX OCTET STRING
+ MAX-ACCESS accessible-for-notify
+ STATUS current
+ DESCRIPTION
+ "The uuid of the host associated with the audit event(optional)."
+::= { ovirtEngineNotifierObjectsAudit 105 }
+
+ovirtEngineNotifierTemplateName OBJECT-TYPE
+ SYNTAX OCTET STRING
+ MAX-ACCESS accessible-for-notify
+ STATUS current
+ DESCRIPTION
+ "The name of the template associated with the audit event(optional)."
+::= { ovirtEngineNotifierObjectsAudit 106 }
+
+ovirtEngineNotifierTemplateId OBJECT-TYPE
+ SYNTAX OCTET STRING
+ MAX-ACCESS accessible-for-notify
+ STATUS current
+ DESCRIPTION
+ "The uuid of the template associated with the audit event(optional)."
+::= { ovirtEngineNotifierObjectsAudit 107 }
+
+ovirtEngineNotifierStoragePoolName OBJECT-TYPE
+ SYNTAX OCTET STRING
+ MAX-ACCESS accessible-for-notify
+ STATUS current
+ DESCRIPTION
+ "The name of the storage pool associated with the audit
event(optional)."
+::= { ovirtEngineNotifierObjectsAudit 108 }
+
+ovirtEngineNotifierStoragePoolId OBJECT-TYPE
+ SYNTAX OCTET STRING
+ MAX-ACCESS accessible-for-notify
+ STATUS current
+ DESCRIPTION
+ "The uuid of the storage pool associated with the audit
event(optional)."
+::= { ovirtEngineNotifierObjectsAudit 109 }
+
+ovirtEngineNotifierStorageDomainName OBJECT-TYPE
+ SYNTAX OCTET STRING
+ MAX-ACCESS accessible-for-notify
+ STATUS current
+ DESCRIPTION
+ "The name of the storage domain associated with the audit
event(optional)."
+::= { ovirtEngineNotifierObjectsAudit 110 }
+
+ovirtEngineNotifierStorageDomainId OBJECT-TYPE
+ SYNTAX OCTET STRING
+ MAX-ACCESS accessible-for-notify
+ STATUS current
+ DESCRIPTION
+ "The uuid of the storage domain associated with the audit
event(optional)."
+::= { ovirtEngineNotifierObjectsAudit 111 }
+
+END
diff --git a/packaging/doc/mibs/REDHAT-MIB.txt
b/packaging/doc/mibs/REDHAT-MIB.txt
new file mode 100644
index 0000000..f1cac06
--- /dev/null
+++ b/packaging/doc/mibs/REDHAT-MIB.txt
@@ -0,0 +1,33 @@
+--
+-- Copyright 2014 Red Hat Inc.
+--
+-- Licensed under the Apache License, Version 2.0 (the "License");
+-- you may not use this file except in compliance with the License.
+-- You may obtain a copy of the License at
+--
+-- http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
+
+REDHAT-MIB DEFINITIONS ::= BEGIN
+
+IMPORTS
+ MODULE-IDENTITY, enterprises FROM SNMPv2-SMI
+;
+
+redhat MODULE-IDENTITY
+ LAST-UPDATED "201409140000Z"
+ ORGANIZATION "www.redhat.org"
+ CONTACT-INFO "TBD"
+ DESCRIPTION "TBD"
+ REVISION "201409140000Z"
+ DESCRIPTION
+ "First draft"
+ ::= { enterprises 2312}
+
+END
diff --git
a/packaging/services/ovirt-engine-notifier/ovirt-engine-notifier.conf.in
b/packaging/services/ovirt-engine-notifier/ovirt-engine-notifier.conf.in
index e071b47..f54e677 100644
--- a/packaging/services/ovirt-engine-notifier/ovirt-engine-notifier.conf.in
+++ b/packaging/services/ovirt-engine-notifier/ovirt-engine-notifier.conf.in
@@ -152,10 +152,10 @@
# Default SNMP Community String.
SNMP_COMMUNITY=public
-# Default TRAP Object Identifier for alerts.
+# SNMP Trap Object Identifier for outgoing notifications.
+# { iso(1) org(3) dod(6) internet(1) private(4) enterprises(1) redhat(2312)
ovirt(13) engine(1) notifier(1) }
#
-#
iso.organization.DoD.Internet.private.enterprises.redhat.ovirt-engine.notifications.audit-log
-# 1.3.6.1.4.1.2312.13.1.1
+# Note: changing the default will prevent generated traps from complying with
OVIRT-MIB.txt.
SNMP_OID=1.3.6.1.4.1.2312.13.1.1
#
--
To view, visit http://gerrit.ovirt.org/33745
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic8a06063f8ebbbe4d05783cb25036e870a6be3b7
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-3.5.0
Gerrit-Owner: mooli tayer <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches