Hi ,
In an Automation Script triggered by a Correlation Rule, how can I retrieve the username of the person who acknowledged the alarm from the Alarm Console? Using engine.UserDisplayName
only returns the Correlation Rule's name. Is there a way to access the current user's name or the 'Owner' property of the alarm?
Thanks
Hi Srimathi,
See parameter 65005 and 65006 here: https://docs.dataminer.services/user-guide/Advanced_Modules/Automation_module/Special_parameters_available_in_DMS_Automation_scripts.html.
The current owner of the alarm, is one of the fields that are available in those special parameters that are available in an automation script that is triggered from a correlation rule.
This page contains an overview of all available fields: https://docs.dataminer.services/user-guide/Advanced_Modules/Automation_module/FAQ/How_do_I_parse_Correlation_Alarm_Info_data.html.
This code fetches the owner property.
ScriptParam paramCorrelationAlarmInfo = engine.GetScriptParam(65006);
string alarmInfo = paramCorrelationAlarmInfo.Value;
string[] parts = alarmInfo.Split('|');
string owner = parts[18];
engine.Log(owner);
Is there anyway that I can get the UserDisplayName or FullName from it ?
Thanks that works !!