Page 1 of 1
check_mssql_server.py clear text password issue
Posted: Sat Dec 28, 2013 12:43 am
by sureshkraj2012
Hello All,
Is there any way to supply credential over file instead of clear text password for this plugin?
./check_mssql_server.py -H 192.168.5.5 -U user -P password -I dbase -p 1900
something like below
./check_mssql_server.py -H 192.168.5.5 -U user -P <file> -I dbase -p 1900
Re: check_mssql_server.py clear text password issue
Posted: Mon Dec 30, 2013 10:22 am
by slansing
I don't believe you can via a specific file, you can however, use the nagios resource.cfg file to add a password as a user macro. Simply open:
Code: Select all
/usr/local/nagios/etc/resource.cfg
And add a new $USERn$ macro, then call that directly in the service definition for your mssql check.
Re: check_mssql_server.py clear text password issue
Posted: Tue Dec 31, 2013 11:04 pm
by sureshkraj2012
Thank you. It is working
Does it work with domain authentication (domain name \ Username)?
Re: check_mssql_server.py clear text password issue
Posted: Thu Jan 02, 2014 11:28 am
by slansing
Those $USERn$ variables are global so they should work just fine!
Re: check_mssql_server.py clear text password issue
Posted: Fri Jan 03, 2014 3:14 am
by sureshkraj2012
Thank you for your response!!!
I tried with below macros but it is not working as expected.
$USER30$=Domain\User1
&
$USER30$=Domain\\User1
Here is command line output
/usr/local/nagios/libexec/check_mssql_server.py -H MSSQL01.Domain.com -U 'Domain\\User1' -P 'password#01' -p 1433 --deadlocks --warning 20 --critical 30
CRITICAL:Unable to access SQL Server.
Is this something to do with the special character?
Re: check_mssql_server.py clear text password issue
Posted: Fri Jan 03, 2014 10:42 am
by slansing
Ohh, you meant placing that information in the USER variable.. Are you able to run those checks with Domain \\ User in the CCM and not the USER macro version you defined? I did not think that Damain \ User was valid for these mysql checks.