Page 1 of 1
Check Exchange OWA login
Posted: Mon Feb 19, 2018 5:46 am
by delboy1966
Does anyone know the best way of getting Nagios to login to Exchange via the web GUI and return the resulting web page?
I have to alert depending on the content on the resulting page after a successful login.
Thanks
Tony
Re: Check Exchange OWA login
Posted: Mon Feb 19, 2018 9:35 am
by mcapra
Here's a post from
@ssax on the customer section of the forums:
ssax wrote:
For checking NTLM websites you can use the attached plugin and use these commands to test it:
To just check NTLM authentication for an HTTP site:
Code: Select all
./check_ntlm_website.sh -u 'domain\username' -p 'password' -U 'http://X.X.X.X/path/to/your/page.whatever'
Code: Select all
[root@xidc73 libexec]# ./check_ntlm_website.sh -u 'contoso\ssax' -p 'xxXxxXxxXX' -U 'http://my.site.com/testing/page.aspx'
OK - Authenticated Successfully.
To just check NTLM authentication for an HTTPS site:
Code: Select all
./check_ntlm_website.sh -u 'domain\username' -p 'password' -U 'https://X.X.X.X/path/to/your/page.whatever'
Code: Select all
[root@xidc73 libexec]# ./check_ntlm_website.sh -u 'contoso\ssax' -p 'xxXxxXxxXX' -U 'https://my.site.com/testing/page.aspx'
OK - Authenticated Successfully.
To check NTLM authentication AND search the page for specific text you can use the -s option:
Code: Select all
./check_ntlm_website.sh -u 'domain\username' -p 'password' -U 'http://X.X.X.X/path/to/your/page.whatever' -s 'searchword'
Code: Select all
[root@xidc73 libexec]# ./check_ntlm_website.sh -u 'contoso\ssax' -p 'xxXxxXxxXX' -U 'https://my.site.com/testing/page.aspx' -s 'border'
OK - Authenticated Successfully - Search string 'border' found.
Thank you
I'll attach the plugin he wrote below. Otherwise, you could do this with
Selenium.
Re: Check Exchange OWA login
Posted: Mon Feb 19, 2018 2:41 pm
by kyang
Thanks for the help
@mcapra!
delboy1966, let us know if this helps!
Re: Check Exchange OWA login
Posted: Tue Feb 20, 2018 4:15 am
by delboy1966
Hi
Thanks for the reply and the plugin.
However it doesn't seem to work as it should.
Its telling me its authenticated, however if I use the -v flag its actually returning the login page with the message;
Please enable cookies for this Web site. Cookies are currently disabled by your browser. Outlook Web App requires that cookies be enabled.
Re: Check Exchange OWA login
Posted: Tue Feb 20, 2018 3:46 pm
by mcapra
Ah, that's my mistake.
This article might be more useful:
http://fiwebelize.com/monitoring-an-out ... th-nagios/
Though it is a bit old. I stand by the statement that Selenium should be able to handle this, but it is admittedly a bit heavy in this particular case.
There's also a few plugins on the exchange you might consider:
https://exchange.nagios.org/index.php?o ... ange%20owa
Re: Check Exchange OWA login
Posted: Tue Feb 20, 2018 5:27 pm
by kyang
Thanks for the help
@mcapra!