What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general.

Learn more

PRTG Network Monitor

Intuitive to Use. Easy to manage.
More than 500,000 users rely on Paessler PRTG every day. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free Download

Top Tags


View all Tags

Email subject processing

Votes:

0

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 prtg smtp

Created on Feb 4, 2019 8:55:24 PM



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.

Created on Feb 5, 2019 11:06:20 AM by  Dariusz Gorka [Paessler Support]



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.

Created on Feb 7, 2019 5:04:32 PM



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.

Created on Feb 7, 2019 7:27:17 PM by  Dariusz Gorka [Paessler Support]



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

Created on Feb 7, 2019 7:33:25 PM



Votes:

0

Hi there,

Then you should use a regular expression:

errors = [1-9]+

Best regards,

Created on Feb 7, 2019 8:07:03 PM by  Dariusz Gorka [Paessler Support]



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.

Created on Feb 8, 2019 9:41:27 AM by  Dariusz Gorka [Paessler Support]




Disclaimer: The information in the Paessler Knowledge Base comes without warranty of any kind. Use at your own risk. Before applying any instructions please exercise proper system administrator housekeeping. You must make sure that a proper backup of all your data is available.