Hi!
Alarm generation and actions are different things. For generating alarm you do not need an action - it's just special attributes in event processing policy rule. To set rule to generate alarm, do the following (assuming you already have rule object called "rule" of type EventProcessingPolicyRule):
and to set rule to terminate alarm:
Also, you can take a look at property pages in nxmc-epp plugin in management console.
Best regards,
Victor
Alarm generation and actions are different things. For generating alarm you do not need an action - it's just special attributes in event processing policy rule. To set rule to generate alarm, do the following (assuming you already have rule object called "rule" of type EventProcessingPolicyRule):
Code Select
rule.setFlags(rule.getFlags() | EventProcessingPolicyRule.GENERATE_ALARM);
rule.setAlarmMessage("%m"); // it's an example, you can specify your real alarm message here
rule.setAlarmSeverity(0); // specify your severity
rule.setAlarmKey(""); // specify alarm key
and to set rule to terminate alarm:
Code Select
rule.setFlags(rule.getFlags() | EventProcessingPolicyRule.GENERATE_ALARM);
rule.setAlarmSeverity(Severity.UNMANAGED); // Severity UNMANAGED indicates alarm termination rule
rule.setAlarmKey(""); // specify alarm key
Also, you can take a look at property pages in nxmc-epp plugin in management console.
Best regards,
Victor