public interface SNMPManagementMBean
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
static final String OBJECT_NAME
boolean isEnabled() throws ConfigurationException
ConfigurationException
- if the SNMP configuration could not be read.void setEnabled(boolean enabled) throws ConfigurationException, IllegalStateException
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
subnet
- ConfigurationException
IllegalArgumentException
void setDefaultSubnet(String subnet) throws ConfigurationException, IllegalArgumentException
subnet
- ConfigurationException
IllegalArgumentException
void setDefaultPortRange(int lowPort, int highPort) throws ConfigurationException, IllegalArgumentException
setDefaultLowPort()
and
setDefaultHighPort()
lowPort
- highPort
- ConfigurationException
IllegalArgumentException
void setDefaultLowPort(int port) throws ConfigurationException, IllegalArgumentException
port
- ConfigurationException
IllegalArgumentException
int getDefaultLowPort() throws ConfigurationException, IllegalArgumentException
ConfigurationException
IllegalArgumentException
void setDefaultHighPort(int port) throws ConfigurationException, IllegalArgumentException
port
- ConfigurationException
IllegalArgumentException
int getDefaultHighPort() throws ConfigurationException
ConfigurationException
String[] getNotificationTargets() throws ConfigurationException
ConfigurationException
void addNotificationTarget(String version, String address) throws ConfigurationException, IllegalArgumentException
version
- May be v2c | v3address
- Must be in the form udp:address/portConfigurationException
IllegalArgumentException
void removeNotificationTarget(String target) throws ConfigurationException, IllegalArgumentException
target
- ConfigurationException
IllegalArgumentException
void setNotificationsEnabled(boolean enabled) throws ConfigurationException, IllegalStateException
enabled
- ConfigurationException
IllegalStateException
boolean isNotificationsEnabled() throws ConfigurationException
ConfigurationException
- if the SNMP configuration could not be read.void setLoopbackAddressesAllowed(boolean allowed) throws ConfigurationException
allowed
- ConfigurationException
boolean isLoopbackAddressesAllowed() throws ConfigurationException
ConfigurationException
void setAddressBindingsSaved(boolean saved) throws ConfigurationException
save
- ConfigurationException
boolean isAddressBindingsSaved() throws ConfigurationException
ConfigurationException
void setPortBindingsSaved(boolean saved) throws ConfigurationException
save
- ConfigurationException
boolean isPortBindingsSaved() throws ConfigurationException
ConfigurationException
void setDetails(String name, String description, String contact, String location) throws ConfigurationException
${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
${property.name}
to provide node
specific information. The special ${node-id}
property
reference is also available.ConfigurationException
String getLocation() throws ConfigurationException
ConfigurationException
void setDescription(String description) throws ConfigurationException
${property.name}
to provide node
specific information. The special ${node-id}
property
reference is also available.ConfigurationException
String getDescription() throws ConfigurationException
ConfigurationException
void setContact(String contact) throws ConfigurationException
${property.name}
to provide node
specific information. The special ${node-id}
property
reference is also available.ConfigurationException
String getContact() throws ConfigurationException
ConfigurationException
void setName(String name) throws ConfigurationException
${property.name}
to provide node
specific information. The special ${node-id}
property
reference is also available.ConfigurationException
String getName() throws ConfigurationException
ConfigurationException
short[] getNodeConfigIDs() throws ConfigurationException
ConfigurationException
void clearNodeConfigs() throws ConfigurationException
ConfigurationException
void clearNodeConfigs(short[] nodes) throws ConfigurationException, IllegalArgumentException
TabularData getNodeConfigs()
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
SNMPNodeMBean
management interface for the specified node.TabularData getMIBs()
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()
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.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.@Deprecated void clearOIDMapping(String parameterSetTypeName) throws ConfigurationException, IllegalArgumentException
SNMPParameterSetTypeMBean.clearOIDMapping()
instead.@Deprecated String getOIDMapping(String parameterSetTypeName) throws ConfigurationException, IllegalArgumentException
SNMPParameterSetTypeMBean.getOIDMapping()
instead.@Deprecated TabularData getCounterMappings() throws ConfigurationException
SNMPParameterSetTypeManagementMBean.getAllCounterMappings()
instead.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.@Deprecated void clearCounterMapping(String parameterSetTypeName, String counterName) throws ConfigurationException, IllegalArgumentException
SNMPParameterSetTypeMBean.clearCounterMapping(String)
instead.@Deprecated int getCounterMapping(String parameterSetTypeName, String counterName) throws ConfigurationException, IllegalArgumentException
SNMPParameterSetTypeMBean.getCounterMapping(String)
instead.String[] getNotificationTypeNames() throws ConfigurationException
ConfigurationException
void setNotificationConfig(String type, boolean enabled) throws ConfigurationException, IllegalArgumentException
IllegalArgumentException
- if an invalid type name is specfified.ConfigurationException
boolean getNotificationConfig(String type) throws ConfigurationException, IllegalArgumentException
IllegalArgumentException
- if an invalid type name is specfified.ConfigurationException
TabularData getNotificationConfigs() throws ConfigurationException
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
String[] getEnabledProtocolVersions() throws ConfigurationException
ConfigurationException
void setCommunity(String communityName) throws ConfigurationException
ConfigurationException
String getCommunity() throws ConfigurationException
ConfigurationException
void setv3Username(String username) throws ConfigurationException
ConfigurationException
String getv3Username() throws ConfigurationException
ConfigurationException
void setv3AuthenticationDetails(String protocol, String key) throws ConfigurationException, IllegalArgumentException
String getv3AuthenticationProtocol() throws ConfigurationException
ConfigurationException
String[] getv3AuthenticationProtocols() throws ConfigurationException
ConfigurationException
void setv3PrivacyDetails(String protocol, String key) throws ConfigurationException, IllegalArgumentException
String getv3PrivacyProtocol() throws ConfigurationException
ConfigurationException
String[] getv3PrivacyProtocols() throws ConfigurationException
ConfigurationException
void setv3AuthenticationKey(String value) throws ConfigurationException
ConfigurationException
String getv3AuthenticationKey() throws ConfigurationException
ConfigurationException
void setv3PrivacyKey(String value) throws ConfigurationException
ConfigurationException
String getv3PrivacyKey() throws ConfigurationException
ConfigurationException
int getEngineBoots() throws ConfigurationException
ConfigurationException
int getEngineTime() throws ConfigurationException
ConfigurationException
void setv3UserDetails(String name, String authenticationProtocol, String authenticationKey, String privacyProtocol, String privacyKey) throws ConfigurationException, IllegalArgumentException
Map<Integer,String> getEngineIDs() throws ConfigurationException
ConfigurationException
void setUserEngineID(String octetString) throws ConfigurationException
ConfigurationException
String getUserEngineID() throws ConfigurationException
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