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
check_mssql_server.py clear text password issue
-
sureshkraj2012
- Posts: 65
- Joined: Tue Aug 06, 2013 11:06 pm
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: check_mssql_server.py clear text password issue
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:
And add a new $USERn$ macro, then call that directly in the service definition for your mssql check.
Code: Select all
/usr/local/nagios/etc/resource.cfg-
sureshkraj2012
- Posts: 65
- Joined: Tue Aug 06, 2013 11:06 pm
Re: check_mssql_server.py clear text password issue
Thank you. It is working
Does it work with domain authentication (domain name \ Username)?
Does it work with domain authentication (domain name \ Username)?
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: check_mssql_server.py clear text password issue
Those $USERn$ variables are global so they should work just fine!
-
sureshkraj2012
- Posts: 65
- Joined: Tue Aug 06, 2013 11:06 pm
Re: check_mssql_server.py clear text password issue
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?
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?
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: check_mssql_server.py clear text password issue
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.