What our field technicians want in an alert email is the following:
1. The Subject should contain the following:
a. name of the site
b. name of affected device
c. alert summary: initial notification, status, update, resolution, or Scheduled Maintenance
d. ticket number
2. The body should contain inf0 about the alert, and a link to the managed services ticket system. This is normally the existing body.
3. Not sure what to put in severity. Maybe 1c should go here?
To build a meaningful subject line, critical information needs to be collected from the subject and around the body, and combined.
I think the best way to do this is using find and replace using "dot matches newline" (?s) regex option and grabbing the information needed using regex capture groups. I would also like to be able to search the entire email, instead of having to pick the subject or body.
Here's a search and replace that would yield the proper subject line for me:
Search --> (?s)(?i).*Subject: \((\d+)\) +(Verizon Initial Notification).*CPE Hostname: vumc-(\w+)-.*
Replace --> $3-ofmdf-isr-rtr0 $2 - Ticket: $1
Yields the following subject line --> flcmpblrm-ofmdf-isr-rtr0 Verizon Initial Notification - Ticket: 2013031811301177563
Here's the example Email we get from Verizon that this search in run on.
Address: 1701 DOLORES DR KISSIMMEE FL USA 34746
CustomerSite ID: vumc-flcmpblrm-1771563e001
CPE Hostname: vumc-flcmpblrm-177563
IP Address: 126.96.36.199
Alarm Information: Router Down
Date & Time of Alarm: 03/18/2013 18:15:19
Circuit ID: BCBJV2HM0001
This is an automated initial notification from Verizon Managed Network Operations.
Incident Ticket referenced in the subject line of this notification has been opened and Verizon is working to restore your service as quickly as possible.