Hello everyone,
In my code, I would like to retrieve the Alarm State of a Service :
I have tried with the following engine methods :
However as I would like to have the alarm state of the Service, the Engine Methods are not working.
On the documentation, I have found only few Service methods : GetPropertyValue, HasProperty and SetPropertyValue.
Do you have documentation for Service Methods? Or a clue to retrieve the Alarm State of Service ?
Thank you in Advance
Hi Laurine,
Do you plan to run the script manually (or via task scheduler) to retrieve the current alarms on the service? Or do you plan to execute the automation script when there are alarms in the service?
- For the first case, I believe there is no method in the Engine class that will allow you to retrieve the current alarms in a service.
- For the second case, you could use a correlation rule that will trigger the automation script. You can pass information from the correlation rule to the automation script.
- The correlation rule can be triggered based on an alarms that impact services
- In the automation script you can use a special parameter that will contain information about the correlation rule that triggered the correlation rule (See DataMiner Help - How do I parse Correlation Alarm Info data?)
- The correlation rule can be triggered based on an alarms that impact services
Hi Laurine,
In the correlation rule, you can group alarms by service (see question in Dojo: https://community.dataminer.services/question/best-practice-with-correlation-rules/answer/41952/). When grouping by service, the correlation rule will be triggered only once (when the condition in the alarm filter is met). Parameter updates should not trigger again the correlation rule (unless the condition defined in the alarm filter is no longer met).
You can also trigger the automation script when the condition is no longer met
(see the option ‘Execute on clear’).
Hi Miguel,
For the correlation rule that send clear trap, I have tried to group alarm by service and but Alarm Type equal to Normal. However, It’s not sending the clear trap.
What I was doing before I was using the Alarm Type filter equal to Dropped from Critical, Dropped from Major. In that case, it’s sending a clear trap even if there are still some alarm on a service.
Hi Miguel,
Thank you for your reply.
I’m already using a Correlation rule with the View.
Indeed, we have many services in different views so we do not want to add a correlation rule on every services.
Moreover, the issue is when multiple parameters are in alarm we want only one Trap to be send for a service.
And when this parameter is not in alarm anymore, a Trap is send even if the other parameters in this service are still in alarm.
That’s why before sending the clear trap of the service, I would like to check if the Service is still in Alarm or not.