def print_triggered_alarms(entity=None):
    alarms = entity.triggeredAlarmState
    for alarm in alarms:
        print("#"*40)
        # The alarm key looks like alarm-101.host-95
        print("alarm_moref: {0}".format(alarm.key.split('.')[0]))
        print("alarm status: {0}".format(alarm.overallStatus))
This is a useful method if you need to print out the alarm morefs
dataset/ETHPy150Open vmware/pyvmomi-community-samples/samples/tools/alarm.py/print_triggered_alarms