public class AmbariSNMPDispatcher extends SNMPDispatcher
AmbariSNMPDispatcher
class is used to dispatch AlertNotification
via SNMP using predefined Ambari OIDs.
The base OID for Ambari is 1.3.6.1.4.1.18060.16. Off of this, we define the following: .0 - apacheAmbariTraps .1 - apacheAmbariAlerts From these two roots, we define other bindings: .1.1 - apacheAmbariAlertTable .1.1.1 - apacheAmbariAlertEntry .1.1.1.2 - alertDefinitionName
SNMPDispatcher.InvalidSnmpConfigurationException, SNMPDispatcher.SnmpVersion, SNMPDispatcher.TrapSecurity
Modifier and Type | Field and Description |
---|---|
static String |
AMBARI_ALERT_COMPONENT_NAME_OID |
static String |
AMBARI_ALERT_DEFINITION_HASH_OID |
static String |
AMBARI_ALERT_DEFINITION_ID_OID |
static String |
AMBARI_ALERT_DEFINITION_NAME_OID |
static String |
AMBARI_ALERT_ENTRY_OID |
static String |
AMBARI_ALERT_HOST_NAME_OID |
static String |
AMBARI_ALERT_NAME_OID |
static String |
AMBARI_ALERT_SERVICE_NAME_OID |
static String |
AMBARI_ALERT_STATE_OID |
static String |
AMBARI_ALERT_TABLE_OID |
static String |
AMBARI_ALERT_TEXT_OID |
static String |
AMBARI_ALERT_TRAP_OID |
static String |
AMBARI_ALERTS_OID |
static String |
APACHE_AMBARI_TRAPS_OID |
static String |
BASE_AMBARI_OID |
BODY_OID_PROPERTY, COMMUNITY_PROPERTY, PORT_PROPERTY, SECURITY_AUTH_PASSPHRASE_PROPERTY, SECURITY_LEVEL_PROPERTY, SECURITY_PRIV_PASSPHRASE_PROPERTY, SECURITY_USERNAME_PROPERTY, SNMP_VERSION_PROPERTY, SUBJECT_OID_PROPERTY, TRAP_OID_PROPERTY
Modifier | Constructor and Description |
---|---|
|
AmbariSNMPDispatcher(Integer port) |
protected |
AmbariSNMPDispatcher(org.snmp4j.Snmp snmp) |
Modifier and Type | Method and Description |
---|---|
protected Set<String> |
getSetOfDefaultNeededPropertyNames() |
String |
getType()
Gets the type of dispatcher.
|
protected org.snmp4j.PDU |
prepareTrap(Notification notification,
SNMPDispatcher.SnmpVersion snmpVersion)
Creates protocol data unit (PDU) with corresponding SNMP version for alert notification.
|
createTrapTarget, dispatch, getDispatchProperty, getPort, getSecurityLevel, getSnmpVersion, getTransportMapping, isDigestSupported, isNotificationContentGenerationRequired, sendTraps, validateTargetConfig
public static final String BASE_AMBARI_OID
public static final String APACHE_AMBARI_TRAPS_OID
public static final String AMBARI_ALERT_TRAP_OID
public static final String AMBARI_ALERTS_OID
public static final String AMBARI_ALERT_TABLE_OID
public static final String AMBARI_ALERT_ENTRY_OID
public static final String AMBARI_ALERT_DEFINITION_ID_OID
public static final String AMBARI_ALERT_DEFINITION_NAME_OID
public static final String AMBARI_ALERT_DEFINITION_HASH_OID
public static final String AMBARI_ALERT_NAME_OID
public static final String AMBARI_ALERT_TEXT_OID
public static final String AMBARI_ALERT_STATE_OID
public static final String AMBARI_ALERT_HOST_NAME_OID
public static final String AMBARI_ALERT_SERVICE_NAME_OID
public static final String AMBARI_ALERT_COMPONENT_NAME_OID
protected AmbariSNMPDispatcher(org.snmp4j.Snmp snmp)
public AmbariSNMPDispatcher(Integer port) throws IOException
IOException
public String getType()
getType
in interface NotificationDispatcher
getType
in class SNMPDispatcher
null
).protected org.snmp4j.PDU prepareTrap(Notification notification, SNMPDispatcher.SnmpVersion snmpVersion) throws SNMPDispatcher.InvalidSnmpConfigurationException
prepareTrap
in class SNMPDispatcher
notification
- alert notification to dispatchsnmpVersion
- SNMP versionSNMPDispatcher.InvalidSnmpConfigurationException
- if notification's dispatch properties don't contain any of required properties.protected Set<String> getSetOfDefaultNeededPropertyNames()
getSetOfDefaultNeededPropertyNames
in class SNMPDispatcher
Copyright © 2022 Apache Software Foundation. All rights reserved.