Is there any way to list the Twilio sms message that was sent by an alarm?
I can list the unacknowledged alarms like this:
alarms = system.alarm.queryStatus(state=["ClearUnacked", "ActiveUnacked"])
for alarm in alarms:
eventName = '%s' % (alarm.getName())
eventID = '%s' % (alarm.getId())
if eventName == 'Alarm-Twilio' or 'Twilio-Alarm-Test':
But I would also like to see the sms that was sent with each alarm. Is that possible?
The only place messages used by any given alarm notification profile might show up is in the audit log, if you’ve configured one for that profile.
Thanks @Kevin.Herron I’ll take a look.
Hi @Kevin.Herron I was able to get the sms message to an audit log, but there is no mention of the alarm UUID in that log (I’m trying to match the sms to the UUID of the alarm so I can turn it off with a script). Is there any way to get the alarm UUID to be attached in the log somehow? Sorry for all the questions. Appreciate your time.
Isn’t in the “Action Target” column in a format like
alarm event '$eventSource': $eventId?
@Kevin.Herron You are totally right. I didn’t realize there was more data in there. Perfect. Thanks!