@cryptotaxi247 / netdata-1 / commits / 1fa0a4f51

Regenerate integrations docs (#20279)

Co-authored-by: ilyam8 <22274335+ilyam8@users.noreply.github.com>

Netdata bot committed May 14, 2025 at 09:11 UTC 1fa0a4f51ba6d74a1993cc70b5646f28d9e835f0
1 file changed +81 -6
src/collectors/windows.plugin/integrations/ms_sql_server.md
+81 -6
@@ -38,7 +38,10 @@ This collector only supports collecting metrics from a single instance of this i
38
39 #### Auto-Detection
40
41 -The collector automatically detects all of the metrics, no further configuration is required.
41 +The collector automatically discovers and monitors standard SQL Server metrics without additional setup. However, for transaction-level metrics, you must:
42 +
43 +- Complete the "Configure SQL Server for Monitoring" steps in the Setup -> Prerequisites section.
44 +- Configure a database connection (see Setup → Configuration → Examples).
45
46
47 #### Limits
@@ -130,14 +133,51 @@ There are no alerts configured by default for this integration.
133
134 ### Prerequisites
135
133 -No action required.
136 +#### Configure SQL Server for Monitoring
137 +
138 +1. **Create Monitoring User**
139 +
140 + Create an SQL Server user with the necessary permissions to collect monitoring data:
141 +
142 + ```tsql
143 + USE master;
144 + CREATE LOGIN netdata_user WITH PASSWORD = '1ReallyStrongPasswordShouldBeInsertedHere';
145 + CREATE USER netdata_user FOR LOGIN netdata_user;
146 + GRANT CONNECT SQL TO netdata_user;
147 + GRANT VIEW SERVER STATE TO netdata_user;
148 + GO
149 + ```
150 +
151 +2. **Enable Query Store**
152 +
153 + 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:
154 +
155 + ```tsql
156 + DECLARE @dbname NVARCHAR(max)
157 + DECLARE nd_user_cursor CURSOR FOR SELECT name
158 + FROM master.dbo.sysdatabases
159 + WHERE name NOT IN ('master', 'tempdb')
160 +
161 + OPEN nd_user_cursor
162 + FETCH NEXT FROM nd_user_cursor INTO @dbname
163 + WHILE @@FETCH_STATUS = 0
164 + BEGIN
165 + 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 )");
166 + FETCH next FROM nd_user_cursor INTO @dbname;
167 + END
168 + CLOSE nd_user_cursor
169 + DEALLOCATE nd_user_cursor
170 + GO
171 + ```
172 +
173 +
174
175 ### Configuration
176
177 #### File
178
179 The configuration file name for this integration is `netdata.conf`.
140 -Configuration for this specific integration is located in the `[plugin:windows]` section within that file.
180 +Configuration for this specific integration is located in the `[plugin:windows:PerflibMSSQL]` section within that file.
181
182 The file format is a modified INI syntax. The general structure is:
183
@@ -158,13 +198,48 @@ sudo ./edit-config netdata.conf
198 ```
199 #### Options
200
161 -
201 +These options allow the collector to connect to your MSSQL instance and collect transaction data from it.
202
203 | Name | Description | Default | Required |
204 |:----|:-----------|:-------|:--------:|
165 -| PerflibMSSQL | An option to enable or disable the data collection. | yes | no |
205 +| driver | ODBC driver used to connect to the SQL Server. | SQL Server | no |
206 +| server | Server address or instance name. | empty | yes |
207 +| address | Alternative to `server`; supports named pipes if the server supports them. | empty | yes |
208 +| uid | SQL Server user identifier. | empty | yes |
209 +| pwd | Password for the specified user. | empty | yes |
210 +| additional instances | Number of additional SQL Server instances to monitor. | 0 | no |
211 +| windows authentication | Set to yes to use Windows credentials instead of SQL Server authentication. | no | no |
212
213 #### Examples
168 -There are no configuration examples.
214
215 +##### Single Instance
216 +
217 +An example configuration with one instance.
218 +
219 +```yaml
220 +[plugin:windows:PerflibMSSQL]
221 + driver = SQL Server
222 + server = 127.0.0.1\\Dev, 1433
223 + uid = netdata_user
224 + pwd = 1ReallyStrongPasswordShouldBeInsertedHere
225 +
226 +```
227 +##### Multiple Instances
228 +
229 +An example configuration with two instances.
230 +
231 +```yaml
232 +[plugin:windows:PerflibMSSQL]
233 + driver = SQL Server
234 + server = 127.0.0.1\\Dev, 1433
235 + uid = netdata_user
236 + pwd = 1ReallyStrongPasswordShouldBeInsertedHere
237 + additional instances = 1
238 +[plugin:windows:PerflibMSSQL1]
239 + driver = SQL Server
240 + server = 127.0.0.1\\Production, 1434
241 + uid = netdata_user
242 + pwd = AnotherReallyStrongPasswordShouldBeInsertedHere2
243 +
244 +```
245