# Is it possible to have dynamic content in custom alerts? alertd/snmp

**URL:** <https://community.f5.com/t/is-it-possible-to-have-dynamic-content-in-custom-alerts-alertd-snmp/61543>\
**Category:** Technical Forums\
**Tags:** big-ip, syslog, snmp, application-delivery\
**Created:** [January 16, 2020, 6:14am UTC](https://community.f5.com/t/is-it-possible-to-have-dynamic-content-in-custom-alerts-alertd-snmp/61543 "2020-01-16T06:14:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rob\_carr](https://avatars.discourse-cdn.com/v4/letter/r/a87d85/32.png) [@rob\_carr](https://community.f5.com/u/rob_carr)\
**Post date:** [January 16, 2020, 6:14am UTC](https://community.f5.com/t/is-it-possible-to-have-dynamic-content-in-custom-alerts-alertd-snmp/61543/1 "2020-01-16T06:14:37Z")

</div>

alertd uses patterns to match input received from syslog to specific alerts (explained [here](https://support.f5.com/csp/article/K6420)). Is it possible to use elements of the match in the alertd output?

Given a log entry ‘Feb 18 17:29:03 tmm tmm[22973]: 01230002:4: Interface 0.3: link is down’, which alertd matches based on the pattern “Interface %d.%d: link is down”, I’d like to be able to extract the digit characters and inject them into the body of an email alert being sent.

---

<div class="post-metadata">

**Author:** ![PeteWhite](https://d1p9zq3aats0t8.cloudfront.net/user_avatar/community.f5.com/petewhite/32/33768_2.png) [@PeteWhite](https://community.f5.com/u/PeteWhite)\
**Post date:** [January 18, 2020, 9:50pm UTC](https://community.f5.com/t/is-it-possible-to-have-dynamic-content-in-custom-alerts-alertd-snmp/61543/2 "2020-01-18T21:50:57Z")

</div>

That’s a very interesting question - i haven’t done it but the alert uses regex to detect the correct log so if you had ‘Interface (.\*?): link is down’ then it may appear as $1

eg

```tcl
alert ALERT_NAME "Interface (.*?): link is down" {
email toaddress="myemail@somewhere.com"
fromaddress="root"
body="Link $1 is down"
}

```

Give it a try and let me know

---

<div class="post-metadata">

**Author:** ![boneyard](https://d1p9zq3aats0t8.cloudfront.net/user_avatar/community.f5.com/boneyard/32/20419_2.png) [@boneyard](https://community.f5.com/u/boneyard)\
**Post date:** [May 1, 2020, 4:40pm UTC](https://community.f5.com/t/is-it-possible-to-have-dynamic-content-in-custom-alerts-alertd-snmp/61543/3 "2020-05-01T16:40:52Z")

</div>

had to try this but not the effect you hoped for, emails contains

Link $1 is down
