Hi,
I have a correlation rule which runs an automation script to action.
In the automation script, I use engine.GetScriptParam(65006) to retrieve the correlation alarm info but it only seems to pass a single alarm no matter how many alarms are present in the result of the rule (tested with 'Test rule' button).
I would like to pass multiple alarmInfo to the automation script so that I can deal with them at once. Could you please explain how this can be achieved from the automation script please? Thanks in advance.
Paul
Hi Paul,
There's is a concept of Buckets in Correlation, which is very well explained in the answer on the following question: Correlation - Why isn't my script executed for every new alarm? - DataMiner Dojo
Here you can see a screenshot of all grouping options: Correlation rule - When there is more than 10 alarms - Group by element - DataMiner Dojo
Here you can find the answer on how to fetch the buckets in an Automation script: Correlation - Retrieve information when Rule Condition is set to Collect events for x minutes - DataMiner Dojo
Note, that the last answer makes use of SLNET, which comes with a disclaimer.
"Note that this is an internal call, and we do not recommend using this, as it is not officially supported, and we cannot guarantee that it will still work in the future. As a rule, you should avoid using SLNet calls, as these are subject to change without notice. We recommend using instead always the correct UI or automation options provided in DataMiner Automation or through our web API."
GetCorrelationStatusMessage msg = new GetCorrelationStatusMessage
{ ID = Guid.Parse(“6fcd23cdcbaf4bf296835ba86affcd18”), };
GetCorrelationStatusResponse response = Engine.SLNet.SendSingleResponseMessage(msg) as GetCorrelationStatusResponse;
response.Status.Buckets
I think there is a problem with the line Engine.SLNet.SendSingleResponseMessage(msg) as GetCorrelationStatusResponse .
I am getting a following error.
(20,43): error CS0176: Member ‘Engine.SLNet’ cannot be accessed with an instance reference; qualify it with a type name instead
I have tried other sendMessage commands but wasn’t successful.
Are you sure that Engine is static? It should not be the object which is exposed by the Run method.
Well spotted. Silly me. It’s now resolved and working. Thanks!
Thanks Jarno for your explanation.
I think ‘GetCorrelationStatusMessage’ which is mentioned in the last link is what I need at the moment (Disclaimer noted). Are there any examples that use ‘GetcorrelationStatusMessage’ in the automation script so that I can have a look please? Thanks