Package org.netxms.client.events
Class EventProcessingPolicyRule
java.lang.Object
org.netxms.client.events.EventProcessingPolicyRule
This class represents single rule of event processing policy.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final int -
Constructor Summary
ConstructorsConstructorDescriptionCreate empty ruleEventProcessingPolicyRule(NXCPMessage msg, int ruleNumber) Create rule from NXCP message.Copy constructor -
Method Summary
Modifier and TypeMethodDescriptionvoidfillMessage(NXCPMessage msg) Fill NXCP message with rule's dataintintGet rule's comments.intgetFlags()getGuid()Get name of root cause analysis script.intGet rule numberbooleanCheck rule's ACCEPT_CORRELATED flagbooleanCheck rule's DISABLED flagbooleanCheck rule's NEGATED_EVENTS flagbooleanCheck rule's NEGATED_SOURCE flagbooleanCheck rule's NEGATED_TIME_FRAMES flagvoidremoveAlarmCategory(Long categoryId) Remove specific alarm category from categories listvoidsetActions(List<ActionExecutionConfiguration> actions) voidsetActionScript(String actionScript) voidsetAlarmCategories(List<Long> alarmCategoryIds) voidsetAlarmKey(String alarmKey) voidsetAlarmMessage(String alarmMessage) voidsetAlarmSeverity(Severity alarmSeverity) voidsetAlarmTimeout(int alarmTimeout) voidsetAlarmTimeoutEvent(int alarmTimeoutEvent) voidsetComments(String comments) Set rule's comments.voidsetCustomAttributeStorageDelete(List<String> customAttributeStorageDelete) voidsetCustomAttributeStorageSet(Map<String, String> customAttributeStorageSet) voidsetDowntimeTag(String downtimeTag) voidvoidsetFilterScript(String script) voidsetFlags(int flags) voidsetPStorageDelete(List<String> persistentStorageDelete) voidsetPStorageSet(Map<String, String> persistentStorageSet) voidsetRcaScriptName(String rcaScriptName) Set name of root cause analysis script.voidsetRuleNumber(int ruleNumber) Set rule numbervoidsetSourceExclusions(List<Long> sourceExclusions) voidsetSources(List<Long> sources) voidsetTimeFrames(List<TimeFrame> timeFrames) voidsetTimerCancellations(List<String> timerCancellations)
-
Field Details
-
STOP_PROCESSING
public static final int STOP_PROCESSING- See Also:
-
NEGATED_SOURCE
public static final int NEGATED_SOURCE- See Also:
-
NEGATED_EVENTS
public static final int NEGATED_EVENTS- See Also:
-
GENERATE_ALARM
public static final int GENERATE_ALARM- See Also:
-
DISABLED
public static final int DISABLED- See Also:
-
TERMINATE_BY_REGEXP
public static final int TERMINATE_BY_REGEXP- See Also:
-
SEVERITY_NORMAL
public static final int SEVERITY_NORMAL- See Also:
-
SEVERITY_WARNING
public static final int SEVERITY_WARNING- See Also:
-
SEVERITY_MINOR
public static final int SEVERITY_MINOR- See Also:
-
SEVERITY_MAJOR
public static final int SEVERITY_MAJOR- See Also:
-
SEVERITY_CRITICAL
public static final int SEVERITY_CRITICAL- See Also:
-
CREATE_TICKET
public static final int CREATE_TICKET- See Also:
-
ACCEPT_CORRELATED
public static final int ACCEPT_CORRELATED- See Also:
-
NEGATED_TIME_FRAMES
public static final int NEGATED_TIME_FRAMES- See Also:
-
START_DOWNTIME
public static final int START_DOWNTIME- See Also:
-
END_DOWNTIME
public static final int END_DOWNTIME- See Also:
-
SEVERITY_ANY
public static final int SEVERITY_ANY- See Also:
-
-
Constructor Details
-
EventProcessingPolicyRule
public EventProcessingPolicyRule()Create empty rule -
EventProcessingPolicyRule
Copy constructor- Parameters:
src- source rule
-
EventProcessingPolicyRule
Create rule from NXCP message.- Parameters:
msg- NXCP messageruleNumber- this rule number
-
-
Method Details
-
fillMessage
Fill NXCP message with rule's data- Parameters:
msg- NXCP message
-
getComments
Get rule's comments.- Returns:
- Rule's comments
-
setComments
Set rule's comments.- Parameters:
comments- New comments
-
getFilterScript
- Returns:
- the script
-
setFilterScript
- Parameters:
script- the script to set
-
getFlags
public int getFlags()- Returns:
- the flags
-
setFlags
public void setFlags(int flags) - Parameters:
flags- the flags to set
-
getAlarmKey
- Returns:
- the alarmKey
-
setAlarmKey
- Parameters:
alarmKey- the alarmKey to set
-
getAlarmMessage
- Returns:
- the alarmMessage
-
setAlarmMessage
- Parameters:
alarmMessage- the alarmMessage to set
-
getAlarmSeverity
- Returns:
- the alarmSeverity
-
setAlarmSeverity
- Parameters:
alarmSeverity- the alarmSeverity to set
-
getAlarmTimeout
public int getAlarmTimeout()- Returns:
- the alarmTimeout
-
setAlarmTimeout
public void setAlarmTimeout(int alarmTimeout) - Parameters:
alarmTimeout- the alarmTimeout to set
-
getAlarmTimeoutEvent
public int getAlarmTimeoutEvent()- Returns:
- the alarmTimeoutEvent
-
setAlarmTimeoutEvent
public void setAlarmTimeoutEvent(int alarmTimeoutEvent) - Parameters:
alarmTimeoutEvent- the alarmTimeoutEvent to set
-
getAlarmCategories
- Returns:
- alarmCategoryIds the alarm category ids
-
setAlarmCategories
- Parameters:
alarmCategoryIds- the alarm category ids to set
-
removeAlarmCategory
Remove specific alarm category from categories list- Parameters:
categoryId- alarm category ID
-
getRcaScriptName
Get name of root cause analysis script.- Returns:
- name of root cause analysis script (can be null or empty string if not set)
-
setRcaScriptName
Set name of root cause analysis script.- Parameters:
rcaScriptName- name of root cause analysis script (can be null or empty string to disable RCA)
-
getSources
- Returns:
- the sources
-
getSourceExclusions
- Returns:
- the sourceExclusions
-
setSourceExclusions
- Parameters:
sourceExclusions- the sourceExclusions to set
-
getEvents
- Returns:
- the events
-
getActions
- Returns:
- the actions
-
getPStorageSet
- Returns:
- the persistentStorageSet
-
getPStorageDelete
- Returns:
- the persistentStorageDelete
-
setSources
- Parameters:
sources- the sources to set
-
setEvents
- Parameters:
events- the events to set
-
setActions
- Parameters:
actions- the actions to set
-
getTimerCancellations
- Returns:
- the timerCancellations
-
setTimerCancellations
- Parameters:
timerCancellations- the timerCancellations to set
-
setPStorageSet
- Parameters:
persistentStorageSet- the persistentStorageSet to set
-
setPStorageDelete
- Parameters:
persistentStorageDelete- the persistentStorageDelete to set
-
isDisabled
public boolean isDisabled()Check rule's DISABLED flag- Returns:
- true if DISABLED flag set
-
isSourceInverted
public boolean isSourceInverted()Check rule's NEGATED_SOURCE flag- Returns:
- true if NEGATED_SOURCE flag set
-
isEventsInverted
public boolean isEventsInverted()Check rule's NEGATED_EVENTS flag- Returns:
- true if NEGATED_EVENTS flag set
-
isTimeFramesInverted
public boolean isTimeFramesInverted()Check rule's NEGATED_TIME_FRAMES flag- Returns:
- true if NEGATED_TIME_FRAMES flag set
-
getGuid
- Returns:
- the guid
-
getRuleNumber
public int getRuleNumber()Get rule number- Returns:
- rule number
-
setRuleNumber
public void setRuleNumber(int ruleNumber) Set rule number- Parameters:
ruleNumber- to set
-
getActionScript
- Returns:
- the actionScript
-
setActionScript
- Parameters:
actionScript- the actionScript to set
-
getCustomAttributeStorageSet
- Returns:
- the customAttributeStorageSet
-
setCustomAttributeStorageSet
- Parameters:
customAttributeStorageSet- the customAttributeStorageSet to set
-
getCustomAttributeStorageDelete
- Returns:
- the customAttributeStorageDelete
-
setCustomAttributeStorageDelete
- Parameters:
customAttributeStorageDelete- the customAttributeStorageDelete to set
-
getTimeFrames
- Returns:
- the timeFrames
-
setTimeFrames
- Parameters:
timeFrames- the timeFrames to set
-
getDowntimeTag
- Returns:
- the downtimeTag
-
setDowntimeTag
- Parameters:
downtimeTag- the downtimeTag to set
-