# Get Source Tag Provider when Using Remote Gateway Notification Profile

**URL:** <https://forum.inductiveautomation.com/t/get-source-tag-provider-when-using-remote-gateway-notification-profile/112142>\
**Category:** Ignition\
**Tags:** scripting, perspective\
**Created:** [November 12, 2025, 10:08pm UTC](https://forum.inductiveautomation.com/t/get-source-tag-provider-when-using-remote-gateway-notification-profile/112142 "2025-11-12T22:08:32Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![lhalverson](https://avatars.discourse-cdn.com/v4/letter/l/b5ac83/32.png) [@lhalverson](https://forum.inductiveautomation.com/u/lhalverson)\
**Post date:** [November 12, 2025, 10:08pm UTC](https://forum.inductiveautomation.com/t/get-source-tag-provider-when-using-remote-gateway-notification-profile/112142/1 "2025-11-12T22:08:32Z")

</div>

Hello,

I’m running into an issue with remote gateway notification profiles where I can’t determine the source gateway the tag lives on from the AlarmEvent object. I have two gateways: FE, and IO1. The FE gateway hosts the alarm pipelines. The IO1 gateway has a remote gateway notification connection.

On the host gateway, when the alarm on a tag named frontEndAlarmTester alarms, this is the event object:

`Event[name=Alarm, source=prov:default:/tag:frontendAlarmTester:/alm:Alarm, priority=Low, desc=null]`

On the remote gateway, when the alarm on a tag in their default tag provider named io1AlarmTester alarms, this is the event object:

`Event[name=Alarm, source=prov:default:/tag:io1AlarmTester:/alm:Alarm, priority=Low, desc=null]`

Is there any other way to distinguish where an alarm in the pipeline originates from? That is, getting the gateway name or what have you?

---

<div class="post-metadata">

**Author:** ![drojas](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/drojas/32/3403_2.png) [@drojas](https://forum.inductiveautomation.com/u/drojas)\
**Post date:** [November 13, 2025, 2:52am UTC](https://forum.inductiveautomation.com/t/get-source-tag-provider-when-using-remote-gateway-notification-profile/112142/2 "2025-11-13T02:52:36Z")

</div>

We do this all the time, but our remote gateways alarm tag use the gateway name in the Display Path of the alarm. Then on the notification profile, we extract the gateway name from this property.

---

<div class="post-metadata">

**Author:** ![lhalverson](https://avatars.discourse-cdn.com/v4/letter/l/b5ac83/32.png) [@lhalverson](https://forum.inductiveautomation.com/u/lhalverson)\
**Post date:** [November 13, 2025, 4:43pm UTC](https://forum.inductiveautomation.com/t/get-source-tag-provider-when-using-remote-gateway-notification-profile/112142/3 "2025-11-13T16:43:24Z")

</div>

That’s clever. Unfortunately, I ran into this problem too late into construction to have a well-thought out solution like that, lol.

For anyone else in this predicament, here’s what I ended up doing:

```python
def resolveTagProvider(pathToTag):
	
    # List of all remote tag providers the front-end has access to.
    tagProviders = [
		'[tagProviderA]',
		'[tagProviderB]',
	] 
	
	for tagProvider in tagProviders:
		try:
			quality = system.tag.readBlocking('{}{}'.format(tagProvider, pathToTag))[0].quality
			if str(quality) == 'Good': return tagProvider
		except:
			continue
	
	return '[default]'

```

I get the source tagPath from the AlarmEvent, then try making a read as if the tag exists in each provider. Only the read() made to the tagProvider the tag actually exists in will return a Good quality, so we know that is the correct provider.

I don’t like having to make so many read() calls, especially if this pipeline is to run often. If there is a better solution, I’m all ears.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [November 13, 2025, 4:59pm UTC](https://forum.inductiveautomation.com/t/get-source-tag-provider-when-using-remote-gateway-notification-profile/112142/4 "2025-11-13T16:59:29Z")

</div>

> **[system.tag.exists | Ignition User Manual](https://www.docs.inductiveautomation.com/docs/8.3/appendix/scripting-functions/system-tag/system-tag-exists)**
>
> Checks whether or not a tag with a given path exists.

Not _much_ better, but should be a little bit faster.

I'd also recommend making your method accept a list of paths so you can batch calls. `system.tag.exists` actually doesn't accept a list, but "under the hood" all it's doing is a read of the `.Name` property (and checking that the returned quality is not "Bad\_NotFound").

This particular line is also inefficient:

```python
if str(quality) == 'Good':

```

[`QualityCode`](https://files.inductiveautomation.com/sdk/javadoc/ignition81/8.1.50/com/inductiveautomation/ignition/common/model/values/QualityCode.html) objects are rich objects with their own methods - you could instead do `if quality.isGood():`

---

<div class="post-metadata">

**Author:** ![drojas](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/drojas/32/3403_2.png) [@drojas](https://forum.inductiveautomation.com/u/drojas)\
**Post date:** [November 13, 2025, 5:07pm UTC](https://forum.inductiveautomation.com/t/get-source-tag-provider-when-using-remote-gateway-notification-profile/112142/5 "2025-11-13T17:07:26Z")

</div>

The other thing is to perhaps create multiple alarm notification pipelines and have each gateway send alarms to their own pipeline. I know this seems like duplicating the same thing…but, in our case, we have multiple remote edge installs and if they all go to the same pipeline, there are times when consolidated alarms mixes multiple sites together. To prevent this, we create an ANP for each remote site in a dedicated project called Alarming or Alarms.
