Hi
I'm trying to take ownership of alarms through a LCA using a script. However, taking ownership not always works, sometimes it does, sometimes it doesn't.
I'm passing the alarm IDs from my GQI query row with format : 17/68490133
This is my script
private void RunSafe(IEngine engine)
{
// TODO: Define code here
//_engine.GetDms().
string alarmIDstring = engine.GetScriptParam("Alarm ID")?.Value;
string alarmID = JsonConvert.DeserializeObject<List<string>>(alarmIDstring)[0];
engine.GenerateInformation($"Parameter value: {alarmID}");
var alarmIDsplit = alarmID.Split('/');
string alarmDmAgent = alarmIDsplit[0];
string alarmIDparsed = alarmIDsplit[1];
engine.GenerateInformation($"Taking Alarm ownership through app: DmAgent {alarmDmAgent}, AlarmID: {alarmIDparsed}");
engine.AcknowledgeAlarm(int.Parse(alarmDmAgent), int.Parse(alarmIDparsed), "Alarm acknowledged through script.");
//engine.AcknowledgeAlarm(1, int.Parse(alarmIDparsed), "Alarm acknowledged through script.");
}
Kind regards,
Jonas
Hi Miguel, thanks for your response. It made me realize the problem.
I’m taking ownership, which results in a new alarm instead of taking ownership of the actual alarm shown in my table. However, the new alarm is not directly visible through the GQI query unfortunately. Might you have any idea about the data updates behind the Get Alarms in GQI?
Kind regards,
Jonas
Hi Jonas, there are currently no plans for adding realtime updates to the ‘Get alarms’ data source in GQI. In order to see the latest alarms after taking ownership, you will have to refetch the data. This can, for example, be done through a component action. Best regards, Ward
I get the impression that this question has already been answered in the comments. If this is indeed the case, could you select this answer to indicate that the question can be closed?
Hi Jonas,
Could it be the case that the alarm that you are trying to take ownership was already updated? When an alarm is updated (e.g. severity update, alarm property update, element property update, etc.) DataMiner will create a new alarm ID record.