SQL Exporter Failing to Connect to SQL Server Named Instance #515
-
We are experiencing persistent issues with the SQL Exporter failing to gather metrics from our SQL Server named instance. Despite multiple attempts to configure the data source name correctly, the exporter either times out or returns errors indicating invalid URL escape sequences. SQL Exporter version: 0.14.3 We use dynamic ports for MS SQL. Tried different formats for the data source name: What should the data source field look like when not using static ports? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hi @aszkuat, sql_exporter is using
where instance is Here is the reference link. Also, the reference from the driver here. |
Beta Was this translation helpful? Give feedback.
-
Thank you, the option works. |
Beta Was this translation helpful? Give feedback.
Hi @aszkuat, sql_exporter is using
dburl
library for unified DSN connection string format across many databases, so I'd suggest to try this syntax out as per their documentation:where instance is
instance1
anddbname
is your desired database name to connect to.dbname
might also be a mandatory value (whereasinstance
can be optional), but it's controlled by the mssql driver, so omitting might potentially work. Give it a try.Here is the reference link.
Also, the reference from the driver here.