Metricbeat MSSQL DB connection

I need to monitor particular a DB in MSSQL server, Is there any way to specify the DB name in MSSQL module itself

Hi @kavi_anand :slightly_smiling_face:

You can use the fill hosts parameter to as the common connection string like sqlserver://root:1234localhost?database=master&connection+timeout=30

Hi Mario @Mario_Castro,
I tried using your solution and got new problems, also we cannot have access for all the db access, i think it requires admin access which cannot be provided, is there any alternate way?
hosts: ["sqlserver://servername:15001?database=test"]
username: test1
password: 123

error:

error doing ping to db: Login error: mssql: Cannot open database "test" that was requested by the login. Using the
user default database "master" instead.; could not create connection to db: error doing ping to db: Login error: mssql:
Cannot open database "test" that was requested by the login. Using the user default database "master" instead.
Exiting: 2 errors: could not create connection to db: error doing ping to db: Login error: mssql: Cannot open database "
Qualfx_test" that was requested by the login. Using the user default database "master" instead.; could not create connec
tion to db: error doing ping to db: Login error: mssql: Cannot open database "test" that was requested by the log
in. Using the user default database "master" instead.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.