Hi. A need to do hundred correlations. But I could have a common automation script, if I could pass parameters (int and int []) to this script.
One script to maintain is better than an hundred.
Kind regards
Hi Henri
Wale already pointed you towards an answer, I want to go into a bit more detail as this method usually opens a lot more options in the use of correlation+automation.
If this wouldn't answer your question at all, then you might want to forward your question towards your Skyline contact.
A correlation rule is mostly triggered by an alarm. This alarm holds a lot of information, e.g. Element, parameter, alarm value, severity, impactedservices,... basically (nearly?) all alarm columns found in the alarm console. All that information can be forwarded towards a script for further processing.
Special parameters available in Automation scripts | DataMiner Docs
--> Most is found in PID65006
But how to use this information?
The data is automatically forwarded, you just need to access it as shown in Example 2 of How do I retrieve the current value of a script parameter? | DataMiner Docs
ScriptParam alarmInfo = engine.GetScriptParam(65006);
string[] data = alarmInfo.Split('|');int alarmID = Convert.ToInt32(data[0]);
int dmaID = Convert.ToInt32(data[1]);
...
(see 1st link for the order)
It's unclear which parameters you want to use or how you can identify these, but using the above, there's a big chance it'll work.
Maybe the params are predefined ID's for a specific protocol, this could be identified via the element info of the alarm info.
Maybe the params are found in the alarm properties, the above is able to retrieve this as well.
Or maybe the params are simply found in the Alarm Value of the alarm info above.
Hi, Similar question answered here: Passing Script Parameters using a correlation action to C#. Hope it helps.
Hi.
It does not explain how to pass values from a correlation to an automation.
We could use memory files but then I must use 1 memory file by parameter : 7 parameters * 104 automations… It must exist a better way.
Kind regards
If I understand you correctly you are referring to memory files in automation scripts. You can access those via the GetMemory method (https://docs.dataminer.services/develop/api/types/Skyline.DataMiner.Automation.Engine.GetMemory.html#Skyline_DataMiner_Automation_Engine_GetMemory_System_String_)
Have a look at an example here : https://community.dataminer.services/question/how-to-prevent-repeated-runs-of-a-script/
Hi.
Solution found with my Skyline contact: on correlation, we select Run Script. Just after the field of the script name, there is an arrow, on that arrow we will find al the “Parameters” created on the automation.
Many thanks.