Recently I received the question if it is possible to monitor Azure Backup with PRTG. Now this might seem to be a bit weird, as we could use Azure monitoring. But in this case, it was a service provider that needed a single solution for all their services, including custom dashboards and monitoring.
So, challenge accepted, lets get this done! In this case the customer has a Azure Recovery Service Vault with 2 virtual machines, with a backup schedule of only once every 24 hours with a retention of 30 days.
Our goal will be to have 3 sensors in PRTG with the completed jobs, failed jobs and running jobs. If you follow the next steps you should be able to set this up your self as well.
Step 1: Create and application registration in the Azure Portal, so go to Azure Active Directory, and fill in all the required fields. Note, the Redirect URL may be completely random, but it is nice to set it to your PRTG monitoring URL. In this example its just a random address.
Step 2: Go to your created application, and go to overview. Copy the Application ID and Tenant ID to a notepad or something, we will need them later.
Step 3: Go to certificates & secrets, and create a new client secret. Make sure that you save the secret, you will not be able to read it again! You can only create a new key.
Step 4: Now go to the service recovery vault where you want to read the backups from, and assign the PRTG application the Backup Reader role.
Step 5: On your PRTG (Probe) server install the AzureRM Module using the following command:
Step 6: On your PRTG (Probe) server, we will need to create a little powershell script, and save it on the following location: C:\Program Files (x86)\PRTG Network Monitor\Custom Sensors\EXEXML\AzureBackupStatus.ps1
Step 7: The final step, go into your PRTG environment, and create a new sensor on the device where you’ve added the powershell script. Search for the EXE sensor, and create the EXE/Script Advanced Sensor.
Next step is to configure the sensor properly with the following settings: