Email integration regex only works if email is forwarded


(Anthony Drewery) #1

I have some odd behaviour with our email integration. It is set to accept all incoming email. I have the following regex to trigger an alert: /Requests Affected: (\d*)[6-9]\d/

An example string from the body of the email that would trigger is: “Requests Affected: 71.00% (115/162)”

If the email is received directly from the source system the regex won’t trigger. If I forward the email from my account it will. Is there a log where I can see why the email doesn’t trigger when sent direct?

I know that PD receives the email as I can set the service to create a generic alert of the rules aren’t matched.


(Paul) #2

Hi Anthony,

It sounds like what may be happening here is that the email is getting sent in HTML, and the HTML elements are interfering with the matching of the pattern (which is compared against the raw body of the email).

If this is the case, you will need to configure your monitoring tool to send email in plain text as well as in HTML, so that the pattern will match in at least one part of the email body. For further details on why and how this happens, see under Troubleshooting Email Management Rules in our Knowledge Base.

If you’d like us to take a look at our logs to see if this is the case or to look into it further, please send a link to the service in question and a timestamp of an event that was sent to - we’d be happy to check our logs for you.

(Anthony Drewery) #3

That was the issue. Thanks!

(system) #4