In my daily job i use prtg to monitor all my enterprise it system. and now we are going to migrate our exchange 2010 to office365.
We quickly needed to be able to monitor the proper functioning of office365 I had to find a solution for that. So I found this post : https://www.team-debold.de/2016/07/22/prtg-office-365-status-ueberwachen/ from Marc’s IT BLOG I followed the procedure with google translate and now my prtg monitor my office 365.
Today I translate the article in English
First step download the powershell script and the ovl files here : https://github.com/debold/PRTG-O365Monitoring
Drop the powershell file in C:\Program Files (x86)\PRTG Network Monitor\Custom Sensors\EXEXML
and drop the ovl file in C:\Program Files (x86)\PRTG Network Monitor\lookups\custom
now load the ovl files PRTG ⇒ setup ⇒ system administration ⇒ administrative tools ⇒ load lookups and file lists ⇒ Go!
Office 365 preparation
Click on New registration
Set the description and the expires time
copy your secret in a safe place
So now we need to autorise our api to get informations from our organisation
Go to this url https://login.windows.net/common/oauth2/authorize?response_type=code&resource=https%3A%2F%2Fmanage.office.com&client_id=your_client_id
PRTG Sensor creation
For the sensor creation you need your clientID,Client secret, Tenant ID from previous steps
- Create a xmlexesensor
- in the EXE/Script field selsect Get-Office365Status.ps1
- in the Parameters field -ClientID <your client id> -ClientSecret <your secret> -TenantIdentifier <your tenant id>
- Powershell must be run in a version 3.0 or higer
The powershell execution policy must be RemoteSigned Set-ExecutionPolicy RemoteSigned -Force
- If there is still a message that the script has not been signed, then really run the 32 bit version of the Power Shell.
- Do not forget the secret expiry