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 SummaryFieldsModifier 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 intstatic final int
- 
Constructor SummaryConstructorsConstructorDescriptionCreate empty ruleEventProcessingPolicyRule(NXCPMessage msg, int ruleNumber) Create rule from NXCP message.Copy constructor
- 
Method SummaryModifier 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 if rule's filter is empty.booleanCheck 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_PROCESSINGpublic static final int STOP_PROCESSING- See Also:
 
- 
NEGATED_SOURCEpublic static final int NEGATED_SOURCE- See Also:
 
- 
NEGATED_EVENTSpublic static final int NEGATED_EVENTS- See Also:
 
- 
GENERATE_ALARMpublic static final int GENERATE_ALARM- See Also:
 
- 
DISABLEDpublic static final int DISABLED- See Also:
 
- 
TERMINATE_BY_REGEXPpublic static final int TERMINATE_BY_REGEXP- See Also:
 
- 
SEVERITY_NORMALpublic static final int SEVERITY_NORMAL- See Also:
 
- 
SEVERITY_WARNINGpublic static final int SEVERITY_WARNING- See Also:
 
- 
SEVERITY_MINORpublic static final int SEVERITY_MINOR- See Also:
 
- 
SEVERITY_MAJORpublic static final int SEVERITY_MAJOR- See Also:
 
- 
SEVERITY_CRITICALpublic static final int SEVERITY_CRITICAL- See Also:
 
- 
CREATE_TICKETpublic static final int CREATE_TICKET- See Also:
 
- 
ACCEPT_CORRELATEDpublic static final int ACCEPT_CORRELATED- See Also:
 
- 
NEGATED_TIME_FRAMESpublic static final int NEGATED_TIME_FRAMES- See Also:
 
- 
START_DOWNTIMEpublic static final int START_DOWNTIME- See Also:
 
- 
END_DOWNTIMEpublic static final int END_DOWNTIME- See Also:
 
- 
REQUEST_AI_COMMENTpublic static final int REQUEST_AI_COMMENT- See Also:
 
- 
SEVERITY_ANYpublic static final int SEVERITY_ANY- See Also:
 
 
- 
- 
Constructor Details- 
EventProcessingPolicyRulepublic EventProcessingPolicyRule()Create empty rule
- 
EventProcessingPolicyRuleCopy constructor- Parameters:
- src- source rule
 
- 
EventProcessingPolicyRuleCreate rule from NXCP message.- Parameters:
- msg- NXCP message
- ruleNumber- this rule number
 
 
- 
- 
Method Details- 
fillMessageFill NXCP message with rule's data- Parameters:
- msg- NXCP message
 
- 
getCommentsGet rule's comments.- Returns:
- Rule's comments
 
- 
setCommentsSet rule's comments.- Parameters:
- comments- New comments
 
- 
getFilterScript- Returns:
- the script
 
- 
setFilterScript- Parameters:
- script- the script to set
 
- 
getFlagspublic int getFlags()- Returns:
- the flags
 
- 
setFlagspublic 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
 
- 
getAlarmTimeoutpublic int getAlarmTimeout()- Returns:
- the alarmTimeout
 
- 
setAlarmTimeoutpublic void setAlarmTimeout(int alarmTimeout) - Parameters:
- alarmTimeout- the alarmTimeout to set
 
- 
getAlarmTimeoutEventpublic int getAlarmTimeoutEvent()- Returns:
- the alarmTimeoutEvent
 
- 
setAlarmTimeoutEventpublic 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
 
- 
removeAlarmCategoryRemove specific alarm category from categories list- Parameters:
- categoryId- alarm category ID
 
- 
getRcaScriptNameGet name of root cause analysis script.- Returns:
- name of root cause analysis script (can be null or empty string if not set)
 
- 
setRcaScriptNameSet 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
 
- 
isFilterEmptypublic boolean isFilterEmpty()Check if rule's filter is empty.- Returns:
- true if rule's filter is empty, false otherwise
 
- 
isDisabledpublic boolean isDisabled()Check rule's DISABLED flag- Returns:
- true if DISABLED flag set
 
- 
isSourceInvertedpublic boolean isSourceInverted()Check rule's NEGATED_SOURCE flag- Returns:
- true if NEGATED_SOURCE flag set
 
- 
isEventsInvertedpublic boolean isEventsInverted()Check rule's NEGATED_EVENTS flag- Returns:
- true if NEGATED_EVENTS flag set
 
- 
isTimeFramesInvertedpublic boolean isTimeFramesInverted()Check rule's NEGATED_TIME_FRAMES flag- Returns:
- true if NEGATED_TIME_FRAMES flag set
 
- 
getGuid- Returns:
- the guid
 
- 
getRuleNumberpublic int getRuleNumber()Get rule number- Returns:
- rule number
 
- 
setRuleNumberpublic 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
 
 
-