Applications Systems
Tips for using Microsoft Office 365 application monitor templates in SAM
This article provides tips for using SAM's Office 365 application monitor templates regarding scripts, authentication, responsiveness, and queries.
First published date
Last published date
Overview
As described in Using Microsoft Office 365 templates, SAM includes out-of-the-box application monitor templates that you can use to monitor and gather metrics for your Office 365 subscription services. This article describes how you can get the most out of these templates, including how to:
- Access scripts for component monitors
- Handle authentication for custom PowerShell scripts
- Determine the responsiveness of Office 365
- Improve responsiveness to queries by polling less frequently
- Use Local Host for Execution mode
- Query for information
To see how other SAM customers leverage Office 365 templates, visit the SolarWinds online IT community, THWACK.
Note: This article applies to Office 365 templates introduced in SAM 6.5. For templates released in SAM 6.9 that integrate with Microsoft Graph, refer to the following links:
- Microsoft Office 365 OneDrive
- Microsoft Office 365 SharePoint Online
- Microsoft Office 365 Skype
- Microsoft Office 365 Skype for Business
- Microsoft Office 365 Teams
Note: The following templates were deprecated in SAM 2020.2 due to Microsoft end-of-support for Basic Authentication in Exchange Online APIs. Consider using API poller templates instead.
- Microsoft Office 365 Exchange Online
- Microsoft Office 365 Mobile Device Management
- Microsoft Office 365 Portal
- Microsoft Office 365 Subscription
Product section
Resolution
Access scripts for component monitors
Want to know exactly what a component monitor in an Office 365 application monitor template does? Go to the Manage Templates page, select a template, click Edit, and expand the Details view for a component monitor. The following example shows part of the Sign-in component monitor's script in SAM's Microsoft Office 365 Exchange Online template.
Handle authentication for custom PowerShell Scripts
If you edit Office 365 templates, note that you must acquire Office 365 credentials with Get-Credential before using it in a PowerShell cmdlet, as shown here:
$cred = Get-Credential -Credential ${CREDENTIAL}
# use the $cred variable here with the -Credential option
Determine the responsiveness of Office 365 nodes
If you set up an Office 365 template for ICMP polling instead of External polling, SAM can retrieve the basic Up/Down status of the node based on a ping. External nodes always display a purple icon without status because nodes assigned to the api.admin.microsoftonline.com URL doesn't respond to ping requests. See Microsoft Office 365 template FAQs.
Here are the external node and ICMP node icons, for comparison:
NOTE: If you use ICMP as the polling method, use the Dynamic IP Address option so SAM updates nodes automatically if the IP address changes. Otherwise, SAM binds to the first IP address that resolves and won't update automatically if that IP address changes.
To monitor Office 365 applications on a node, select External as the polling method. Another way to determine Office 365 application responsiveness is to set up NetPath service for outlook.office365.com. If you use NetPath with SolarWinds Network Performance Monitor (NPM), you'll get a detailed view of the bottlenecks between your site and the Orion Web Console.
Improve responsiveness to queries by polling less frequently
Depending on the number of mailboxes (and templates) in your environment, Office 365 APIs may throttle requests. If that occurs, either cut back on component monitors or reduce the polling frequency on templates.
It's OK to reduce the polling frequency substantially on most or all Office 365 templates since the majority of the metrics don't change frequently.
If you want enough data points to avoid gaps in history, use less than an hour for your polling frequency. Try setting the frequency to 1200 (20 minutes) rather than the default of 300 (5 minutes). See Avoid getting throttled or blocked in SharePoint Online (© 2017 Microsoft, available at https://docs.microsoft.com, obtained on June 12, 2018). The article is about SharePoint but the concept is the same for Office 365.
Use Local Host for Execution mode
As mentioned earlier, you can configure an Office 365 node to use ICMP polling so SAM node can ping for Up/Down status. To boost script performance, adjust component monitors to use Local Host for the Execution Mode so PowerShell scripts execute on the local Orion server and return results from external Office 365 APIs faster. To learn more, see SAM Script Monitors 'LocalHost' vs Remote Host Execution Explained.
Query for information
With SAM's Office 365 templates, you can access the same commands used when running the Exchange PowerShell module locally to gather valuable monitoring data from numerous sources. See the Working with Office 365 via PowerShell article in our online IT community, THWACK.
For example, create a PowerShell session to connect to Office 365, import that session into your current session, provide credentials in UPN format (username@domain), and then run this query to collect metrics about inactive mailboxes:
$inactiveMailboxes = Get-Mailbox -InactiveMailboxOnly
Note: Starting in SAM 2020.2.5, apiversion=v1.0 is required in PowerShell scripts for the Microsoft Office 365 Teams and Microsoft Office 365 OneDrive application monitor templates, including related application monitors. Otherwise, scripts return [ERROR] The remote server returned an error: (404) Not Found. messages. Alternatively, use one of the Microsoft 365 API poller templates.
Disclaimer: Please note, any content related to third-party products posted herein is provided as a suggestion or recommendation to you for your internal use. Your organization should internally review and assess to what extent, if any, such custom scripts or recommendations will be incorporated into your environment. You elect to use third party content at your own risk, and you will be solely responsible for the incorporation of the same, if any.
The scripts are not supported under any SolarWinds support program or service. The scripts are provided AS IS without warranty of any kind. SolarWinds further disclaims all warranties including, without limitation, any implied warranties of merchantability or of fitness for a particular purpose. The risk arising out of the use or performance of the scripts and documentation stays with you. In no event shall SolarWinds or anyone else involved in the creation, production, or delivery of the scripts be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the scripts or documentation.