MSSQL Connection to Server Instance fails due to Connection String parsing

I would like to connect the Metricbeat MSSQL to a specific Instance of the sql server.
Connecting to another server without an instance works fine, but i can't get it to work with an instance.

My yml file looks like this

    #-------------------------------- MS-SQL Module --------------------------------
    - module: mssql
      metricsets:
        - "transaction_log"
        - "performance"
      hosts: 'sqlserver://127.0.0.1\\Instance_Name'
      username: '${sql_user}'
      password: '${sql_pwd}'
      period: 10s
      enabled: true

Using double slash results in

    host parsing failed for mssql-transaction_log: error parsing URL: parse sqlserver://127.0.0.1\Instance_Name: invalid character "\\" in host name; host parsing failed for mssql-performance

Using a single slash results in

    could not create connection to db: error doing ping to db: lookup 127.0.0.1 nstance_Name: no such host;

What version of Metricbeat are you using?

Can you try with replacing the \\ with /?

Shaunak

Thanks, the /worked.

Thought i tried it out before. Still a bit odd, since all other applications seem to use the \ (example).
Version is 7.5 btw.

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