centreon-plugins icon indicating copy to clipboard operation
centreon-plugins copied to clipboard

O365 New mode : Check licence quantity

Open Nasroxy opened this issue 4 years ago • 2 comments

Hi, We need a new mode for centreon-plugins/cloud/microsoft/office365/. We wish check the number of licence in the admin interface et make a alarme by thresold, and to have performance da ta for following this.

Today, we can obtain this information with pssession in powershell

New-PsSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $cred -Authentication Basic -AllowRedirection

When we have connected, the interesting command is : Get-MsolAccountSku

The result is an object with some elements necessary for us :

  • SkuPartNumber : Name of licence, is it possible to make a filter like other check in regex?
  • ActiveUnits : Quantity licence buy, the value can be value max in performance data
  • ConsumedUnts : Quantity licence currenly used. the value may be used in performance data. Is it possible to make treshold in the quantity of licence? (in number or percent)

Thank you

Nasroxy avatar Aug 11 '21 13:08 Nasroxy

I had a look at this in the past, required API endpoints are here : https://docs.microsoft.com/en-us/graph/api/subscribedsku-list?view=graph-rest-1.0ah It's then possible to enhance existing cloud::microsoft::office365::custom::graphapi.

UrBnW avatar Aug 11 '21 14:08 UrBnW

Hi,

If you're still interested in this one, and available to test our development, we could add this to the backlog.

We will use the Graph API as suggested by @UrBnW .

Can you confirm you're still interested in getting such monitoring probe?

Sims24 avatar Jul 29 '22 12:07 Sims24

https://github.com/centreon/centreon-plugins/pull/4090

garnier-quentin avatar Dec 06 '22 10:12 garnier-quentin