|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.rhq.core.domain.alert.AlertCondition
public class AlertCondition
An alert condition (e.g. ActiveThreads > 100) as configured in an alert definition.
Field Summary | |
---|---|
static String |
QUERY_BY_CATEGORY_AVAILABILITY
|
static String |
QUERY_BY_CATEGORY_BASELINE
|
static String |
QUERY_BY_CATEGORY_CHANGE
|
static String |
QUERY_BY_CATEGORY_CONTROL
|
static String |
QUERY_BY_CATEGORY_COUNT_BASELINE
|
static String |
QUERY_BY_CATEGORY_COUNT_PARAMETERIZED
|
static String |
QUERY_BY_CATEGORY_DRIFT
|
static String |
QUERY_BY_CATEGORY_EVENT
|
static String |
QUERY_BY_CATEGORY_RANGE
|
static String |
QUERY_BY_CATEGORY_RESOURCE_CONFIG
|
static String |
QUERY_BY_CATEGORY_THRESHOLD
|
static String |
QUERY_BY_CATEGORY_TRAIT
|
static String |
QUERY_DELETE_BY_RESOURCES
|
static String |
QUERY_FIND_RESOURCE_STATUS_BY_CONDITION_ID
|
static String |
RECOVERY_CONDITIONAL_EXPRESSION
|
Constructor Summary | |
---|---|
AlertCondition()
Creates a new alert condition. |
|
AlertCondition(AlertCondition cond)
Creates a skeletal copy of the specified alert condition. |
|
AlertCondition(AlertDefinition alertDef,
AlertConditionCategory type)
|
Method Summary | |
---|---|
void |
addConditionLog(AlertConditionLog condLog)
|
boolean |
equals(Object obj)
|
AlertDefinition |
getAlertDefinition()
|
AlertConditionCategory |
getCategory()
|
String |
getComparator()
THRESHOLD and BASELINE: one of these comparators: "<", ">" or "=" For calltime alert conditions (i.e. category CHANGE for calltime metric definitions), comparator will be one of these comparators: "HI", "LO", "CH" (where "CH" means "change"). |
Set<AlertConditionLog> |
getConditionLogs()
|
int |
getId()
|
MeasurementDefinition |
getMeasurementDefinition()
Identifies the measurement definition of the metric that is to be compared when determining if the condition is true. |
String |
getName()
The name of the condition whose semantics are different based on this condition's category: AVAILABILITY: n/a (null) THRESHOLD: the name of the metric (TODO: today its the display name, very bad for i18n purposes) BASELINE: the name of the metric (TODO: today its the display name, very bad for i18n purposes) CHANGE: the name of the metric (TODO: today its the display name, very bad for i18n purposes) OR (for calltime alert conditions only) this will be the optional regular expression condition (which may be null) TRAIT: the name of the trait (TODO: today its the display name, very bad for i18n purposes) CONTROL: the name of the operation (not its display name) EVENT: the level of event to compare with (DEBUG, INFO, WARN, ERROR, FATAL) RESOURCE_CONFIG: n/a (null) DRIFT: the name of the drift definition that triggered the drift detection. |
String |
getOption()
The option string is optional and its semantics differ based on the category of this condition: AVAILABILITY: the AvailabilityType to trigger off of (DOWN or UP)
THRESHOLD: for calltime metric conditions, one of "MIN, "MAX", "AVG" - all others are n/a
BASELINE: one of "min", "max" or "mean" - indicates what the threshold is compared to (min/max/avg baseline value)
CHANGE: for calltime metric conditions, one of "MIN, "MAX", "AVG" - all others are n/a
TRAIT: n/a
CONTROL: the OperationRequestStatus name (SUCCESS, FAILURE, etc). |
Double |
getThreshold()
Returns the threshold to compare a measurement value to see if the condition is true. |
Integer |
getTriggerId()
|
int |
hashCode()
|
void |
setAlertDefinition(AlertDefinition alertDef)
|
void |
setCategory(AlertConditionCategory category)
|
void |
setComparator(String comparator)
|
void |
setMeasurementDefinition(MeasurementDefinition measurementDefinition)
|
void |
setName(String name)
|
void |
setOption(String option)
|
void |
setThreshold(Double threshold)
|
void |
setTriggerId(Integer triggerId)
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String QUERY_DELETE_BY_RESOURCES
public static final String QUERY_BY_CATEGORY_BASELINE
public static final String QUERY_BY_CATEGORY_CHANGE
public static final String QUERY_BY_CATEGORY_TRAIT
public static final String QUERY_BY_CATEGORY_AVAILABILITY
public static final String QUERY_BY_CATEGORY_CONTROL
public static final String QUERY_BY_CATEGORY_THRESHOLD
public static final String QUERY_BY_CATEGORY_EVENT
public static final String QUERY_BY_CATEGORY_RESOURCE_CONFIG
public static final String QUERY_BY_CATEGORY_DRIFT
public static final String QUERY_BY_CATEGORY_RANGE
public static final String QUERY_BY_CATEGORY_COUNT_BASELINE
public static final String QUERY_BY_CATEGORY_COUNT_PARAMETERIZED
public static final String QUERY_FIND_RESOURCE_STATUS_BY_CONDITION_ID
public static final String RECOVERY_CONDITIONAL_EXPRESSION
Constructor Detail |
---|
public AlertCondition()
public AlertCondition(AlertDefinition alertDef, AlertConditionCategory type)
public AlertCondition(AlertCondition cond)
cond
- the alert condition to be copiedMethod Detail |
---|
public int getId()
public AlertConditionCategory getCategory()
public void setCategory(AlertConditionCategory category)
public MeasurementDefinition getMeasurementDefinition()
public void setMeasurementDefinition(MeasurementDefinition measurementDefinition)
public String getName()
public void setName(String name)
public String getComparator()
null
(i.e. this will be
null if the condition does not compare values).
public void setComparator(String comparator)
public Double getThreshold()
null
.
Note: If RANGE condition, this threshold is always the LOW end of the range.
The high end of the range is in getOption()
.
public void setThreshold(Double threshold)
public String getOption()
AvailabilityType
to trigger off of (DOWN or UP)
THRESHOLD: for calltime metric conditions, one of "MIN, "MAX", "AVG" - all others are n/a
BASELINE: one of "min", "max" or "mean" - indicates what the threshold is compared to (min/max/avg baseline value)
CHANGE: for calltime metric conditions, one of "MIN, "MAX", "AVG" - all others are n/a
TRAIT: n/a
CONTROL: the OperationRequestStatus
name (SUCCESS, FAILURE, etc).
EVENT: the regular expression of the message to match (which may be empty string if not specified)
RESOURCE_CONFIG: n/a
DRIFT: a regular expression to match files whose content drifted (may be empty string or null if not specified)
RANGE: the string form of a double value that is the HIGH end of the range (low end is getThreshold()
)
public void setOption(String option)
public Integer getTriggerId()
public void setTriggerId(Integer triggerId)
public AlertDefinition getAlertDefinition()
public void setAlertDefinition(AlertDefinition alertDef)
public Set<AlertConditionLog> getConditionLogs()
public void addConditionLog(AlertConditionLog condLog)
public boolean equals(Object obj)
equals
in class Object
public int hashCode()
hashCode
in class Object
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |