centreon / centreon-plugins

Collection of standard plugins to discover and gather cloud-to-edge metrics and status across your whole IT infrastructure.
https://www.centreon.com
Apache License 2.0
310 stars 274 forks source link

[cloud::microsoft::office365::onedrive::plugin] - sharepoint e onedrive discovery failed #5238

Open joschi99 opened 4 days ago

joschi99 commented 4 days ago

latest plugins. The discovery of Onedrive and Sharepoint will return as last line a value like

2024-10-12,99b2a51a-06d5-4787-99db-1fe5c72f1dc6,,Roman Morandell,False,2024-10-11,374,7,257496988,1099511627776,roman.morandell@pgum.eu,7
2024-10-12,b791fb1c-3f15-4297-a220-5dedb35ac21b,,Alessio Piu,False,2024-07-23,3,0,6305758,1099511627776,alessio.piu@pgum.eu,7
2024-10-12,f20733fa-1cba-4bd7-b0eb-4e2605d11576,,Dario Bella,False,2024-09-24,121,0,3239104988,1099511627776,dario.bella@pgum.eu,7
2024-10-12,f3ebb5a8-42c5-4490-9deb-3d09617f1415,,Paolo Ferrari,False,2024-10-11,161,2,1047692096,1099511627776,paolo.ferrari@i-vertix.com,7
[owner = Paolo Ferrari] [url = ]

The last line seem's new and in the past I don't remember that was present. Could we exclude it?

lucie-dubrunfaut commented 4 days ago

Hello :)

Apparently there have been no recent changes to the Onedrive and Sharepoint plugins (apart from updating their official documentation). CF the history of listsites.pm modes: listsites-Onedrive listsites-Sharepoint

From what I can see, the last line seems to correspond to the ‘long’ message output, in other words induce by the --verboseoption. https://github.com/centreon/centreon-plugins/blob/24c47517cf554c30373fff6603dc5ef3bc2dbbf5/src/cloud/microsoft/office365/onedrive/mode/listsites.pm#L76 https://github.com/centreon/centreon-plugins/blob/24c47517cf554c30373fff6603dc5ef3bc2dbbf5/src/cloud/microsoft/office365/sharepoint/mode/listsites.pm#L82

joschi99 commented 4 days ago

There seem's something strange. when i discovery by CLI without any --verbose or --debug the I will get this output returned by --plugin=cloud::microsoft::office365::onedrive::plugin --mode=list-sites

List sites:
[owner = Paolo Ferrari] [url = ]

When I do it with --debug then I can see the hole list of Onedrives:

Report Refresh Date,Site Id,Site URL,Owner Display Name,Is Deleted,Last Activity Date,File Count,Active File Count,Storage Used (Byte),Storage Allocated (Byte),Owner Principal Name,Report Period
2024-10-12,1f92ee69-3805-4e71-bb5b-f31b609f9ad5,,Felix Geier,False,2024-10-04,328,0,987268614,1099511627776,felix.geier@pgum.eu,7
2024-10-12,36cb5e9d-4a7d-45ba-816f-e44609976862,,Sepaseh Hakiminejad,False,2024-09-30,56,0,186043593,1099511627776,sepaseh.hakiminejad@i-vertix.com,7
2024-10-12,37a1306a-9c6b-43a7-ab74-e847f9bcb1f2,,Barney Worrad,True,2024-05-27,77,0,4111522371,1099511627776,barney.worrad@i-vertix.com,7
2024-10-12,5e57b937-f921-4f35-8aaf-76350852fa2a,,Jochen Platzgummer,False,2024-10-12,934,9,23331966541,1099511627776,jochen.platzgummer@pgum.eu,7
2024-10-12,641ff9bd-c3f4-4741-9e72-dcd86113304f,,Roberto Davide Gambuti,False,2024-10-10,395,6,21548780897,1099511627776,roberto.gambuti@i-vertix.com,7
2024-10-12,6d47d5ae-a558-47c8-8331-2e5a7713158c,,Sales France,False,2023-07-17,15,0,83989978,1099511627776,sales.france@i-vertix.com,7
2024-10-12,7047746f-38cc-41b1-9fd8-3f7b6b6c6362,,Riccardo Bicelli,False,2024-10-12,5,3,1394668,1099511627776,riccardo.bicelli@pgum.eu,7
2024-10-12,87f66aa5-a461-4763-84e8-d64fe1d20306,,Karl Hafele,False,2024-10-08,7190,19,65484969477,1099511627776,karl.hafele@pgum.eu,7
2024-10-12,99b2a51a-06d5-4787-99db-1fe5c72f1dc6,,Roman Morandell,False,2024-10-11,374,7,257496988,1099511627776,roman.morandell@pgum.eu,7
2024-10-12,b791fb1c-3f15-4297-a220-5dedb35ac21b,,Alessio Piu,False,2024-07-23,3,0,6305758,1099511627776,alessio.piu@pgum.eu,7
2024-10-12,f20733fa-1cba-4bd7-b0eb-4e2605d11576,,Dario Bella,False,2024-09-24,121,0,3239104988,1099511627776,dario.bella@pgum.eu,7
2024-10-12,f3ebb5a8-42c5-4490-9deb-3d09617f1415,,Paolo Ferrari,False,2024-10-11,161,2,1047692096,1099511627776,paolo.ferrari@i-vertix.com,7
[owner = Paolo Ferrari] [url = ]

And on both outputs the last line is present.