public interface SNMPManagementMBean
The SNMPManagementMBean
interface provides methods to interact with the global configuration of Rhino’s SNMP agent.
Modifier and Type | Field and Description |
---|---|
static String |
MBEAN_NAME
The name of this MBean, equal to the string "SNMP".
|
static String |
OBJECT_NAME
The JMX Object Name of this MBean.
|
Modifier and Type | Method and Description |
---|---|
void |
addNotificationTarget(String version,
String address)
Adds a notification target.
|
void |
clearCounterMapping(String parameterSetTypeName,
String counterName)
Deprecated.
|
void |
clearNodeConfigs()
Clears saved SNMP address/port bindings for all nodes (including nodes which are not currently part of the cluster).
|
void |
clearNodeConfigs(short[] nodes)
Clears saved SNMP address/port bindings for the specified nodes.
|
void |
clearOIDMapping(String parameterSetTypeName)
Deprecated.
Use
SNMPParameterSetTypeMBean.clearOIDMapping() instead. |
TabularData |
getAgentState()
Returns the current active state of the SNMP agent on each Rhino node.
|
String |
getCommunity()
Returns the SNMP community name.
|
String |
getContact()
Returns the SNMPv2-MIB sysContact field value.
|
int |
getCounterMapping(String parameterSetTypeName,
String counterName)
Deprecated.
Use
SNMPParameterSetTypeMBean.getCounterMapping(String) instead. |
TabularData |
getCounterMappings()
Deprecated.
|
int |
getDefaultHighPort()
Returns the upper bound of the port range the SNMP agent uses for port binding when a node has not been explicitly configured to use a particular port.
|
int |
getDefaultLowPort()
Returns the lower bound of the port range the SNMP agent uses for port binding when a node has not been explicitly configured to use a particular port.
|
String |
getDefaultSubnet()
Returns the default subnet the SNMP agent will use to find an address to bind to (if a node doesn’t have saved address binding information).
|
String |
getDescription()
Returns the SNMPv2-MIB sysDescr field value.
|
String[] |
getEnabledProtocolVersions()
Returns a string array containing the currently enabled SNMP protocol versions.
|
int |
getEngineBoots()
Returns the V3 EngineBoots count.
|
Map<Integer,String> |
getEngineIDs()
Returns a map of node IDs to local engine IDs.
|
int |
getEngineTime()
Returns the V3 EngineTime.
|
String |
getLocation()
Returns the SNMPv2-MIB sysLocation field value.
|
TabularData |
getMIBs()
Returns MIB definitions for all parameter set types and notification types that currently exist.
|
String |
getName()
Returns the SNMPv2-MIB sysName field value.
|
short[] |
getNodeConfigIDs()
Returns a list of all nodes which have saved SNMP data.
|
TabularData |
getNodeConfigs()
Returns the current saved state of the SNMP agent for each Rhino node.
|
String |
getNotificationAddress()
Deprecated.
|
boolean |
getNotificationConfig(String type)
Returns true if an SNMP notification will be sent for the specified notification type.
|
TabularData |
getNotificationConfigs()
Returns the current notification configs as TabularData.
|
int |
getNotificationPort()
Deprecated.
|
String[] |
getNotificationTargets()
Returns an array containing currently configured notification targets.
|
String[] |
getNotificationTypeNames()
Returns an array of strings containing the type names which can be used with setNotificationFilter and getNotificationFilter.
|
String |
getOIDMapping(String parameterSetTypeName)
Deprecated.
Use
SNMPParameterSetTypeMBean.getOIDMapping() instead. |
TabularData |
getOIDMappings()
Deprecated.
|
ObjectName |
getSNMPNodeMBean(short nodeID)
Returns the ObjectName of the JMX object providing the
SNMPNodeMBean management interface for the specified node. |
String |
getUserEngineID()
Returns the user specified portion of the EngineID.
|
String |
getv3AuthenticationKey()
Returns the SNMP v3 authentication key.
|
String |
getv3AuthenticationProtocol()
Returns the SNMP v3 authentication protocol.
|
String[] |
getv3AuthenticationProtocols()
Returns the valid SNMP v3 authentication protocols.
|
String |
getv3PrivacyKey()
Returns the SNMP v3 privacy key.
|
String |
getv3PrivacyProtocol()
Returns the SNMP v3 privacy protocol.
|
String[] |
getv3PrivacyProtocols()
Returns the valid SNMP v3 privacy protocols.
|
String |
getv3Username()
Returns the SNMP v3 username.
|
boolean |
isAddressBindingsSaved()
Returns whether the initial address bindings are preserved over node restart.
|
boolean |
isEnabled()
Returns true if the Rhino SNMP agent is current configured to be enabled.
|
boolean |
isLoopbackAddressesAllowed()
Returns whether loopback addresses (e.g. 127.0.0.1) will be considered when the SNMP agent looks for local interfaces to bind to.
|
boolean |
isNotificationsEnabled()
Returns true if the Rhino SNMP agent is configured to send SNMP notifications.
|
boolean |
isPortBindingsSaved()
Returns whether the initial port bindings are preserved over node restart.
|
void |
removeNotificationTarget(String target)
Removes a notification target.
|
void |
setAddressBindingsSaved(boolean saved)
Sets whether the initial address bindings are preserved over node restart.
|
void |
setCommunity(String communityName)
Sets the SNMP community name.
|
void |
setContact(String contact)
Sets the contact string for the SNMP agent.
|
void |
setCounterMapping(String parameterSetTypeName,
String counterName,
int index)
Deprecated.
|
void |
setDefaultHighPort(int port)
Sets the upper bound of the port range the SNMP agent uses for port binding when a node has not been explicitly configured to use a particular port.
|
void |
setDefaultLowPort(int port)
Sets the lower bound of the port range the SNMP agent uses for port binding when a node has not been explicitly configured to use a particular port.
|
void |
setDefaultPortRange(int lowPort,
int highPort)
Sets the default port range the SNMP agent will use to bind to for nodes which have not been explicitly configured.
|
void |
setDefaultSubnet(String subnet)
Sets the default subnet the SNMP agent will use to find local addresses to bind to when a node has not been explicitly configured to use an address.
|
void |
setDescription(String description)
Sets the description string for the SNMP agent.
|
void |
setDetails(String name,
String description,
String contact,
String location)
Sets the name, description, contact, and location strings for the SNMP agent.
|
void |
setEnabled(boolean enabled)
Sets the desired state of the SNMP agent.
|
void |
setLocation(String location)
Sets the location string for the SNMP agent.
|
void |
setLoopbackAddressesAllowed(boolean allowed)
Sets whether loopback addresses (e.g. 127.0.0.1) will be considered when the SNMP agent looks for local interfaces to bind to.
|
void |
setName(String name)
Sets the name string for the SNMP agent.
|
void |
setNotificationAddress(String address)
Deprecated.
|
void |
setNotificationConfig(String type,
boolean enabled)
Sets whether SNMP notifications will be sent for the specified notification type.
|
void |
setNotificationPort(int port)
Deprecated.
|
void |
setNotificationsEnabled(boolean enabled)
Sets whether notifications are delivered by the SNMP agent.
|
void |
setNotificationTarget(String address,
int port)
Deprecated.
|
void |
setOIDMapping(String parameterSetTypeName,
String OID)
Deprecated.
Use
SNMPParameterSetTypeMBean.setOIDMapping(String) instead. |
void |
setPortBindingsSaved(boolean saved)
Sets whether the initial port bindings are preserved over node restart.
|
void |
setProtocolVersionsEnabled(String[] versions,
boolean enabled)
Enables or disables the specified SNMP protocol versions.
|
void |
setUserEngineID(String octetString)
Sets the user specifiable portion of the EngineID used on each node.
|
void |
setv3AuthenticationDetails(String protocol,
String key)
Sets the SNMP v3 authentication protocol.
|
void |
setv3AuthenticationKey(String value)
Sets the SNMP v3 authentication key.
|
void |
setv3PrivacyDetails(String protocol,
String key)
Sets the SNMP v3 privacy protocol.
|
void |
setv3PrivacyKey(String value)
Sets the SNMP v3 privacy key.
|
void |
setv3UserDetails(String name,
String authenticationProtocol,
String authenticationKey,
String privacyProtocol,
String privacyKey)
Sets the SNMP v3 user details.
|
void |
setv3Username(String username)
Sets the SNMP v3 username.
|
static final String MBEAN_NAME
The name of this MBean, equal to the string "SNMP".
static final String OBJECT_NAME
The JMX Object Name of this MBean.
boolean isEnabled() throws ConfigurationException
Returns true if the Rhino SNMP agent is current configured to be enabled. This may differ from the actual state of the agent on a particular node and should thus be considered the 'desired' state of the SNMP agent.
ConfigurationException
- if the SNMP configuration could not be read.void setEnabled(boolean enabled) throws ConfigurationException, IllegalStateException
Sets the desired state of the SNMP agent.
enabled
- if true, sets the desired state of the SNMP agent to enabled.ConfigurationException
- if the SNMP configuration could not be read or updated.IllegalStateException
- if the SNMP agent is in the wrong state for this operation.String getDefaultSubnet() throws ConfigurationException, IllegalArgumentException
Returns the default subnet the SNMP agent will use to find an address to bind to (if a node doesn’t have saved address binding information).
subnet
- ConfigurationException
IllegalArgumentException
void setDefaultSubnet(String subnet) throws ConfigurationException, IllegalArgumentException
Sets the default subnet the SNMP agent will use to find local addresses to bind to when a node has not been explicitly configured to use an address.
subnet
- ConfigurationException
IllegalArgumentException
void setDefaultPortRange(int lowPort, int highPort) throws ConfigurationException, IllegalArgumentException
Sets the default port range the SNMP agent will use to bind to for nodes which have not been explicitly configured.
This can be explicitly overridden on a per-node basis.
This method is provided as an atomic equivalent of calling setDefaultLowPort()
and setDefaultHighPort()
lowPort
- highPort
- ConfigurationException
IllegalArgumentException
void setDefaultLowPort(int port) throws ConfigurationException, IllegalArgumentException
Sets the lower bound of the port range the SNMP agent uses for port binding when a node has not been explicitly configured to use a particular port.
port
- ConfigurationException
IllegalArgumentException
int getDefaultLowPort() throws ConfigurationException, IllegalArgumentException
Returns the lower bound of the port range the SNMP agent uses for port binding when a node has not been explicitly configured to use a particular port.
void setDefaultHighPort(int port) throws ConfigurationException, IllegalArgumentException
Sets the upper bound of the port range the SNMP agent uses for port binding when a node has not been explicitly configured to use a particular port.
port
- ConfigurationException
IllegalArgumentException
int getDefaultHighPort() throws ConfigurationException
Returns the upper bound of the port range the SNMP agent uses for port binding when a node has not been explicitly configured to use a particular port.
ConfigurationException
String[] getNotificationTargets() throws ConfigurationException
Returns an array containing currently configured notification targets.
ConfigurationException
void addNotificationTarget(String version, String address) throws ConfigurationException, IllegalArgumentException
Adds a notification target.
version
- May be v2c
| v3address
- Must be in the form udp:address/portConfigurationException
IllegalArgumentException
void removeNotificationTarget(String target) throws ConfigurationException, IllegalArgumentException
Removes a notification target. Valid arguments can be determined by calling the getNotificationTargets() method.
target
- ConfigurationException
IllegalArgumentException
void setNotificationsEnabled(boolean enabled) throws ConfigurationException, IllegalStateException
Sets whether notifications are delivered by the SNMP agent.
enabled
- ConfigurationException
IllegalStateException
boolean isNotificationsEnabled() throws ConfigurationException
Returns true if the Rhino SNMP agent is configured to send SNMP notifications.
ConfigurationException
- if the SNMP configuration could not be read.void setLoopbackAddressesAllowed(boolean allowed) throws ConfigurationException
Sets whether loopback addresses (e.g. 127.0.0.1) will be considered when the SNMP agent looks for local interfaces to bind to. If there are only loopback addresses available, this setting will be ignored.
allowed
- ConfigurationException
boolean isLoopbackAddressesAllowed() throws ConfigurationException
Returns whether loopback addresses (e.g. 127.0.0.1) will be considered when the SNMP agent looks for local interfaces to bind to. If there are only loopback addresses available, this setting will be ignored.
ConfigurationException
void setAddressBindingsSaved(boolean saved) throws ConfigurationException
Sets whether the initial address bindings are preserved over node restart.
save
- ConfigurationException
boolean isAddressBindingsSaved() throws ConfigurationException
Returns whether the initial address bindings are preserved over node restart.
ConfigurationException
void setPortBindingsSaved(boolean saved) throws ConfigurationException
Sets whether the initial port bindings are preserved over node restart.
save
- ConfigurationException
boolean isPortBindingsSaved() throws ConfigurationException
Returns whether the initial port bindings are preserved over node restart.
ConfigurationException
void setDetails(String name, String description, String contact, String location) throws ConfigurationException
Sets the name, description, contact, and location strings for the SNMP agent.
These correspond to the SNMPv2-MIB sysName, sysDescr, sysContact, and sysLocation fields.
If necessary, system properties can be used in these strings in the form ${property.name}
to provide node specific information.
The special ${node-id}
property reference is also available.
name
- description
- contact
- location
- ConfigurationException
void setLocation(String location) throws ConfigurationException
Sets the location string for the SNMP agent.
This correspond to the SNMPv2-MIB sysLocation field.
If necessary, system properties can be used in this string in the form ${property.name}
to provide node specific information.
The special ${node-id}
property reference is also available.
ConfigurationException
String getLocation() throws ConfigurationException
Returns the SNMPv2-MIB sysLocation field value.
ConfigurationException
void setDescription(String description) throws ConfigurationException
Sets the description string for the SNMP agent.
This correspond to the SNMPv2-MIB sysDescr field.
If necessary, system properties can be used in this string in the form ${property.name}
to provide node specific information.
The special ${node-id}
property reference is also available.
ConfigurationException
String getDescription() throws ConfigurationException
Returns the SNMPv2-MIB sysDescr field value.
ConfigurationException
void setContact(String contact) throws ConfigurationException
Sets the contact string for the SNMP agent.
This correspond to the SNMPv2-MIB sysContact field.
If necessary, system properties can be used in this string in the form ${property.name}
to provide node specific information.
The special ${node-id}
property reference is also available.
ConfigurationException
String getContact() throws ConfigurationException
Returns the SNMPv2-MIB sysContact field value.
ConfigurationException
void setName(String name) throws ConfigurationException
Sets the name string for the SNMP agent.
This correspond to the SNMPv2-MIB sysName field.
If necessary, system properties can be used in this string in the form ${property.name}
to provide node specific information.
The special ${node-id}
property reference is also available.
ConfigurationException
String getName() throws ConfigurationException
Returns the SNMPv2-MIB sysName field value.
ConfigurationException
short[] getNodeConfigIDs() throws ConfigurationException
Returns a list of all nodes which have saved SNMP data.
ConfigurationException
void clearNodeConfigs() throws ConfigurationException
Clears saved SNMP address/port bindings for all nodes (including nodes which are not currently part of the cluster).
ConfigurationException
void clearNodeConfigs(short[] nodes) throws ConfigurationException, IllegalArgumentException
Clears saved SNMP address/port bindings for the specified nodes.
TabularData getNodeConfigs()
Returns the current saved state of the SNMP agent for each Rhino node. The data returned is TabularData with the columns "node" (Integer), "port" (Integer), "addresses" (ArrayType).
node |
The node id for which this data is relevant. |
port |
The port used for the node. |
addresses |
An ArrayType of Strings representing the list of saved addresses for this node. |
ObjectName getSNMPNodeMBean(short nodeID) throws ConfigurationException, IllegalArgumentException
Returns the ObjectName of the JMX object providing the SNMPNodeMBean
management interface for the specified node.
TabularData getMIBs()
Returns MIB definitions for all parameter set types and notification types that currently exist. This data is returned as TabularData with columns "is-aggregate" (Boolean), "namespace" (String), "parameter-set-type" (String), "filename" (String), and "mib-content" (String).
is-aggregate |
Boolean flag indicating if the row is an aggregate MIB. |
namespace |
The namespace of the parameter set type. 'Null' if the parameter set type is defined in the global environment or if this mib contains Rhino’s SNMP notifications. |
parameter-set-type |
The name of the parameter set type, or 'null' if this mib contains Rhino’s SNMP notifications. |
filename |
The suggested filename for the exported MIB. |
mib-content |
A text string containing the contents of the MIB. |
TabularData getAgentState()
Returns the current active state of the SNMP agent on each Rhino node. The data returned is TabularData with the columns "node" (Integer), "running" (Boolean) and "addresses" (Tabular).
node |
The node id for which this data is relevant. |
running |
Is true if the SNMP agent is running on the specified Rhino node. |
addresses |
A tabular type representing the list of bound addresses for this node. Contains the fields 'host' (String) and 'port' (Integer). |
@Deprecated TabularData getOIDMappings() throws ConfigurationException
SNMPParameterSetTypeManagementMBean.getAllOIDMappings()
instead.Returns the current active parameter set type → OID mappings. The data returned is TabularData with the columns "oid" (String) and "type-name" (String). oid The oid the parameter set type is mapped to. type-name The name of the parameter set type for which this data is relevant. in-use A flag indicating whether this configuration is actively being use.
ConfigurationException
@Deprecated void setOIDMapping(String parameterSetTypeName, String OID) throws ConfigurationException, IllegalArgumentException
SNMPParameterSetTypeMBean.setOIDMapping(String)
instead.Maps the parameter set type to the specified OID.
@Deprecated void clearOIDMapping(String parameterSetTypeName) throws ConfigurationException, IllegalArgumentException
SNMPParameterSetTypeMBean.clearOIDMapping()
instead.Clears the OID mapping for the specified parameter set type.
@Deprecated String getOIDMapping(String parameterSetTypeName) throws ConfigurationException, IllegalArgumentException
SNMPParameterSetTypeMBean.getOIDMapping()
instead.Returns the OID which the specified Parameter Set Type name is mapped to.
@Deprecated TabularData getCounterMappings() throws ConfigurationException
SNMPParameterSetTypeManagementMBean.getAllCounterMappings()
instead.Gets the current active counter mappings. The data returned is TabularData with the columns "type-name" (String), "counter-name" (String) and "mapping" (Integer).
type-name |
The name of the parameter set type for which this data is relevant. |
counter-name |
The name of the counter for which this data is relevant. |
mapping |
The last digit of the OID this type and counter are mapped to. |
ConfigurationException
@Deprecated void setCounterMapping(String parameterSetTypeName, String counterName, int index) throws ConfigurationException, IllegalArgumentException
SNMPParameterSetTypeMBean.setCounterMapping(String, int)
instead.Maps the specified parameter set type name and counter name to the specified value.
@Deprecated void clearCounterMapping(String parameterSetTypeName, String counterName) throws ConfigurationException, IllegalArgumentException
SNMPParameterSetTypeMBean.clearCounterMapping(String)
instead.Clears the counter mapping for the specified parameter set type and counter name.
@Deprecated int getCounterMapping(String parameterSetTypeName, String counterName) throws ConfigurationException, IllegalArgumentException
SNMPParameterSetTypeMBean.getCounterMapping(String)
instead.Returns the value to which the specified counter from the named parameter set type is mapped to.
String[] getNotificationTypeNames() throws ConfigurationException
Returns an array of strings containing the type names which can be used with setNotificationFilter and getNotificationFilter.
ConfigurationException
void setNotificationConfig(String type, boolean enabled) throws ConfigurationException, IllegalArgumentException
Sets whether SNMP notifications will be sent for the specified notification type. Valid type names can be determined via getSNMPNotificationTypeNames().
IllegalArgumentException
- if an invalid type name is specfified.ConfigurationException
boolean getNotificationConfig(String type) throws ConfigurationException, IllegalArgumentException
Returns true if an SNMP notification will be sent for the specified notification type. Valid type names can be determined via getSNMPNotificationTypeNames().
IllegalArgumentException
- if an invalid type name is specfified.ConfigurationException
TabularData getNotificationConfigs() throws ConfigurationException
Returns the current notification configs as TabularData. The return TabularData has columns "type" (String) and "enabled" (Boolean). type The type of the notification configuration. enabled Whether the notification type will be delivered (true) via SNMP or not (false).
ConfigurationException
void setProtocolVersionsEnabled(String[] versions, boolean enabled) throws ConfigurationException, IllegalArgumentException
Enables or disables the specified SNMP protocol versions. The 'version' argument may be 'v1', 'v2c', or 'v3'.
String[] getEnabledProtocolVersions() throws ConfigurationException
Returns a string array containing the currently enabled SNMP protocol versions. This array can contain the values 'v1', 'v2c', and 'v3'.
ConfigurationException
void setCommunity(String communityName) throws ConfigurationException
Sets the SNMP community name.
ConfigurationException
String getCommunity() throws ConfigurationException
Returns the SNMP community name.
ConfigurationException
void setv3Username(String username) throws ConfigurationException
Sets the SNMP v3 username.
ConfigurationException
String getv3Username() throws ConfigurationException
Returns the SNMP v3 username.
ConfigurationException
void setv3AuthenticationDetails(String protocol, String key) throws ConfigurationException, IllegalArgumentException
Sets the SNMP v3 authentication protocol.
String getv3AuthenticationProtocol() throws ConfigurationException
Returns the SNMP v3 authentication protocol.
ConfigurationException
String[] getv3AuthenticationProtocols() throws ConfigurationException
Returns the valid SNMP v3 authentication protocols.
ConfigurationException
void setv3PrivacyDetails(String protocol, String key) throws ConfigurationException, IllegalArgumentException
Sets the SNMP v3 privacy protocol.
String getv3PrivacyProtocol() throws ConfigurationException
Returns the SNMP v3 privacy protocol.
ConfigurationException
String[] getv3PrivacyProtocols() throws ConfigurationException
Returns the valid SNMP v3 privacy protocols.
ConfigurationException
void setv3AuthenticationKey(String value) throws ConfigurationException
Sets the SNMP v3 authentication key.
ConfigurationException
String getv3AuthenticationKey() throws ConfigurationException
Returns the SNMP v3 authentication key.
ConfigurationException
void setv3PrivacyKey(String value) throws ConfigurationException
Sets the SNMP v3 privacy key.
ConfigurationException
String getv3PrivacyKey() throws ConfigurationException
Returns the SNMP v3 privacy key.
ConfigurationException
int getEngineBoots() throws ConfigurationException
Returns the V3 EngineBoots count.
ConfigurationException
int getEngineTime() throws ConfigurationException
Returns the V3 EngineTime.
ConfigurationException
void setv3UserDetails(String name, String authenticationProtocol, String authenticationKey, String privacyProtocol, String privacyKey) throws ConfigurationException, IllegalArgumentException
Sets the SNMP v3 user details.
Map<Integer,String> getEngineIDs() throws ConfigurationException
Returns a map of node IDs to local engine IDs.
ConfigurationException
void setUserEngineID(String octetString) throws ConfigurationException
Sets the user specifiable portion of the EngineID used on each node. The argument should be 6 octets in length in the form: 12:34:56:78:9a:bc. The final engine ID is determined by the OpenCloud enterprise ID (first 4 octets), the current node ID (2 octets), and then the 6 octets specified by this method. The default value of the user portion of the EngineID is 00:00:00:00:00:00.
ConfigurationException
String getUserEngineID() throws ConfigurationException
Returns the user specified portion of the EngineID.
ConfigurationException
@Deprecated void setNotificationTarget(String address, int port) throws ConfigurationException, IllegalArgumentException
@Deprecated void setNotificationAddress(String address) throws ConfigurationException, IllegalArgumentException
@Deprecated String getNotificationAddress() throws ConfigurationException
ConfigurationException
@Deprecated void setNotificationPort(int port) throws ConfigurationException, IllegalArgumentException
@Deprecated int getNotificationPort() throws ConfigurationException
ConfigurationException