Is there a way to set up an email sensor to detect information in the subject line of an email? For example we get emails after certain processes finish and we want to monitor if it finishes with errors. I'd like to set up the sensor to alert if the email comes in with anything more than 0 errors returned, but if the email says 0 errors then don't set off the alert.
Email subject processing
Votes:
0
7 Replies
Votes:
0
Hi there,
This is what the IMAP Sensor (https://www.paessler.com/manuals/prtg/imap_sensor) is for. This allows you to check mails in a mailbox extensively. You can find an example for Backup Monitoring here:
https://kb.paessler.com/en/topic/47023-how-can-i-monitor-my-backup-software-to-be-sure-backup-succeeded-last-night
Best regards.
Votes:
0
I have the sensor set up but as far as I can see it only works searching through the subject for example if in the subject of an email "Errors = 0" then the alert will trigger. Is there a way to set up the sensor to alert if in that same example errors equal anything other than 0 then alert.
Votes:
0
Hi there,
You can adjust the search to your needs, even via regex. So you can surely use "Errors = 1". Or am I understanding something wrong? Could you post an example of a mail and what you want to actually check?
Best regards.
Votes:
0
I actually want the sensor to only alert if the email shows any errors. So for example
Errors = 0 No Alert
Errors = 4 Alert
We get emails daily and we only want the sensor to alert us if that numerical value is anything other than 0
Votes:
0
Hi there,
Then you should use a regular expression:
errors = [1-9]+ |
Best regards,
Votes:
0
Hmm I can't seem to get that to work. I have an email in the inbox with errors in the body but when I add the search body feature the sensor doesn't go off. This is the layout of the email. The regular expression and string search doesn't seem to pick up the line of total errors with the space. If I have it just search "Total Errors" it seems to detect it fine though.
Total Number of Records: 18771 Total records loaded: 18758 Total Errors: 13
Created on Feb 7, 2019 10:39:10 PM
Last change on Feb 8, 2019 9:40:15 AM by
Dariusz Gorka [Paessler Support]
Votes:
0
Hi there,
Please try the following regular expression:
Total Errors:\s+[1-9]+ |
You can test and build your own regular expressions by using this site:
https://rubular.com
Best regards.
Add comment