Interface ThresholdRuleManagementMBean
-
public interface ThresholdRuleManagementMBeanThe
ThresholdRuleManagementMBeaninterface provides methods to create and manage threshold alarms rules in Rhino.
-
-
Field Summary
Fields Modifier and Type Field Description static StringMBEAN_NAMEThe name of this MBean, equal to the string "ThresholdRules".static StringOBJECT_NAMEThe JMX Object Name of this MBean.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ObjectNamecreateRule(String ruleName)Create a new rule.TabularDatagetAllRules()Description information for all rulesObjectNamegetRule(String ruleName)Manage a rule.String[]getRules()The rule names.intgetScanPeriod()Get the scan period for checking threshold rules.voidremoveRule(String ruleName)Removes a rule.voidsetScanPeriod(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.ValidationExceptionSet 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 ConfigurationExceptionGet 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:
ConfigurationExceptioncom.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
TabularDatawith the following items in eachCompositeDataelement:Column name
JMX type
Description
rule-name
SimpleType.STRINGThe name of the rule described in the row.
alarm-info
CompositeDataColumn name
JMX type
Description
level
SimpleType.STRINGThe alarm level/td>
type
SimpleType.STRINGThe alarm type/td>
message
SimpleType.STRINGThe 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.STRINGThe boolean operator (AND/OR) joining trigger conditions
reset-conditions-operator
SimpleType.STRINGThe boolean operator (AND/OR) joining reset conditions
trigger-period
SimpleType.LONGThe period the trigger condition must hold for before trigger actions are invoked
reset-period
SimpleType.LONGThe period the reset condition must hold for before reset actions are invoked
trigger-conditions-operator
SimpleType.STRINGThe boolean operator (AND/OR) joining trigger conditions
active
SimpleType.BOOLEANTrue if the rule is active
- Returns:
- A table containing the configuration of each rule
- Throws:
OpenDataExceptionConfigurationException
-
removeRule
void removeRule(String ruleName) throws ConfigurationException, com.opencloud.util.exception.ValidationException
Removes a rule.
- Parameters:
ruleName- the name of the rule- Throws:
ConfigurationExceptioncom.opencloud.util.exception.ValidationException
-
-