Skip to content

Latest commit

 

History

History
 
 

README.md

Microsoft SQL Server Check

Overview

This check lets you track the performance of your SQL Server instances. It collects metrics for number of user connections, rate of SQL compilations, and more.

You can also create your own metrics by having the check run custom queries.

Setup

Installation

The SQL Server check is packaged with the Agent, so simply install the Agent on your SQL Server instances. If you need the newest version of the check, install the dd-check-sqlserver package.

Make sure that your SQL Server instance supports SQL Server authentication by enabling "SQL Server and Windows Authentication mode" in the server properties. Server Properties -> Security -> SQL Server and Windows Authentication mode

Configuration

  1. Create a read-only user to connect to your server:
CREATE LOGIN datadog WITH PASSWORD = 'YOUR_PASSWORD';
CREATE USER datadog FOR LOGIN datadog;
GRANT SELECT on sys.dm_os_performance_counters to datadog;
GRANT VIEW SERVER STATE to datadog;
  1. Create a file sqlserver.yaml in the Agent's conf.d directory:
init_config:

instances:
  - host: <SQL_HOST>,<SQL_PORT>
    username: <SQL_ADMIN_USER>
    password: <SQL_ADMIN_PASSWORD>
    connector: odbc # alternative is 'adodbapi'
    driver: SQL Server

See the example check configuration for a comprehensive description of all options, including how to use custom queries to create your own metrics.

  1. Restart the Agent to start sending SQL Server metrics to Datadog.

Validation

Run the Agent's info subcommand and look for sqlserver under the Checks section:

  Checks
  ======
    [...]

    sqlserver
    -------
      - instance #0 [OK]
      - Collected 26 metrics, 0 events & 1 service check

    [...]

Compatibility

The sqlserver check is compatible with all Windows and Linux platforms.

Data Collected

Metrics

See metadata.csv for a list of metrics provided by this check.

Most of these metrics come from your SQL Server's sys.dm_os_performance_counters table.

Events

The SQL server check does not include any event at this time.

Service Checks

sqlserver.can_connect:

Returns CRITICAL if the Agent cannot connect to SQL Server to collect metrics, otherwise OK.

Troubleshooting

If you have any questions about Datadog or a use case our Docs didn’t mention, we’d love to help! Here’s how you can reach out to us:

Visit the Knowledge Base

Learn more about what you can do in Datadog on the Support Knowledge Base.

Web Support

Messages in the event stream containing @support-datadog will reach our Support Team. This is a convenient channel for referencing graph snapshots or a particular event. In addition, we have a livechat service available during the day (EST) from any page within the app.

By Email

You can also contact our Support Team via email at [email protected].

Over Slack

Reach out to our team and other Datadog users on Slack.

Further Reading

To get a better idea of how (or why) to monitor your Azure SQL Databases with Datadog, check out our series of blog posts about it.