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
Check Exchange OWA login
Re: Check Exchange OWA login
Here's a post from @ssax on the customer section of the forums:
I'll attach the plugin he wrote below. Otherwise, you could do this with Selenium.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'
To just check NTLM authentication for an HTTPS site: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.
Code: Select all
./check_ntlm_website.sh -u 'domain\username' -p 'password' -U 'https://X.X.X.X/path/to/your/page.whatever'
To check NTLM authentication AND search the page for specific text you can use the -s option: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.
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'
Thank youCode: 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.
- Attachments
-
- check_ntlm_website.zip
- (2.14 KiB) Downloaded 233 times
Former Nagios employee
https://www.mcapra.com/
https://www.mcapra.com/
-
- Posts: 96
- Joined: Thu Oct 22, 2015 5:26 am
Re: Check Exchange OWA login
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.
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
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
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
Former Nagios employee
https://www.mcapra.com/
https://www.mcapra.com/