Page 1 of 2
Authentication failed check_sharepoint.pl
Posted: Tue Jun 24, 2014 1:55 pm
by jeffersjw
Hi,
Running check_sharepoint.pl v1.2 on Nagios XI 2014R1.1 and getting the following error:
[root@nagios libexec]# ./check_sharepoint.pl -H portal.blahblah.com -u "DOMAIN\some_acount" -p "Sc00bieD@@" -l '/Pages/default.aspx' -s 'Hello' -t 15 -w 5 -c 10
CRITICAL: Authentication failed for account 'DOMAIN\some_account'
When I run a test on the host I get:
COMMAND: /usr/local/nagios/libexec/check_sharepoint.pl -H portal.blahblah.com -u "DOMAIN\\some_acount" -p "Sc00bieD@@" -l -s -t /Pages/default.aspx
OUTPUT: CRITICAL: Authentication failed for account 'DOMAIN\\some_acount'
I noticed that there is an extra "\" character in the credentials, but not sure if that or something else might be causing the issue. Any help much appreciated.
Thanks!
Re: Authentication failed check_sharepoint.pl
Posted: Tue Jun 24, 2014 2:28 pm
by lmiltchev
Testing from the CCM doesn't work 100% of the time. Sometimes it fails due to escaping issues? Does the check work?
Home->Service Detail-><your service>->Schedule an immediate check
Do you see the correct credentials under the "Configure Service" page?
Home->Service Detail-><your service>->Configure->Re-configure this service
Re: Authentication failed check_sharepoint.pl
Posted: Tue Jun 24, 2014 3:00 pm
by jeffersjw
It gives me the same error as the command line. The credentials look fine in the monitoring settings (I am running this from the host configuration, not as a service). I did add a URL monitor as well and get the same result.
Re: Authentication failed check_sharepoint.pl
Posted: Tue Jun 24, 2014 4:41 pm
by sreinhardt
What happens if you flip the backslash in domain\user to forwardslash domain/user? This is a common change for perl scripts working with AD credentials.
Re: Authentication failed check_sharepoint.pl
Posted: Wed Jun 25, 2014 9:16 am
by jeffersjw
It does resolve the issue with how the account is displayed in the CCM test, but still getting the authentication error.
Re: Authentication failed check_sharepoint.pl
Posted: Wed Jun 25, 2014 11:20 am
by sreinhardt
as lmiltchev suggested, I would avoid relying on the test command button, specifically for things that might get escaped like AD usernames and passwords. Instead we would suggest applying config and either letting nagios schedule the check, or forcing an immediate check. You could of course also test from the cli, any of these options will avoid additional artificial escaping and run it just how nagios would.
Re: Authentication failed check_sharepoint.pl
Posted: Wed Jun 25, 2014 11:28 am
by jeffersjw
The test command button is fine now. The check is failing from both the monitor and command line, basically giving me the CRITICAL: Authentication failed for account for both.
Re: Authentication failed check_sharepoint.pl
Posted: Wed Jun 25, 2014 1:46 pm
by tmcdonald
Does your password contain any special characters? Or is the pass you used in your first post the actual password you use? The password might need to be stored in resource.cfg and referenced as a $USERX$ macro in the command.
Re: Authentication failed check_sharepoint.pl
Posted: Wed Jun 25, 2014 2:03 pm
by jeffersjw
I changed it so it is now only letters and numbers. I also remove the underscore from the username. Same issue.
Re: Authentication failed check_sharepoint.pl
Posted: Thu Jun 26, 2014 10:22 am
by slansing
It looks like on the third party plugin's exchange page it notes this:
**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
Have you verified all of this is set on your XI server? Specifically the perl module, and ntlm enabled in libcurl? I'm also unsure if a domain/uname pair will work with the plugin, though I would hope it does, it is not mentioned.