Metricbeat MSSQL - keystore

Hi,

I've a problem with using keystore to store passwords for DB connection in the MSSQL module.
I've created a keystore and and added a key called SA_PW. I can see this key in the keystore when I list all keys in the keystore.

This is my MSSQL module config:

- module: mssql
  metricsets:
    - "transaction_log"
    - "performance"
  hosts: ["MyMachine"]
  username: sa
  password: "${SA_PW}"
  period: 10s

If if use the password in plaintext it works.
Error message from log:

|2020-03-10T13:38:40.496+0100|INFO|instance/beat.go:445|metricbeat stopped.
|2020-03-10T13:38:40.501+0100|ERROR|instance/beat.go:933|Exiting: 2 errors: host parsing failed for mssql-transaction_log: missing field accessing '0.password' (source:'C:\metricbeat-7.6.0-windows-x86_64\modules.d\mssql.yml');|

Am I doing something wrong here?

Thanks in advance.

I just had this problem. Make sure that you set the data_path when you create the keystore to the same data_path you use when running Metricbeat. That was my problem.

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