Page 1 of 1
O365 Email Message Count
Posted: Thu May 02, 2019 11:59 am
by cnewstrom
I need to be able to trigger an alert if an O365 email account has greater than X number of unread emails in it.
Does anyone know if this can be done with Nagios XI?
Thanks!
Re: O365 Email Message Count
Posted: Thu May 02, 2019 2:11 pm
by npolovenko
@cnewstrom, Looks like this plugin can do what you're looking for.
https://exchange.nagios.org/directory/P ... ls/details
Feel free to check out our mail section of the Nagios Exchange, you'll likely find more plugins for Office 365:
https://exchange.nagios.org/directory/P ... -Groupware
Re: O365 Email Message Count
Posted: Fri May 03, 2019 2:53 pm
by cnewstrom
I've checked out the check_unread_mails.pl script already.
Has anyone gotten this to work agains an O365 account?
I couldn't seem to get it going against O365 for some reason.
Re: O365 Email Message Count
Posted: Fri May 03, 2019 2:54 pm
by cnewstrom
I'm pretty sure the issue was certificate related, but I also think the script might need some updating.
If anyone is successfully using this script I'd appreciate any tips they might lend.
Thanks!
Re: O365 Email Message Count
Posted: Fri May 03, 2019 3:51 pm
by npolovenko
@cnewstrom, I'm not using O365 in the lab so can't test this. Looks like the author of this plugin left the link to his LinkedIn on the plugin page

:
https://exchange.nagios.org/directory/P ... ls/details
You could try reaching out to him directly or even better, open a new issue on the GitHub page:
https://github.com/elio78/nagios/issues/new
Re: O365 Email Message Count
Posted: Fri May 03, 2019 3:54 pm
by cdienger
I've attached a modified script that points to the correct modules. I also needed to install the CBC.pm module:
yum -y install perl-Crypt-CBC
Re: O365 Email Message Count
Posted: Mon May 06, 2019 5:13 pm
by cnewstrom
Thanks for the help with the module.
Were you actually able to get this to run?
Re: O365 Email Message Count
Posted: Tue May 07, 2019 9:59 am
by cdienger
I'm not able to fully test since I don't have a 0365, but did correct some problems that would arise due to the script pointing at old modules.