Before being able to supervise an Office 365 subscription, it is necessary to set up the prerequisites described in the documentation : Requirements for Azure and Office365 monitoring.
What can be supervised?
The Office 365 web portal provides reports on the usage of the different services available.
These reports are visible in the Office 365 Administration Center in the "Reports" tab -> "Usage".
The following services provide reports on their usage.
- Office 365
- Skype Business
Full API documentation: https://docs.microsoft.com/en-us/graph/api/resources/report?view=graph-rest-1.0.
How do I get these metrics?
Overall service usage data
In general, these are the metrics visible on the graphs.
Example on OneDrive:
Number of files by type of activity.
Example on Exchange:
Number of shares by type.
These two examples can be found in the Microsoft Graph API documentation:
- Number of files by type of activity : https://docs.microsoft.com/en-us/graph/api/reportroot-getonedriveactivityusercounts?view=graph-rest-1.0&tabs=c
- Number of shares per type : https://docs.microsoft.com/en-us/graph/api/reportroot-getemailactivitycounts?view=graph-rest-1.0&tabs=cs
The API response does contain the same information as on the web interface graph:
For OneDrive, there are the fields: View or Edit, Synchronized, Shared internally, Shared externally.
Service usage data per user
These are the metrics in the tables below the charts.
They provide information on the use of the service for each user.
Example on OneDrive:
Number of files per activity type for each user.
There is one line per user.
At the API level, on the Microsoft site for this example: https://docs.microsoft.com/en-us/graph/api/reportroot-getonedriveactivityuserdetail?view=graph-rest-1.0&tabs=cs
The API response contains the "User Principal Name" field, indicating that there will be one line per user.
You can find the fields present in the table visible on the web interface.
Which plugin to use?
Available since version 4.1, ServiceNav offers the Office365-Generic to collect the aggregate usage data of a service.
The supervision of service usage data per user will be possible in a service model available in a future release.
How to use the Office365-Generic template
As mentioned above, the Office365-Generic service model allows you to monitor only the overall usage data of a service.
How to determine if a metric is available via this plugin or not?
There are two ways to do this:
- If the information is visible from the web portal on a graph, then it can be collected by the Office365-Generic plugin.
Example for Office365 license activation:
- Go to the Microsoft Graph API. Select the service and the metric to be monitored.
For example, the number of activations of Office licenses365 :
If there is no "User Principal Name" field in the response, then monitoring is possible with the Office365-Generic service model.
Once we are sure that the metric is compatible with the plugin, we can move on to setting up the checkpoint.
Setting the inspection point
First of all, it is necessary to add a "virtual" device that is not pingable in order to attach the Office365 services to it
The checkpoint is meant to be as generic as possible to retrieve the maximum amount of information. It will thus be necessary to parameterize it according to the need.
In the following example, we will monitor the global storage used by the OneDrive service.
The parameters of the checkpoint are as follows:
- Parameter " API request ". Query fragment: query that the plugin will use to collect the metric. This query fragment is present in the title of each Office 365 metric documentation:
- Parameter "Fields to be processed CSV field : CSV field returned by the API to be taken into account. Each Office 365 service has its own CSV fields visible on the documentation.
In our example, 5 fields are available:
It is possible to fill several fields separated by the pipe symbol " | " in case the plugin has to make a calculation. The values will be stored in variables $VAR1, $VAR2, $VAR3, etc... according to the order defined in the parameter.
- Calculation" parameter calculation to be performed on the recovered value(s). Possible to make a calculation to change the unit.
In our example the value is in Bytes, it is transformed into Terabytes thanks to the calculation " $VAR1/1024**4 ".
Note: the "Power" operator is written : **.
It is possible to perform calculations between different values from the different fields in the "Fields to be processed" parameter. Example: $VAR2*100/$VAR1
- Performance data" parameter Name of the performance data for the metrics graphs.
- Text output" parameter Text displayed in the ServiceNav web interface. The $RESULT variable contains the value retrieved by the plugin or the result of the calculation performed in the "Calculation" parameter.
Result on ServiceNav :
Information display thanks to Dataviz.