# List of alarm tags

**URL:** <https://forum.inductiveautomation.com/t/list-of-alarm-tags/9607>\
**Category:** General Discussion\
**Created:** [January 27, 2015, 3:00pm UTC](https://forum.inductiveautomation.com/t/list-of-alarm-tags/9607 "2015-01-27T15:00:11Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![xion8x8](https://avatars.discourse-cdn.com/v4/letter/x/cc9497/32.png) [@xion8x8](https://forum.inductiveautomation.com/u/xion8x8)\
**Post date:** [January 27, 2015, 3:00pm UTC](https://forum.inductiveautomation.com/t/list-of-alarm-tags/9607/1 "2015-01-27T15:00:11Z")

</div>

any method to retrieve a list of alarm tags that i have configured? my system have a lot of tags and i am finding a way to list out all the available alarms in the system.

---

<div class="post-metadata">

**Author:** ![nmudge](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nmudge/32/3394_2.png) [@nmudge](https://forum.inductiveautomation.com/u/nmudge)\
**Post date:** [January 27, 2015, 3:10pm UTC](https://forum.inductiveautomation.com/t/list-of-alarm-tags/9607/2 "2015-01-27T15:10:15Z")

</div>

Perhaps you could use the [system.alarm.queryStatus()](https://support.inductiveautomation.com/usermanuals/ignition/index.html?system_alarm_querystatus.htm) function and use a wild card to get all the alarms.

Best,

---

<div class="post-metadata">

**Author:** ![diat150](https://avatars.discourse-cdn.com/v4/letter/d/a587f6/32.png) [@diat150](https://forum.inductiveautomation.com/u/diat150)\
**Post date:** [January 27, 2015, 3:29pm UTC](https://forum.inductiveautomation.com/t/list-of-alarm-tags/9607/3 "2015-01-27T15:29:21Z")

</div>

not sure if this will work in 7.7 but it will in 7.5 and 7.6 as long as you have the ialabs module. It will run thru all of your tag folders and print out the tagpath of any tag with an alarm configured and whether the alarm is analog or digital. be prepared, if you have alot of tags it will take quite a while.

```auto

tagProvider = '[put the tag provider name here]'
folder = ''
folderPath = tagProvider + folder
tags = system.tag.browseTags(tagProvider + folder,recursive=1)
for tag in tags:   
   tagAlert = system.tag.read(tagProvider + tag.path + '.alertmode').value
   if tagAlert != 0:
       if tagAlert == 1:
           print tag.path + ' = digital'
       elif tagAlert ==2:
           print tag.path + ' = analog'   

```

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [October 25, 2019, 2:19am UTC](https://forum.inductiveautomation.com/t/list-of-alarm-tags/9607/4 "2019-10-25T02:19:21Z")

</div>

For posterity:  
Using `system.alarm.queryStatus(source="*")` as Nick suggested is far quicker than using browseTags. It also gets you access to all of the alarm's configuration properties, rather than just the modified-from-default properties.

> [@Best way to generate an alarm list](http://forum.inductiveautomation.com/t/best-way-to-generate-an-alarm-list/11773/2):
>
> results = system.alarm.queryStatus(source=["\*"]) for alarm in results: print alarm.source That should do the trick. Of course that just gives the source, but you could use the alarm object to grab whatever configuration settings you wanted out of it.

---

<div class="post-metadata">

**Author:** ![cristhian.rey](https://avatars.discourse-cdn.com/v4/letter/c/0ea827/32.png) [@cristhian.rey](https://forum.inductiveautomation.com/u/cristhian.rey)\
**Post date:** [November 15, 2020, 12:50am UTC](https://forum.inductiveautomation.com/t/list-of-alarm-tags/9607/5 "2020-11-15T00:50:05Z")

</div>

Hi, How can I do that in Ignition 8.0.14? it seems that system.alarm.queryStatus() is obsolete because it throws the following error when I execute this:

system.alarm.queryStatus(state=[“ActiveUnacked”],path=["[Empresa01Tags]Area 02/Nivel"])

**Traceback (most recent call last):**  
\*\* File “”, line 3, in \*\*  
**AttributeError: ‘com.inductiveautomation.ignition.designer.gui.tool’ object has no attribute 'queryStatus’**

---

<div class="post-metadata">

**Author:** ![DavidWisely](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/davidwisely/32/10482_2.png) [@DavidWisely](https://forum.inductiveautomation.com/u/DavidWisely)\
**Post date:** [November 15, 2020, 4:44am UTC](https://forum.inductiveautomation.com/t/list-of-alarm-tags/9607/6 "2020-11-15T04:44:27Z")

</div>

I use this in 8.1.0 to get a list of the configuration of all alarms.  
Just change the folder path for your project.

```auto
def PrintAlarms():
	alarms = GetAlarmData()
	
	for alarm in alarms:
		print alarm

def GetAlarmData():
		
	alarms = []

	# tag folder
	folder = "[Default]"
	
	# read the configuration of all tags
	nodes = system.tag.getConfiguration(folder, True)
	
	# get a list of all alarms in this folder including nested tags
	alarms = GetAlarms(nodes, '')
	
	return alarms
	
# Get alarms from all tags and nested tags 
def GetAlarms(nodes, path=''):

	alarms = []
	
	# check each node
	for item in nodes:
	
		# each tag has the following keys:
		# name. 	
		# path. 	
		# tagType. 
		# tags. 	
	
		if 'name' in item:
			tagName = item['name']
		else:
			tagName = 'Unknown'
		tagType = item['tagType']
		
		if path == '':
			tagPath = str(item['path'])
		else:
			tagPath = path + '/' + str(item['path'])
	
		if 'tags' in item:
			# found some nested tags
			alarms += GetAlarms(item['tags'], tagPath)
		
		if 'alarms' in item:
			# found some alarms
			for alarm in item['alarms']:
				# add the tag details to the alarms list
				alarm['TagName'] = tagName
				alarm['TagPath'] = path
				alarms.append(alarm)
	
	return alarms

```

---

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [November 16, 2020, 1:25pm UTC](https://forum.inductiveautomation.com/t/list-of-alarm-tags/9607/7 "2020-11-16T13:25:09Z")

</div>

> [@cristhian.rey](#):
>
> it seems that system.alarm.queryStatus() is obsolete

It shoudn't be. It works on 8.1.0 Script Console. Where are you trying to use it?
