Search Exchange

Search All Sites

Nagios Live Webinars

Let our experts show you how Nagios can help your organization.

Contact Us

Phone: 1-888-NAGIOS-1
Email: sales@nagios.com

Login

Remember Me
Don't miss your chance to attend the 2014 Nagios World conference!

Don't miss your chance to attend the 2014 Nagios World Conference, Oct 13-16th. Informative Sessions, Networking, Food and Cocktails! Visit go.nagios.com/conference/ for more information or to register.


check_sharepoint.pl

Bookmark and Share

Rating
4 votes
Favoured:
2
Current Version
1.2
Compatible With
  • Nagios 2.x
  • Nagios 3.x
  • Nagios XI
License
GPL
Hits
63881
Files:
FileDescription
check_sharepoint.plPlugin
LICENSE.txtLicense
check_sharepoint.pl
Perl script for functional checking of SharePoint sites.

Similar to check_http but with ntlm support. Will also handle form logons for sites published via ISA/TMG servers.
- Works with both integrated NTML and forms based authentication.
- returns site page load times (with perfmon output).
- warning and/or critical thresholds can be set for site load times.
- semi-informative failure messages (auth failure, insufficient site permissions, 401's, etc)
- ability to check for a specific string on a page

**Note**
- Perl module WWW::Curl::Easy is required.
- libcurl must have ntlm enabled for integrated authentication site checks to work. ('curl-config --features' will show you if you have it)
- This will probably work on Nagios XI but it hasn't been tested yet

Tested with Sharepoint 2007 & 2010

**v1.2 changes**
- added verbose output
- some bug fixes

-------------------------------------------------------------------

check_sharepoint.pl v1.2
Copyright (c) 2012 PCS-IT Services B.V. (www.pcs-it.nl)

Usage: check_sharepoint.pl -H -u -p
-w [warn time] -c [crit time] -t [timeout]
-s [search string] -l [path] -v -form -http

Nagios script for checking of SharePoint web services

Options:
-H Address or hostname of SharePoint site (required)
-u Username (required)
-p Password (required)
-w Warning threshold in seconds
-c Critical threshold in seconds
-t Connection timeout in seconds (default is 60 seconds)
-s Search for custom string on page
-l Specific location or path instead of site root
-v Verbose. HTTP headers in output. 2x (-v -v) includes HTML. 3x both
-form Use forms based authentication (default is ntlm)
-http Connect via standard http (default is https)

Examples:
Check site behind a TMG server using forms based authentication with warning and critital times
check_sharepoint.pl -H portal.hostname.com -u username -p password -form -w 5 -c 10

Check site with integtrated authentication at a specific location within the site
check_sharepoint.pl -H portal.hostname.com -u username -p password -l '/Sites/Wiki%20Pages/default.aspx'

Check site with integtrated authentication that contins the string 'random string'
check_sharepoint.pl -H portal.hostname.com -u username -p password -s 'random string'

Notes:
- If you use special characters in your usernames and/or passwords, authentication will
have a better chance of working if you enclose them in quotes.
- If a URL path is included using the -l option it is must be encoded (e.g. - /Wiki%20Pages/default.aspx)
- Connections are always assumed to be https unless the -http option is used
- Forms authentication is always assumed to be via a ISA/TMG server.
- libcurl must have NTML listed in its features in order for integrated (NTML) authentication
to work. Runing 'curl-config --features' will show if this is present.
Reviews (3)
I have also the 401 Unauthorized error when I run the check.
It use curl and WWW::Curl::easy .
When I run the curl command , I have first a 401 error , then I have the HTTP/1.1 200 Ok message , so the connection looks ok but the check_sharepoint.pl check take only the 401 as result.

If someone can help thanks,
Script looks great, just what I'm looking for but it always returns a 401 Unauthorized error...

Definitely correct credentials and infact a very basic NTLM script here check_http_ntlm.pl works perfectly but lacks any performance data.

Would appreciate any help...!
bydceola, November 13, 2012
This plugin works very well. I'm currently using it to monitor all of my SharePoint site collections as well as our MS CRM site. It works great for any page that requires NTLM authentication.

I've actually been wondering if there is a way to 'convert' this script to a windows friendly exe, in order to run it from a few client side systems through nsclient++. I've tried a few things myself but it kept coming back to not being able to get CURL installed on windows...