Is there a way to get the Acknowledgement Notes from when a user enters in a note and acknowledges an alarm?
I am using the system.alarm.acknowlegement function to ACK alarms. This seems to work fine, however, if I use the system.alarm.queryStatus to get the information for this alarm, I can't seem to find the note information. I can see the ACK note within the Alarm details section of the Alarm Status table so I know that it's getting set correctly.
Anyone else have this issue? Thoughts or suggestions on other ways to get this note information via script?
# Create instances list.
instances = []
user = "system"
# Get the alarm events between startDate and endDate.
alarmEvents = system.alarm.queryStatus(source='*' + path + '*',state=['ActiveUnacked', 'ActiveAcked'])
# Define map to display more user-friendly text that
# denotes the type of alarm event.
eventMap = {'Active, Unacknowledged': 'Alarm Active UnAck', 'Active, Acknowledged': 'Alarm Active Ack', 'Active': 'Alarm Active'}
# Get event type, event time, and other alarm event
# properties to create the instance, and append the
# instance to the instances list.
for alarmEvent in alarmEvents:
event = eventMap[str(alarmEvent.getState())]
eventId = alarmEvent.getId()
note = alarmEvent.getNotes()
if alarmEvent.activeData:
for item in alarmEvent.activeData:
if str(item.getProperty()) == 'eventTime':
datetime = item.getValue()
if str(item.getProperty()) == 'ackUser':
user = item.getValue()
if str(item.getProperty()) == 'label':
label = item.getValue()
I was finally able to do this with some help from one of the Devs. I couldn't find the documentation for dealing with the EventData object returned from getAckData(), but this is what the Dev suggested and I've confirmed it works. You'll want to re-write the logic for your approach.