docs: update mssql meta (#20278)
Ilya Mashchenko committed
May 14, 2025 at 10:00 UTC
ed624904613bb4f14a93e9ad043d744e5098d505
2 files changed
+42
-36
src/collectors/windows.plugin/metadata.yaml
+42
-36
@@ -1609,7 +1609,10 @@ modules:
1609
default_behavior:
1610
auto_detection:
1611
description: |
1612
- The collector automatically detects some metrics, but transaction metrics require configuration.
1612
+ The collector automatically discovers and monitors standard SQL Server metrics without additional setup. However, for transaction-level metrics, you must:
1613
+
1614
+ - Complete the "Configure SQL Server for Monitoring" steps in the Setup -> Prerequisites section.
1615
+ - Configure a database connection (see Setup → Configuration → Examples).
1616
limits:
1617
description: ""
1618
performance_impact:
@@ -1617,39 +1620,42 @@ modules:
1620
setup:
1621
prerequisites:
1622
list:
1620
- - title: Create netdata user
1623
+ - title: Configure SQL Server for Monitoring
1624
description: |
1622
- Create an SQL Server user with the necessary permissions to collect monitoring data:
1623
-
1624
- ```tsql
1625
- USE master;
1626
- CREATE LOGIN netdata_user WITH PASSWORD = '1ReallyStrongPasswordShouldBeInsertedHere';
1627
- CREATE USER netdata_user FOR LOGIN netdata_user;
1628
- GRANT CONNECT SQL TO netdata_user;
1629
- GRANT VIEW SERVER STATE TO netdata_user;
1630
- GO
1631
- ```
1632
-
1633
- Additionally, enable the [Query Store](https://learn.microsoft.com/en-us/sql/relational-databases/performance/monitoring-performance-by-using-the-query-store?view=sql-server-ver16)
1634
- on each database you want to monitor:
1635
-
1636
- ```tsql
1637
- DECLARE @dbname NVARCHAR(max)
1638
- DECLARE nd_user_cursor CURSOR FOR SELECT name
1639
- FROM master.dbo.sysdatabases
1640
- WHERE name NOT IN ('master', 'tempdb')
1641
-
1642
- OPEN nd_user_cursor
1643
- FETCH NEXT FROM nd_user_cursor INTO @dbname
1644
- WHILE @@FETCH_STATUS = 0
1645
- BEGIN
1646
- EXECUTE ("USE "+ @dbname+"; CREATE USER netdata_user FOR LOGIN netdata_user; ALTER DATABASE "+@dbname+" SET QUERY_STORE = ON ( QUERY_CAPTURE_MODE = ALL, DATA_FLUSH_INTERVAL_SECONDS = 900 )");
1647
- FETCH next FROM nd_user_cursor INTO @dbname;
1648
- END
1649
- CLOSE nd_user_cursor
1650
- DEALLOCATE nd_user_cursor
1651
- GO
1652
- ```
1625
+ 1. **Create Monitoring User**
1626
+
1627
+ Create an SQL Server user with the necessary permissions to collect monitoring data:
1628
+
1629
+ ```tsql
1630
+ USE master;
1631
+ CREATE LOGIN netdata_user WITH PASSWORD = '1ReallyStrongPasswordShouldBeInsertedHere';
1632
+ CREATE USER netdata_user FOR LOGIN netdata_user;
1633
+ GRANT CONNECT SQL TO netdata_user;
1634
+ GRANT VIEW SERVER STATE TO netdata_user;
1635
+ GO
1636
+ ```
1637
+
1638
+ 2. **Enable Query Store**
1639
+
1640
+ Enable the [Query Store](https://learn.microsoft.com/en-us/sql/relational-databases/performance/monitoring-performance-by-using-the-query-store?view=sql-server-ver16) and grant access to the monitoring user on all relevant databases:
1641
+
1642
+ ```tsql
1643
+ DECLARE @dbname NVARCHAR(max)
1644
+ DECLARE nd_user_cursor CURSOR FOR SELECT name
1645
+ FROM master.dbo.sysdatabases
1646
+ WHERE name NOT IN ('master', 'tempdb')
1647
+
1648
+ OPEN nd_user_cursor
1649
+ FETCH NEXT FROM nd_user_cursor INTO @dbname
1650
+ WHILE @@FETCH_STATUS = 0
1651
+ BEGIN
1652
+ EXECUTE ("USE "+ @dbname+"; CREATE USER netdata_user FOR LOGIN netdata_user; ALTER DATABASE "+@dbname+" SET QUERY_STORE = ON ( QUERY_CAPTURE_MODE = ALL, DATA_FLUSH_INTERVAL_SECONDS = 900 )");
1653
+ FETCH next FROM nd_user_cursor INTO @dbname;
1654
+ END
1655
+ CLOSE nd_user_cursor
1656
+ DEALLOCATE nd_user_cursor
1657
+ GO
1658
+ ```
1659
configuration:
1660
file:
1661
name: "netdata.conf"
@@ -1694,8 +1700,8 @@ modules:
1700
enabled: true
1701
title: ""
1702
list:
1697
- - name: One Instance
1698
- description: An example configuration.
1703
+ - name: Single Instance
1704
+ description: An example configuration with one instance.
1705
folding:
1706
enabled: false
1707
config: |
@@ -1704,7 +1710,7 @@ modules:
1710
server = 127.0.0.1\\Dev, 1433
1711
uid = netdata_user
1712
pwd = 1ReallyStrongPasswordShouldBeInsertedHere
1707
- - name: Two Instances
1713
+ - name: Multiple Instances
1714
description: An example configuration with two instances.
1715
folding:
1716
enabled: false