-
-
Notifications
You must be signed in to change notification settings - Fork 97
Description
We're using SQL Exporter to collect metrics from an on-premises Microsoft SQL Server 2008 R2 SP1 instance.
Due to legacy system constraints, we're currently unable to upgrade SQL Server or enable modern TLS versions (e.g., TLS 1.2).
Our setup:
Prometheus + SQL Exporter deployed via Helm in an AKS cluster
MSSQL 2008 R2 SP1 (Force Encryption disabled)
We attempted to disable encryption using the following target configuration:
static_configs:
- targets:
MSSQL2008R2: 'mssql://user:password@mssqlserver:1433/dbname&encrypt=disable'
However, SQL Exporter still fails to connect.
level=ERROR source=promhttp.go:52 msg="Error gathering metrics" error="[from Gatherer #1] [job=multiple-DB,target=mssqlserver] TLS Handshake failed: cannot read handshake packet: EOF"
...
[from Gatherer #1] [job=multiple-DB,target=mssqlserver] TLS Handshake failed: cannot read handshake packet: EOF
...
[from Gatherer #1] [job=multiple-DB,target=mssqlserver] TLS Handshake failed: tls: server selected unsupported protocol version 301
It appears the encrypt=disable parameter is not working as expected, or the underlying driver still tries to enforce TLS.
We would like SQL Exporter to support connections to SQL Server using:
- No TLS (encrypt=disable or equivalent)
- Optionally allow TLS 1.0, since that is the only version supported on this legacy server
Ideally, this should be configurable via the DSN and compatible with Helm-based deployments.
Tried both encrypt=false and encrypt=disable
Verified that "Force Encryption" is disabled on the SQL Server
Explored Helm chart overrides and documentation for connection string options
Upgrading to a newer SQL Server version or enabling TLS 1.2 is not feasible at this time
Tried with Exporter toolkit, but not sure how to apply it along with SQL Exporter Helm chart.
We suspect this may be related to the behavior of the underlying driver used by SQL Exporter when connecting to MSSQL.
If there's a workaround (driver flag, custom image, etc.) or a way to explicitly allow non-TLS/TLS 1.0 connections, that would help immensely.
Thanks for your time and for maintaining this project — it's super helpful for Prometheus-based monitoring setups!