PRTG IMAP Sensor: The way to monitor ANY backup job

PRTG IMAP sensor checks the content of email notifications triggered by the backup server, looks for certain keywords and changes the sensor state accordingly. You can read about the procedure, but also see how to configure SMTP settings in Altaro VM Backup and Windows Server Backup.

PRTG Network Monitors enables you to monitor your backup operations and keep an eye on the health state of your backup jobs. The monitoring can be done by using different technologies, from event logs to API. You can even develop a script that will check specific backup metrics, import it to the PRTG, and visualize it in the sensor. I recently published an article Monitoring Altaro VM Backup Jobs with PRTG where I explained both approaches.

Today’s approach will be a bit different, a universal one that can be used to monitor ANY backup solution by using a PRTG IMAP sensor. PRTG IMAP sensor monitors an email server using the Internet Message Access Protocol (IMAP). Once the backup server triggers email notification upon successful or failed backup operations, the PRTG IMAP sensor checks email content, looks for specific keywords and changes the sensor state accordingly. In other words, your backup server sends an email notification upon the failed backup job, the PRTG IMAP sensor looks for the keyword “failed” in the subject or body message, puts the sensor into a down state and informs the IT Admin.

Source: www.Paessler.com
WHAT IF YOUR BACKUP server DOESN’T SUPPORT SMTP?

Nowadays, it is common that commercial backup solutions support email notifications. But it also might happen just the opposite, such as with Windows Server Backup. Windows Server Backup doesn’t support email notification, but it can generate log entries upon every successful or failed backup job. In combination with the PowerShell script, Task Scheduler can trigger email notification and the PRTG IMAP sensor can search for the keywords. You can read more in my article Windows Server Backup: Configure Email Notifications.

THREE STEPS TO SUCCESSFUL BACKUP MONITORING

There are three steps involved in this procedure. In the first place, you need to have a dedicated email account that is only checked by PRTG. The email notification might look like as in the screenshot below.

Email notification sent by backup server

Secondly, you need to configure the SMTP server on your backup server. As a sample, I´ll use Altaro VM Backup. Altaro VM Backup is a powerful and easy to use backup solution for virtual machines hosted on VMware and Hyper-V. The configuration procedure is as follows:

  1. Connect to Altaro server using Altaro Management Console
  2. Expand Setup and then choose Notifications > Email Notification Settings
  3. Select Send Email notifications for completed operations. In the case below, Altaro VM Backup will send email notifications for successful and failed offsite backups.
  4. Configure the SMTP Server by adding the following parameters: SMTP server address, SMTP port, use SSL encryption, credentials, the email address used to send email notifications and list of recipients.
Configure SMTP Server in Altaro VM Backup

In the third, the last step, you will need to add PRTG IMAP sensor to PRTG and configure it accordingly.

  1. Add a new device to PRTG, use the DNS name of your SMTP server, e.g. smtp.company.com
  2. Add IMAP sensor to the parent device. This sensor has a medium performance impact. The procedure of adding IMAP sensor is shown below.
Add IMAP sensor

3. Configure IMAP Sensor and corresponding parameters. In my case, PRTG IMAP will detect failed backup jobs, send the sensor into down state and inform me accordingly. In order to make it work, you will need to select and configure the following parameters.

  • Sensor Behavior > Process emails in this mailbox. Log in to the IMAP email account and check the emails that it contains. Define further options below.
  • Authentication – specify credentials and enter the name of the folder (for example, the IMAP folder) that the sensor will check. The default value is Inbox. Unless you set a last message date check below, the sensor always looks at all emails contained in the mailbox. In my case, it will check “Inbox“.
  • Filter Emails in Inbox > Maximum Age in Hours. Enter the maximum age in hours, in my case 24 hours.
  • Validate Latest Email > For the Latest Email that Matches, Set Sensor to “Down” Status > If subject does not contain. PRTG will set the sensor to the Down status if the subject of the found email does not contain the search text you define below.
  • Validate Latest Email > Search Method > Simple string search. The IMAP sensor will search the email subject or body with a simple string in plain text.
  • Validate Latest Email > Search String. Enter a simple string in plain text or a regular expression to search the email subject or body for. In my case, it is the keyword “Successful”. That means, if there is not “Successful” in the subject, backup failed.
  • Validate Latest Email > Error Message. Enter a message that the sensor will show for a Down status.
The procedure of adding PRTG IMAP sensor

The full configuration is shown in the screenshot below.

PRTG IMAP sensor configuration

THE RESULT

If backup is operating fine, PRTG IMAP sensor will be in UP state.

Successful Backup Job

…and if it fails, PRTG IMAP sensor goes in down state.

Failed Backup Job

This seems very practical solution for monitoring backup jobs. Thank you for reading this article. In case of any questions, feel free to comment or contact me.

Leave a Reply

Your email address will not be published.

Share via
Copy link
Powered by Social Snap