This is a script for generating an APM template for monitoring O365 services in Solarwinds.
This is a mostly rewritten template of this one from Thwack. I had to rewrite it to support ignoring "Advisory" messages.
The services monitored can be found in the data/o365-services.json file.
- Check Prerequisites
- Either Download the template or build it yourself
- Import it to Solarwinds
- Azure AAD Application
- With these permissions granted:
- Reports.Read.All [Delegated]
- Reports.Read.All [Application]
- ServiceHealth.Read [Application]
- Tenant ID
- Application ID
- Application Secret
- With these permissions granted:
- NodeJS (If you are going to build the template yourself)
You can download the template from the releases page under assets.
Now search & replace <Tenant-ID>
with your Azure AAD Tenant-ID in the template file. Or you will have to do it manually in SW.
# Clone the repo
git clone https://github.com/vtfk/solarwinds-o365-monitoring
cd solarwinds-o365-monitoring
# Copy the template.env file
cp template.env .env
# Open the .env file and add your Azure Tenant-ID.
vim .env
# Install dependencies
npm i
# Build the template
npm start
- Go to "SAM Settings".
- Then "Manage Templates" under "APPLICATION MONITOR TEMPLATES".
- Import the file from the toolbar (at the top of the table).
- Go to "Manage Nodes"
- Click "Add Node"
- Hostname/IP can be anything valid (not used). Eg. "status.office.com".
- Polling Method should be "External Node".
- Polling Engine should be a server with Powershell installed.
- Click next.
- Show only the tag "Office 365" and choose the "Office 365 Service Health Status" template.
- Add new credentials where
- User Name: Application ID
- Password: Application Secret
- Click "Test" and all components should start testing. (If it fails with a "400 Bad request", check if you replaced the
<Tenant-ID>
in the template) - Click "Next", and now you have access to all the components.
By default it ignores messages with the classification "Advisory". If you pass "true" as a third argument to the script in Solarwinds, it will include them.