Page 1 of 1
Nagios 5.8 Office 365 alerts
Posted: Fri Jan 29, 2021 4:16 pm
by newportsystem
I updated our Nagios XI server to 5.8 and started to configure the Office 365. I add one mailbox to try it. This mailbox is a 50gig but has 49gig free. I was getting critical alert about the mailbox but can't find why it triggered the alert. Looking for help on what conditions the settings need to be.
***** Nagios XI Alert *****
Nagios has detected a problem with this service.
Notification Type: PROBLEM
Service: Mailbox Usage - *********
Host: *********
Address: *********
State: CRITICAL
Info:
CRITICAL: [*********@*********.com] Item_Count=11600 Storage_Used_(Byte)=1243134964 Deleted_Item_Count=4873 Deleted_Item_Size_(Byte)=49592508
Date/Time: 2021-01-27 14:17:26
Re: Nagios 5.8 Office 365 alerts
Posted: Mon Feb 01, 2021 4:25 pm
by cdienger
It looks like we just need to modify the thresholds a little. This should be doable by editing the service under Configure > Core Config Manager > Monitoring > Services. You can find information on Nagios thresholds at
https://nagios-plugins.org/doc/guidelines.html and use the "Run Check Command" button found on the Common Settings tab of the service to test it. Please take a screenshot of the "Run Check Command" screen so that we can see the full command and output if this doesn't help resolve the problem.
Re: Nagios 5.8 Office 365 alerts
Posted: Tue Feb 02, 2021 12:12 pm
by newportsystem
Here is the results
[
[email protected] ~]$ /usr/local/nagios/libexec/check_microsoft_365.php --tenant '************' --appid '***********' --secret '*********' --mode 'mailusagebyuser' --warning '2000' --critical '10000' --filter '*****@****emsusa.com'
CRITICAL: [*******@*****stemsusa.com] Item_Count=9769 Storage_Used_(Byte)=1144636579 Deleted_Item_Count=7053 Deleted_Item_Size_(Byte)=178475321 | Item_Count=9769 Storage_Used_(Byte)=1144636579 Deleted_Item_Count=7053 Deleted_Item_Size_(Byte)=178475321;2000;10000;;
Re: Nagios 5.8 Office 365 alerts
Posted: Wed Feb 03, 2021 2:44 pm
by cdienger
The value returned by 365 is in bytes as well as the warning and critical thresholds. So the current command would trigger a warning if usage exceeded 2000 bytes and a critical if it exceeded 10000 bytes. Try increasing these values. You can test it directly on the XI command line as well:
Code: Select all
/usr/local/nagios/libexec/check_microsoft_365.php --tenant '************' --appid '***********' --secret '*********' --mode 'mailusagebyuser' --warning '4500000000' --critical '4800000000' --filter '*****@****emsusa.com'
Re: Nagios 5.8 Office 365 alerts
Posted: Wed Feb 03, 2021 3:06 pm
by newportsystem
thank you
Re: Nagios 5.8 Office 365 alerts
Posted: Thu Feb 04, 2021 3:55 pm
by cdienger
Glad to help!