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
Modifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
-
Constructor Summary
ConstructorDescriptionCreate empty ruleEventProcessingPolicyRule
(NXCPMessage msg, int ruleNumber) Create rule from NXCP message.Copy constructor -
Method Summary
Modifier and TypeMethodDescriptionvoid
fillMessage
(NXCPMessage msg) Fill NXCP message with rule's dataint
long
Get rule's comments.int
getFlags()
getGuid()
Get name of root cause analysis script.int
Get rule numberboolean
Check rule's DISABLED flagboolean
Check rule's NEGATED_EVENTS flagboolean
Check rule's NEGATED_SOURCE flagboolean
Check rule's NEGATED_TIME_FRAMES flagvoid
removeAlarmCategory
(Long categoryId) Remove specific alarm category from categories listvoid
setActions
(List<ActionExecutionConfiguration> actions) void
setActionScript
(String actionScript) void
setAlarmCategories
(List<Long> alarmCategoryIds) void
setAlarmKey
(String alarmKey) void
setAlarmMessage
(String alarmMessage) void
setAlarmSeverity
(Severity alarmSeverity) void
setAlarmTimeout
(int alarmTimeout) void
setAlarmTimeoutEvent
(long alarmTimeoutEvent) void
setComments
(String comments) Set rule's comments.void
setCustomAttributeStorageDelete
(List<String> customAttributeStorageDelete) void
setCustomAttributeStorageSet
(Map<String, String> customAttributeStorageSet) void
void
setFilterScript
(String script) void
setFlags
(int flags) void
setPStorageDelete
(List<String> persistentStorageDelete) void
setPStorageSet
(Map<String, String> persistentStorageSet) void
setRcaScriptName
(String rcaScriptName) Set name of root cause analysis script.void
setRuleNumber
(int ruleNumber) Set rule numbervoid
setSourceExclusions
(List<Long> sourceExclusions) void
setSources
(List<Long> sources) void
setTimeFrames
(List<TimeFrame> timeFrames) void
setTimerCancellations
(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:
-
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 long getAlarmTimeoutEvent()- Returns:
- the alarmTimeoutEvent
-
setAlarmTimeoutEvent
public void setAlarmTimeoutEvent(long 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
-