For the complete documentation index, see llms.txt. This page is also available as Markdown.

Microsoft SQL Server

The Microsoft SQL Server source collects metrics and logs from a SQL Server instance running on Windows. Metrics are scraped from the local instance with the OpenTelemetry sqlserver receiver, which reads Windows performance counters and Dynamic Management Views. Logs are collected from the SQL Server error log through a Bindplane log plugin. Each signal can be enabled independently with the Choose Telemetry Type control.

Supported Telemetry Types

Platform
Metrics
Logs
Traces

Windows

Prerequisites

This source runs on a collector installed on the Windows host where SQL Server is running.

  • Run the collector as administrator. The sqlserver receiver reads Windows performance counters. The collector process must run with administrator privileges to access all counters used for metrics.

  • Monitoring login for direct connection. When the receiver connects directly to the instance, the login must hold at least one of CREATE DATABASE, ALTER ANY DATABASE, or VIEW ANY DATABASE, plus server state viewing rights: VIEW SERVER STATE on SQL Server prior to 2022, or VIEW SERVER PERFORMANCE STATE on SQL Server 2022 and later. Use a dedicated least-privilege monitoring login rather than a high-privilege account. See GRANT Server Permissions (Transact-SQL) for the grant syntax.

  • Error log access for logs. To collect logs, the collector must have read access to the SQL Server error log on the host.

Configuration

Bindplane docs - Microsoft SQL Server - image 1

General

Parameter
Type
Required
Default
Description

Choose Telemetry Type

Telemetry Selector

No

["Logs", "Metrics"]

Which signals this source collects. Valid values: Logs, Metrics.

Logs

Parameter
Type
Required
Default
Description

Start At

Enum: beginning, end

No

end

Start reading logs from beginning or end. Relevant when Choose Telemetry Type includes Logs. Advanced.

Parse

Boolean

No

true

Parses the log fields into structured data. Relevant when Choose Telemetry Type includes Logs. Advanced.

Metrics

Parameter
Type
Required
Default
Description

Metric Filtering

Metrics

No

(empty)

Selects which metrics to disable. Disabled metrics are not collected. Relevant when Choose Telemetry Type includes Metrics. Advanced.

Collection Interval

Integer

No

60

How often (seconds) to scrape for metrics. Relevant when Choose Telemetry Type includes Metrics. Advanced.

Available metric categories for Metric Filtering: Batch, Lock, Page, Transaction, and User. Each category groups the related sqlserver.* metrics that can be toggled off.

Examples

Collect metrics and logs from the local instance

This source collects both signals with the defaults: it scrapes metrics every 60 seconds and reads the error log from the end.

Metrics only with a longer interval

To collect metrics alone and reduce scrape frequency, enable only Metrics and raise the collection interval.

Configuration Tips

  • Set Start At to beginning for a one-time backfill of existing error log entries; leave it at end to collect only new entries going forward.

  • Use Metric Filtering to disable metric categories you do not need (for example Batch or Lock) to reduce metric volume.

  • Raise Collection Interval on busy hosts where 60-second scraping adds noticeable load.

Troubleshooting

Metrics are missing or performance counters are empty

Symptoms: no sqlserver.* metrics appear, or only a subset are reported.

Solutions:

  1. Confirm the collector process runs as administrator. Windows performance counters require administrator privileges.

  2. Verify the monitoring login holds VIEW SERVER STATE (or VIEW SERVER PERFORMANCE STATE on SQL Server 2022+) in addition to one of CREATE DATABASE, ALTER ANY DATABASE, or VIEW ANY DATABASE.

Authentication or permission errors

Symptoms: the receiver logs permission-denied errors against Dynamic Management Views.

Solutions:

  1. Re-check the monitoring login's grants against the Prerequisites list.

  2. On SQL Server 2022 and later, grant VIEW SERVER PERFORMANCE STATE; VIEW SERVER STATE alone is not sufficient for the performance DMVs.

No logs are collected

Symptoms: metrics arrive but no log records appear.

Solutions:

  1. Confirm Choose Telemetry Type includes Logs.

  2. Verify the collector has read access to the SQL Server error log on the host, and that Start At is set appropriately for the entries you expect.

Standalone Source

Last updated

Was this helpful?