# Alert notification groups

**URL:** <https://forum.inductiveautomation.com/t/alert-notification-groups/3100>\
**Category:** Ignition\
**Created:** [July 15, 2011, 11:39am UTC](https://forum.inductiveautomation.com/t/alert-notification-groups/3100 "2011-07-15T11:39:16Z")\
**Posts on this page:** 20\
**Page:** 1

<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:** [July 15, 2011, 11:39am UTC](https://forum.inductiveautomation.com/t/alert-notification-groups/3100/1 "2011-07-15T11:39:16Z")

</div>

Im trying to better understand the group setup with the expression.

Lets say I have a few tags

mixer1/status  
mixer1/fault  
mixer2/status  
mixer2/fault

Is there a way to setup the group expression to only allow mixer2\fault to send an email?

I guess what I am after is being able to setup 1 alert notification profile that has all of my contacts and then build groups that can contain an expression that can filter down to the tag level.

also, what If I wanted to send all tags that start with mixer1?

shouldnt this expression only allow mixer1/fault to be emailed to the group

{[ITEM\_PATH]} = ‘[default]mixer1/fault’

---

<div class="post-metadata">

**Author:** ![Travis.Cox](https://avatars.discourse-cdn.com/v4/letter/t/b9bd4f/32.png) [@Travis.Cox](https://forum.inductiveautomation.com/u/Travis.Cox)\
**Post date:** [July 15, 2011, 3:02pm UTC](https://forum.inductiveautomation.com/t/alert-notification-groups/3100/2 "2011-07-15T15:02:55Z")

</div>

If you want to filter down to the tag level do the following:`{[ITEM_PATH]} = ''mixer1/fault"`To filter a group based on tags that start with mixer1 do the following:`{[ITEM_PATH]} LIKE "mixer1%"`Hope that helps.

---

<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:** [July 16, 2011, 3:07pm UTC](https://forum.inductiveautomation.com/t/alert-notification-groups/3100/3 "2011-07-16T15:07:01Z")

</div>

ok, I was able to get that to work. I have noticed something a little strange though.

it seems as though the alarm state does not change quickly enough so it is not always correct. for example, if I trigger the alarm the email message shows the alarm state as clear. If I then clear it it shows low. Ive tried changing the time deadband but that doesnt seem to make a difference.

when I watch the properties of the tag in the designer, it looks like it takes about 5-10 seconds for the alertactive and alertstate properties to change. not sure if that has something to do with it. It seems as though the email gets sent almost instantly.

---

<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:** [July 16, 2011, 3:36pm UTC](https://forum.inductiveautomation.com/t/alert-notification-groups/3100/4 "2011-07-16T15:36:51Z")

</div>

also, is there a way to get emails just based on value without setting up alerting? lets say I have a tag that doesnt have any alerting setup on it.

mixer1/batteryvoltage

Can I setup a group that looks at this tag and if its \< 12 send an email? My thoughts are centered around giving users the ability to setup custom emails that arent tied to setting up different states.

---

<div class="post-metadata">

**Author:** ![Travis.Cox](https://avatars.discourse-cdn.com/v4/letter/t/b9bd4f/32.png) [@Travis.Cox](https://forum.inductiveautomation.com/u/Travis.Cox)\
**Post date:** [July 18, 2011, 3:02pm UTC](https://forum.inductiveautomation.com/t/alert-notification-groups/3100/5 "2011-07-18T15:02:04Z")

</div>

Regarding your first question, can you post a screenshot of the alert configuration for that tag? I think you have your states mixed up. Also, what is the scan class associated with that tag (located on General tab of tag edit window)? Maybe your scan class is really slow causing the 5 second delay. We need to see more information in order to find out what is going on.

Without setting up alerting on a tag, the only way to email when a tag meets some condition is to use scripting. You can make a Gateway Event Script \> Tag Change and when the tag’s value \< 12 (for example) you can use system.net.sendEmail to send an email. The tag change script allows you to listen on multiple tags at the same time.

---

<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:** [July 18, 2011, 3:26pm UTC](https://forum.inductiveautomation.com/t/alert-notification-groups/3100/6 "2011-07-18T15:26:41Z")

</div>

here is a screenshot of the alert setup. My scan class is direct every 5 seconds.

I also tried changing the scan class to 1 second and it still does the same thing. Also, the .alertcurrentstate shows up correctly in the designer.

 ![](https://us1.discourse-cdn.com/inductiveautomation/original/1X/2aafeacdbe57d3541b2adf1bd1ea1d35907828d2.jpg)

---

<div class="post-metadata">

**Author:** ![Travis.Cox](https://avatars.discourse-cdn.com/v4/letter/t/b9bd4f/32.png) [@Travis.Cox](https://forum.inductiveautomation.com/u/Travis.Cox)\
**Post date:** [July 18, 2011, 4:25pm UTC](https://forum.inductiveautomation.com/t/alert-notification-groups/3100/7 "2011-07-18T16:25:54Z")

</div>

Since your scan class is every 5 seconds we will only evaluate the alert conditions every 5 seconds. That is why it is taking so long to see the alert active bit go high. The alarm seems configured correctly.

---

<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:** [July 18, 2011, 5:37pm UTC](https://forum.inductiveautomation.com/t/alert-notification-groups/3100/8 "2011-07-18T17:37:02Z")

</div>

I tried every second and it does the same thing. is there a way to make it wait before sending the email?

I tried adding a datediff and comparing the {[Time]} between now on second, and having it fire if \>15 but even though it showed valid, it never would send.

---

<div class="post-metadata">

**Author:** ![Travis.Cox](https://avatars.discourse-cdn.com/v4/letter/t/b9bd4f/32.png) [@Travis.Cox](https://forum.inductiveautomation.com/u/Travis.Cox)\
**Post date:** [July 18, 2011, 5:45pm UTC](https://forum.inductiveautomation.com/t/alert-notification-groups/3100/9 "2011-07-18T17:45:11Z")

</div>

That is what the time deadband is for. Set the time deadband to 15 seconds while the scan class is 1 second. You have to set it on both the low and high states.

---

<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:** [July 18, 2011, 9:41pm UTC](https://forum.inductiveautomation.com/t/alert-notification-groups/3100/10 "2011-07-18T21:41:59Z")

</div>

It still does it with the scan class set at 1 second and both time deadbands set to 15 seconds.

I setup the email to include the value of the tag, the state, the low setpoint db tag, and the high setpoint db tag.

here is the email from when I set it into alarm

Value = 136.0  
State = LOW  
low setpoint = 200  
high setpoint = 20000

here is a copy of the email that I get when it clears. note that the low setpoint is 0.

Value = 136.0  
State = LOW  
low setpoint = 0  
high setpoint = 20000

I even tried setting the scan class down to 750ms, and also using the tag.alertcurrentstate instead of the {[State]} but that made no difference. I also tried using the auto generated message, but it does the same thing. It does show that the alarm cleared, but the state still does not show up correctly.

Im not sure what else to do. 😃

---

<div class="post-metadata">

**Author:** ![Travis.Cox](https://avatars.discourse-cdn.com/v4/letter/t/b9bd4f/32.png) [@Travis.Cox](https://forum.inductiveautomation.com/u/Travis.Cox)\
**Post date:** [July 18, 2011, 10:20pm UTC](https://forum.inductiveautomation.com/t/alert-notification-groups/3100/11 "2011-07-18T22:20:42Z")

</div>

Is your low setpoint DB tag just a static tag or is it an expression?

---

<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:** [July 19, 2011, 1:36am UTC](https://forum.inductiveautomation.com/t/alert-notification-groups/3100/12 "2011-07-19T01:36:28Z")

</div>

just a static db tag.

---

<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:** [July 19, 2011, 3:00pm UTC](https://forum.inductiveautomation.com/t/alert-notification-groups/3100/13 "2011-07-19T15:00:08Z")

</div>

can I do a datediff expression in the group kind of like what I posted earlier? I have some other comm alarms that I would like to have setup to only email me if they have been down for multiple hours.

I tried this but it doesnt seem to work, I only get a alert clear email.

{[ITEM\_PATH]} like ‘%8091079/flow%’ && dateDiff({[TIME]}, now(),“hour”) \>= 2

I dont want to use the time deadband because I actually want the system to register it as an alarm right away, I just dont want to get the email unless it has been in alarm for more than 2 hours.

---

<div class="post-metadata">

**Author:** ![Travis.Cox](https://avatars.discourse-cdn.com/v4/letter/t/b9bd4f/32.png) [@Travis.Cox](https://forum.inductiveautomation.com/u/Travis.Cox)\
**Post date:** [July 19, 2011, 3:42pm UTC](https://forum.inductiveautomation.com/t/alert-notification-groups/3100/14 "2011-07-19T15:42:34Z")

</div>

You can’t do that because we only try sending out the alarm once. So with that expression it will never get sent out (only for clear).

---

<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:** [July 19, 2011, 4:29pm UTC](https://forum.inductiveautomation.com/t/alert-notification-groups/3100/15 "2011-07-19T16:29:48Z")

</div>

ok that makes sense.

any other ideas on the state?

---

<div class="post-metadata">

**Author:** ![Colby.Clegg](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/colby.clegg/32/3282_2.png) [@Colby.Clegg](https://forum.inductiveautomation.com/u/Colby.Clegg)\
**Post date:** [July 20, 2011, 4:39pm UTC](https://forum.inductiveautomation.com/t/alert-notification-groups/3100/16 "2011-07-20T16:39:02Z")

</div>

I didn’t follow this thread from the start, but I tried to read up on it and replicate the setup. I can’t re-create a problem with the state taking a long time to update, but I’m almost certainly missing some part of your setup.

Here’s one thing to check, though: Try going into the gateway turning the logger for “Alerting.AlertBus” to TRACE. This will print out the events as they’re placed on the “alert bus”, which is what all parts of the system listen to for updates about alerts. For example, the emails get sent off of it, and the status system gets updated from it. The current state property of the tag, however, does not come from the bus- it comes from inside the tag.

Try triggering a few different alerts, and observing how long the state property takes to change. You might want to drag it onto a label in a window or something to help watch it. Ideally you would also use something like WinTail on the wrapper.log file to watch the output from the logger, but if nothing else, after a few events, open that file and paste the messages into a post here.

The fact that your message shows the low setpoint to be 0 is suspicious to me. Is there anything (a script or something) writing to these setpoint tags? Also, to be clear, the alarmed tag is an OPC tag in SQLTags, right, not in a sqlbridge transaction group?

Regards,

---

<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:** [July 20, 2011, 6:14pm UTC](https://forum.inductiveautomation.com/t/alert-notification-groups/3100/17 "2011-07-20T18:14:01Z")

</div>

```auto

INFO | jvm 1 | 2011/07/20 11:52:31 | TRACE [AlertBus] [11:52:31,132]: Alert published [SQLTags.default.8091079/FLOW.LOW - 12 - 413.0 - Wed Jul 20 11:52:31 MDT 2011]
INFO | jvm 1 | 2011/07/20 11:53:11 | TRACE [AlertBus] [11:53:11,608]: Alert published [SQLTags.default.8091079/FLOW.LOW - 2 - 413.0 - Wed Jul 20 11:53:11 MDT 2011]
INFO | jvm 1 | 2011/07/20 11:53:23 | TRACE [AlertBus] [11:53:23,741]: Alert published [SQLTags.default.8091079/FLOW.LOW - 12 - 413.0 - Wed Jul 20 11:53:23 MDT 2011]
INFO | jvm 1 | 2011/07/20 11:54:01 | TRACE [AlertBus] [11:54:01,171]: Alert published [SQLTags.default.8091079/FLOW.LOW - 2 - 413.0 - Wed Jul 20 11:54:01 MDT 2011]
INFO | jvm 1 | 2011/07/20 11:58:12 | TRACE [AlertBus] [11:58:12,097]: Alert published [SQLTags.default.8091079/FLOW.LOW - 12 - 413.0 - Wed Jul 20 11:58:12 MDT 2011]
INFO | jvm 1 | 2011/07/20 12:00:15 | TRACE [AlertBus] [12:00:15,518]: Alert published [SQLTags.default.8091079/FLOW.LOW - 2 - 413.0 - Wed Jul 20 12:00:15 MDT 2011]
INFO | jvm 1 | 2011/07/20 12:00:39 | TRACE [AlertBus] [12:00:39,775]: Alert published [SQLTags.default.8091079/FLOW.LOW - 12 - 413.0 - Wed Jul 20 12:00:39 MDT 2011]       
INFO | jvm 1 | 2011/07/20 12:01:37 | TRACE [AlertBus] [12:01:37,427]: Alert published [SQLTags.default.8091079/FLOW.LOW - 13 - 413.0 - Wed Jul 20 12:01:37 MDT 2011]
INFO | jvm 1 | 2011/07/20 12:01:37 | TRACE [AlertBus] [12:01:37,427]: Alert published [SQLTags.default.8091079/FLOW.HIGH - 13 - 413.0 - Wed Jul 20 12:01:37 MDT 2011]
INFO | jvm 1 | 2011/07/20 12:02:14 | TRACE [AlertBus] [12:02:14,839]: Alert published [SQLTags.default.8091079/FLOW.LOW - 2 - 413.0 - Wed Jul 20 12:02:14 MDT 2011]
INFO | jvm 1 | 2011/07/20 12:02:24 | TRACE [AlertBus] [12:02:24,951]: Alert published [SQLTags.default.8091079/FLOW.LOW - 12 - 413.0 - Wed Jul 20 12:02:24 MDT 2011]
INFO | jvm 1 | 2011/07/20 12:02:31 | TRACE [AlertBus] [12:02:31,026]: Alert published [SQLTags.default.8091079/FLOW.LOW - 2 - 413.0 - Wed Jul 20 12:02:31 MDT 2011]
```

It looks like the state on the tag changes almost instantly once I change the setpoint.

> [@](#):
>
> The fact that your message shows the low setpoint to be 0 is suspicious to me. Is there anything (a script or something) writing to these setpoint tags? Also, to be clear, the alarmed tag is an OPC tag in SQLTags, right, not in a sqlbridge transaction group?

I was changing the low setpoint db tag back and forth between 0 and something that was higher than the value in the .flow sqltag. Thats why 0 was showing up on the clear messages.

and yes, this is an opc tag in sqltags. No scripts are using the setpoint db tags at all.

---

<div class="post-metadata">

**Author:** ![Colby.Clegg](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/colby.clegg/32/3282_2.png) [@Colby.Clegg](https://forum.inductiveautomation.com/u/Colby.Clegg)\
**Post date:** [July 20, 2011, 6:25pm UTC](https://forum.inductiveautomation.com/t/alert-notification-groups/3100/18 "2011-07-20T18:25:10Z")

</div>

Ok, for reference, the numbers after the path equate to 2=Active, 12=Cleared+Acknowledged. 1=Initialized, so 13=Cleared+Acknowledged+Initialized.

Did you turn your custom message off? The message should also be printed out there. Of course, I guess I should ask what version of Ignition this is, because it may not have always been that way… but it has been for a while.

Regards,

---

<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:** [July 20, 2011, 6:34pm UTC](https://forum.inductiveautomation.com/t/alert-notification-groups/3100/19 "2011-07-20T18:34:11Z")

</div>

yeah I had turned the custom message off, just to see if it would make a difference, which it didnt.

I am currently running 7.2.5, but will be upgrading pretty soon.

---

<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:** [July 20, 2011, 9:51pm UTC](https://forum.inductiveautomation.com/t/alert-notification-groups/3100/20 "2011-07-20T21:51:32Z")

</div>

> [@](#):
>
> INFO | jvm 1 | 2011/07/20 15:43:06 | TRACE [AlertBus] [15:43:06,403]: Alert published [SQLTags.default.8091079/FLOW.HIGH - 13 - 0.0 - Wed Jul 20 15:43:06 MDT 2011 - 8091079 Flow Alarm - Value = 0.0  
> INFO | jvm 1 | 2011/07/20 15:43:06 | State = HIGH  
> INFO | jvm 1 | 2011/07/20 15:43:06 | low setpoint = 500  
> INFO | jvm 1 | 2011/07/20 15:43:06 | high setpoint = 20000]
> 
> INFO | jvm 1 | 2011/07/20 15:43:07 | TRACE [AlertBus] [15:43:07,415]: Alert published [SQLTags.default.8091079/FLOW.LOW - 3 - 0.0 - Wed Jul 20 15:43:07 MDT 2011 - 8091079 Flow Alarm - Value = 0.0  
> INFO | jvm 1 | 2011/07/20 15:43:07 | State = LOW  
> INFO | jvm 1 | 2011/07/20 15:43:07 | low setpoint = 500  
> INFO | jvm 1 | 2011/07/20 15:43:07 | high setpoint = 20000]
> 
> INFO | jvm 1 | 2011/07/20 15:43:28 | TRACE [AlertBus] [15:43:28,658]: Alert published [SQLTags.default.8091079/FLOW.LOW - 12 - 0.0 - Wed Jul 20 15:43:28 MDT 2011 - 8091079 Flow Alarm - Value = 0.0  
> INFO | jvm 1 | 2011/07/20 15:43:28 | State = LOW  
> INFO | jvm 1 | 2011/07/20 15:43:28 | low setpoint = -1  
> INFO | jvm 1 | 2011/07/20 15:43:28 | high setpoint = 20000]  
> IN  
> INFO | jvm 1 | 2011/07/20 15:43:37 | TRACE [AlertBus] [15:43:37,555]: Alert published [SQLTags.default.8091079/FLOW.LOW - 2 - 0.0 - Wed Jul 20 15:43:37 MDT 2011 - 8091079 Flow Alarm - Value = 0.0  
> INFO | jvm 1 | 2011/07/20 15:43:37 | State = LOW  
> INFO | jvm 1 | 2011/07/20 15:43:37 | low setpoint = 500  
> INFO | jvm 1 | 2011/07/20 15:43:37 | high setpoint = 20000]
> 
> INFO | jvm 1 | 2011/07/20 15:43:43 | TRACE [AlertBus] [15:43:43,621]: Alert published [SQLTags.default.8091079/FLOW.LOW - 12 - 0.0 - Wed Jul 20 15:43:43 MDT 2011 - 8091079 Flow Alarm - Value = 0.0  
> INFO | jvm 1 | 2011/07/20 15:43:43 | State = LOW  
> INFO | jvm 1 | 2011/07/20 15:43:43 | low setpoint = -1  
> INFO | jvm 1 | 2011/07/20 15:43:43 | high setpoint = 20000]
> 
> INFO | jvm 1 | 2011/07/20 15:43:49 | TRACE [AlertBus] [15:43:49,695]: Alert published [SQLTags.default.8091079/FLOW.LOW - 2 - 0.0 - Wed Jul 20 15:43:49 MDT 2011 - 8091079 Flow Alarm - Value = 0.0  
> INFO | jvm 1 | 2011/07/20 15:43:49 | State = LOW  
> INFO | jvm 1 | 2011/07/20 15:43:49 | low setpoint = 500  
> INFO | jvm 1 | 2011/07/20 15:43:49 | high setpoint = 20000]
> 
> INFO | jvm 1 | 2011/07/20 15:43:54 | TRACE [AlertBus] [15:43:54,751]: Alert published [SQLTags.default.8091079/FLOW.LOW - 12 - 0.0 - Wed Jul 20 15:43:54 MDT 2011 - 8091079 Flow Alarm - Value = 0.0  
> INFO | jvm 1 | 2011/07/20 15:43:54 | State = LOW  
> INFO | jvm 1 | 2011/07/20 15:43:54 | low setpoint = -1  
> INFO | jvm 1 | 2011/07/20 15:43:54 | high setpoint = 20000]

Colby, I did it a few more times with the custom message and you can see it is the same result. I noticed also that for some reason it showed a high state, which I never triggered and the value never went over 20,000 which is the high setpoint. I also never saw the current state show up as high while I watched it in the designer.

[Next page](https://forum.inductiveautomation.com/t/alert-notification-groups/3100.md?page=2)
