I'm writing a default script that is used to send an email from alarm(s) triggered by a correlation rule.
I want to make a table in the mail with the columns (Parameter Name, Parameter Key, Parameter Value)
In the script I retrieve the Alarm Information from the special Script param 65006
Parameter Key and Parameter Value are present in that Script param, but not Parameter Name, only the ParameterID.
How do I retrieve the Parameter Name with ParameterID, so I can use it in my e-mail?
Hi Gerrit,
From your element object, that you get from engine.FindElement, you can use the following:
var parameterInfo = element.Protocol.FindParameter(paramId);
var parameterDescription = parameterInfo.Description;
Probably what you want is the parameter description as that is normally the nice readable string that is used in the user interface.
Hi Gerrit,
I found similar questions:
Parameter name from a parameter ID - DataMiner Dojo
pass parameter to automation script from correlation rule - DataMiner Dojo
Hope it helps.
Thanks for your reply., I already had seen this question and answers.
But I would rather not have to specify an extra parameter, because this will be a standard script to attach to multiple correlation rules.
The parameterID is present in the 65006 Script param.
Then you would expect it to be easy to find the name of the parameter name, using the ParameterID, AlarmID and ElementID.
Just like with elements. If you have the ElementID (also present in the 65006 script param) then you can request the element with the command engine.FindElement(DmaID, ElementID)
I hope there is a solution to easily find the name of the parameter in the alarm using the data present in the 65006 Script param.
This is exactly the answer what I was looking for.
My grandfather always said : "Once you know the answer to a question, you wonder why you couldn't have found the answer yourself"
Thanks you very much for your help.