Forum Discussion
rob_carr
Jan 16, 2020Cirrostratus
Is it possible to have dynamic content in custom alerts? alertd/snmp
alertd uses patterns to match input received from syslog to specific alerts (explained here). Is it possible to use elements of the match in the alertd output? Given a log entry 'Feb 18 17:29:03 ...
PeteWhite
Employee
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
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
boneyard
May 01, 2020MVP
had to try this but not the effect you hoped for, emails contains
Link $1 is down
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects