We are trying to monitor the total number of M365 licenses to alert our team if we have too many users in M365. I have made it though the monitoring wizard, but when I run the checks, I get a 403 Forbidden error.
We are running Nagios XI 5.8.1 on RHEL 7 VM's.
Service check is :
/usr/local/nagios/libexec/check_microsoft_365.php --tenant 'SUPER_SECRET_TENANT_ID' --appid 'SECRET_APP_ID' --secret 'SECRET_VALUD' --mode 'o365activationsbyproduct' --warning ':2180' --critical ':2189' --filter ''
Attached is our permissions (User.Read has been updated to User.Read.All) and the error message.
Is there anything I am missing?
M365 monitoring
M365 monitoring
You do not have the required permissions to view the files attached to this post.
Re: M365 monitoring
Others with similar issues say this is because the permissions are marked as "Delegated" permissions.
Change them to "Application" permissions instead.
Change them to "Application" permissions instead.
If you didn't get an 8% raise over the course of the pandemic, you took a pay cut.
Discussion of wages is protected speech under the National Labor Relations Act, and no employer can tell you you can't disclose your pay with your fellow employees.
Discussion of wages is protected speech under the National Labor Relations Act, and no employer can tell you you can't disclose your pay with your fellow employees.
Re: M365 monitoring
Thank you, that did fix our connection issue.
However, I don't think I have the correct monitoring option selected.
We have been asked to monitor the number of M365 licenses in use and alert when we are close the the critical threshold. When I select the O365 Activations, it only grabs the office instances, not the M365 info.
However, I don't think I have the correct monitoring option selected.
We have been asked to monitor the number of M365 licenses in use and alert when we are close the the critical threshold. When I select the O365 Activations, it only grabs the office instances, not the M365 info.
Re: M365 monitoring
To monitor the number of active users for each product, use this command:
You may want to open up /usr/local/nagios/libexec/check_microsoft_365.php in a text editor to around line 465 to get a better idea how to monitor licenses.
Code: Select all
/usr/local/nagios/libexec/check_microsoft_365.php --tenant 'SUPER_SECRET_TENANT_ID' --appid 'SECRET_APP_ID' --secret 'SECRET_VALUD' --mode 'o365productusage' --warning ':2180' --critical ':2189' --filter ''If you didn't get an 8% raise over the course of the pandemic, you took a pay cut.
Discussion of wages is protected speech under the National Labor Relations Act, and no employer can tell you you can't disclose your pay with your fellow employees.
Discussion of wages is protected speech under the National Labor Relations Act, and no employer can tell you you can't disclose your pay with your fellow employees.
Re: M365 monitoring
Thank you.
However, this really doesn't seem to fit what I need it to do.
What I have been asked to do is alert if the total number of M365 Exchangelicenses exceeds 2189. The closest I found was the User Service Usage, however that splits based on active or inactive.
However, this really doesn't seem to fit what I need it to do.
What I have been asked to do is alert if the total number of M365 Exchangelicenses exceeds 2189. The closest I found was the User Service Usage, however that splits based on active or inactive.
You do not have the required permissions to view the files attached to this post.
Re: M365 monitoring
The number of licenses "in use" in this case is the number of active licenses.
If you didn't get an 8% raise over the course of the pandemic, you took a pay cut.
Discussion of wages is protected speech under the National Labor Relations Act, and no employer can tell you you can't disclose your pay with your fellow employees.
Discussion of wages is protected speech under the National Labor Relations Act, and no employer can tell you you can't disclose your pay with your fellow employees.
Re: M365 monitoring
So, this is odd. According to our Exchange team, they have had issues where we are "out" of M365 licenses, but the checks show inactive licenses available.
Is there any check currently available using the M365 Nagios integration to pull in the total number of Exchange licenses (Active and Inactive) to alert when that passes a specific level?
Is there any check currently available using the M365 Nagios integration to pull in the total number of Exchange licenses (Active and Inactive) to alert when that passes a specific level?
Re: M365 monitoring
Does the active count match your license count or does the active+inactive match your license count?
Re: M365 monitoring
The active + inactive matches our exchange license count.
Re: M365 monitoring
I'll need to talk with development about this but they've already left for the day.
Run this command from the CLI and send the full output (including the performance data that is output after the | character so I can see how the warning/critical affect the output)
Run this command from the CLI and send the full output (including the performance data that is output after the | character so I can see how the warning/critical affect the output)
Code: Select all
/usr/local/nagios/libexec/check_microsoft_365.php --tenant 'SUPER_SECRET_TENANT_ID' --appid 'SECRET_APP_ID' --secret 'SECRET_VALUD' --mode 'o365productusage' --warning ':2180' --critical ':2189' --filter ''