Interface ThresholdRuleManagementMBean
-
public interface ThresholdRuleManagementMBean
The
ThresholdRuleManagementMBean
interface provides methods to create and manage threshold alarms rules in Rhino.
-
-
Field Summary
Fields Modifier and Type Field Description static String
MBEAN_NAME
The name of this MBean, equal to the string "ThresholdRules".static String
OBJECT_NAME
The JMX Object Name of this MBean.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ObjectName
createRule(String ruleName)
Create a new rule.TabularData
getAllRules()
Description information for all rulesObjectName
getRule(String ruleName)
Manage a rule.String[]
getRules()
The rule names.int
getScanPeriod()
Get the scan period for checking threshold rules.void
removeRule(String ruleName)
Removes a rule.void
setScanPeriod(int scanPeriod)
Set the scan period for checking threshold rules.
-
-
-
Field Detail
-
MBEAN_NAME
static final String MBEAN_NAME
The name of this MBean, equal to the string "ThresholdRules".
- See Also:
- Constant Field Values
-
OBJECT_NAME
static final String OBJECT_NAME
The JMX Object Name of this MBean.
- See Also:
- Constant Field Values
-
-
Method Detail
-
setScanPeriod
void setScanPeriod(int scanPeriod) throws ConfigurationException, com.opencloud.util.exception.ValidationException
Set the scan period for checking threshold rules.
- Parameters:
scanPeriod
- period in milliseconds. Must be greater than 500, or 0 to disable rule checking.- Throws:
ConfigurationException
- An exceptioncom.opencloud.util.exception.ValidationException
- An exception
-
getScanPeriod
int getScanPeriod() throws ConfigurationException
Get the scan period for checking threshold rules.
- Returns:
- the period in milliseconds, or 0 if rule checking is disabled.
- Throws:
ConfigurationException
- An exception
-
createRule
ObjectName createRule(String ruleName) throws ConfigurationException, com.opencloud.util.exception.ValidationException
Create a new rule.
- Parameters:
ruleName
- the name of the rule- Returns:
- The object name of a
ThresholdRuleMBean
. - Throws:
ConfigurationException
com.opencloud.util.exception.ValidationException
-
getRule
ObjectName getRule(String ruleName) throws ConfigurationException
Manage a rule.
- Parameters:
ruleName
- the name of the rule- Returns:
- The object name of a
ThresholdRuleMBean
. - Throws:
ConfigurationException
-
getRules
String[] getRules() throws ConfigurationException
The rule names.
- Returns:
- The rule namesA
- Throws:
ConfigurationException
-
getAllRules
TabularData getAllRules() throws OpenDataException, ConfigurationException
Description information for all rules
The data returned is
TabularData
with the following items in eachCompositeData
element:Column name
JMX type
Description
rule-name
SimpleType.STRING
The name of the rule described in the row.
alarm-info
CompositeData
Column name
JMX type
Description
level
SimpleType.STRING
The alarm level/td>
type
SimpleType.STRING
The alarm type/td>
message
SimpleType.STRING
The alarm message/td>
The alarm that is raised when the threshold is exceeded.
trigger-conditions
SimpleType.STRING[]
The conditions that will cause the rule to be triggered
reset-conditions
SimpleType.STRING[]
The conditions that will cause the rule to be reset
trigger-conditions-operator
SimpleType.STRING
The boolean operator (AND/OR) joining trigger conditions
reset-conditions-operator
SimpleType.STRING
The boolean operator (AND/OR) joining reset conditions
trigger-period
SimpleType.LONG
The period the trigger condition must hold for before trigger actions are invoked
reset-period
SimpleType.LONG
The period the reset condition must hold for before reset actions are invoked
trigger-conditions-operator
SimpleType.STRING
The boolean operator (AND/OR) joining trigger conditions
active
SimpleType.BOOLEAN
True if the rule is active
- Returns:
- A table containing the configuration of each rule
- Throws:
OpenDataException
ConfigurationException
-
removeRule
void removeRule(String ruleName) throws ConfigurationException, com.opencloud.util.exception.ValidationException
Removes a rule.
- Parameters:
ruleName
- the name of the rule- Throws:
ConfigurationException
com.opencloud.util.exception.ValidationException
-
-