@cryptotaxi247 / netdata-1 / commits / 983b34053

Regenerate integrations docs (#21584)

Co-authored-by: ktsaou <2662304+ktsaou@users.noreply.github.com>

Netdata bot committed Jan 17, 2026 at 10:45 UTC 983b340536e754216c05fdc4cbb3bade73a16f52
5 files changed +534 -206
src/collectors/COLLECTORS.md
+1
@@ -193,6 +193,7 @@ Need a dedicated integration? [Submit a feature request](https://github.com/netd
193 | [MariaDB](https://github.com/netdata/netdata/blob/master/src/go/plugin/go.d/collector/mysql/integrations/mariadb.md) | This collector monitors the health and performance of MySQL servers and collects general statistics, replication and user metrics. |
194 | [MaxScale](https://github.com/netdata/netdata/blob/master/src/go/plugin/go.d/collector/maxscale/integrations/maxscale.md) | This collector monitors the activity and performance of MaxScale servers. |
195 | [Memcached](https://github.com/netdata/netdata/blob/master/src/go/plugin/go.d/collector/memcached/integrations/memcached.md) | Monitor Memcached metrics for proficient in-memory key-value store operations. |
196 +| [Microsoft SQL Server](https://github.com/netdata/netdata/blob/master/src/go/plugin/go.d/collector/mssql/integrations/microsoft_sql_server.md) | This collector monitors the health and performance of Microsoft SQL Server instances. |
197 | [MongoDB](https://github.com/netdata/netdata/blob/master/src/go/plugin/go.d/collector/mongodb/integrations/mongodb.md) | This collector monitors MongoDB servers. |
198 | [MySQL](https://github.com/netdata/netdata/blob/master/src/go/plugin/go.d/collector/mysql/integrations/mysql.md) | This collector monitors the health and performance of MySQL servers and collects general statistics, replication and user metrics. |
199 | [Oracle DB](https://github.com/netdata/netdata/blob/master/src/go/plugin/go.d/collector/oracledb/integrations/oracle_db.md) | This collector monitors the health and performance of Oracle DB servers and collects general statistics, replication and user metrics. |
src/collectors/windows.plugin/integrations/ms_sql_server.md
+1
@@ -325,6 +325,7 @@ These options allow the collector to connect to your MSSQL instance and collect
325 | pwd | Password for the specified user. | empty | yes |
326 | additional instances | Number of additional SQL Server instances to monitor. | 0 | no |
327 | windows authentication | Set to yes to use Windows credentials instead of SQL Server authentication. | no | no |
328 +| trust server certificate | Set to yes to trust the server's SSL certificate chain. | yes | no |
329 | express | Set to yes when running SQL Express version. | no | no |
330 | collect transactions | Run queries to collect information from the server's transactions. | yes | no |
331 | collect waits | Run queries to collect information from the server's lock waits. | yes | no |
src/go/plugin/go.d/collector/mssql/README.md deleted
-206
@@ -1,209 +0,0 @@
1 -# Microsoft SQL Server collector
2 -
3 -This collector monitors Microsoft SQL Server instances.
4 -
5 -## Requirements
6 -
7 -- SQL Server 2016 or later
8 -- A user with `VIEW SERVER STATE` permission
9 -
10 -## Metrics
11 -
12 -The collector provides the following metric categories:
13 -
14 -### Instance metrics
15 -
16 -- **User connections** - Number of active user connections
17 -- **Blocked processes** - Number of blocked processes
18 -- **Batch requests** - Number of batch requests per second
19 -- **SQL compilations/recompilations** - Query compilation statistics
20 -- **Auto-parameterization attempts** - Auto-param total, safe, and failed attempts
21 -- **SQL errors** - SQL error rate
22 -- **Page splits** - Number of page splits per second
23 -
24 -### Buffer and memory metrics
25 -
26 -- **Buffer cache hit ratio** - Percentage of pages found in buffer pool
27 -- **Page life expectancy** - How long pages stay in buffer pool
28 -- **Page reads/writes** - Buffer I/O operations
29 -- **Checkpoint pages** - Pages flushed during checkpoint
30 -- **Lazy writes** - Lazy writer operations per second
31 -- **Page lookups** - Page lookups per second
32 -- **Total server memory** - Memory used by SQL Server
33 -- **Connection memory** - Memory used for connections
34 -- **Memory grants pending** - Queries waiting for memory
35 -
36 -### Process memory metrics
37 -
38 -- **Resident memory** - SQL Server process resident memory (working set)
39 -- **Virtual memory** - SQL Server process committed virtual memory
40 -- **Memory utilization** - Percentage of committed memory in the working set
41 -- **Page faults** - Number of page faults incurred by the SQL Server process
42 -
43 -### OS memory metrics
44 -
45 -- **Physical memory** - OS physical memory (used and available)
46 -- **Page file** - OS page file (used and available)
47 -
48 -### Per-database metrics
49 -
50 -- **Transactions** - Transaction throughput
51 -- **Active transactions** - Currently active transactions
52 -- **Log bytes flushed** - Transaction log write throughput
53 -- **Log growths** - Number of times the transaction log has been expanded
54 -- **I/O stall time** - Read and write I/O stall (latency) time in milliseconds
55 -- **Data file size** - Size of database data files
56 -- **Backup/restore throughput** - Throughput of backup/restore operations
57 -- **Database state** - Online, restoring, recovering, pending, suspect, emergency, offline
58 -- **Read-only status** - Whether database is read-only or read-write
59 -- **Lock statistics** - Requests, waits, timeouts, deadlocks by lock type
60 -
61 -### Wait statistics
62 -
63 -- **Wait time** - Total, resource, and signal wait times by wait type
64 -- **Maximum wait time** - Maximum wait time by wait type
65 -- **Waiting tasks** - Number of tasks waiting
66 -
67 -### Lock metrics
68 -
69 -- **Lock count** - Current locks by resource type
70 -
71 -### SQL Agent jobs (optional)
72 -
73 -- **Job status** - Enabled/disabled status for each job
74 -
75 -### Replication metrics (optional)
76 -
77 -- **Replication status** - Publication status (started, succeeded, in_progress, idle, retrying, failed)
78 -- **Replication warnings** - Warning flags (expiration, latency, merge warnings)
79 -- **Replication latency** - Average, best, and worst latency in seconds
80 -- **Subscription count** - Number of subscriptions and running agents
81 -
82 -## Configuration
83 -
84 -Edit the `go.d/mssql.conf` configuration file using `edit-config`:
85 -
86 -```bash
87 -cd /etc/netdata
88 -sudo ./edit-config go.d/mssql.conf
89 -```
90 -
91 -### Basic configuration
92 -
93 -```yaml
94 -jobs:
95 - - name: local
96 - dsn: "sqlserver://netdata_user:password@localhost:1433"
97 -```
98 -
99 -### Connection string format
100 -
101 -The DSN follows the [go-mssqldb connection string format](https://github.com/microsoft/go-mssqldb#connection-parameters-and-dsn):
102 -
103 -```
104 -sqlserver://username:password@host:port?param=value
105 -```
106 -
107 -Common parameters:
108 -- `database` - Initial database to connect to
109 -- `encrypt` - Enable encryption (disable/false/true/strict)
110 -- `TrustServerCertificate` - Skip certificate validation (use only in dev/test environments)
111 -- `ApplicationIntent` - ReadOnly for read-only routing
112 -
113 -### Windows Authentication
114 -
115 -```yaml
116 -jobs:
117 - - name: local
118 - dsn: "sqlserver://localhost:1433?trusted_connection=yes"
119 -```
120 -
121 -### Named instance
122 -
123 -```yaml
124 -jobs:
125 - - name: named
126 - dsn: "sqlserver://netdata_user:password@localhost/INSTANCENAME"
127 -```
128 -
129 -### Configuration options
130 -
131 -| Option | Description | Default |
132 -|--------|-------------|---------|
133 -| `dsn` | SQL Server connection string | required |
134 -| `timeout` | Query timeout in seconds | 5 |
135 -| `vnode` | Virtual node name for multi-instance setups | "" |
136 -| `collect_transactions` | Collect per-database transaction metrics | true |
137 -| `collect_waits` | Collect wait statistics | true |
138 -| `collect_locks` | Collect lock metrics | true |
139 -| `collect_jobs` | Collect SQL Agent job status | true |
140 -| `collect_buffer_stats` | Collect buffer manager statistics | true |
141 -| `collect_database_size` | Collect data file sizes | true |
142 -| `collect_user_connections` | Collect user connection counts | true |
143 -| `collect_blocked_processes` | Collect blocked process count | true |
144 -| `collect_sql_errors` | Collect SQL error statistics | true |
145 -| `collect_database_status` | Collect database state and read-only status | true |
146 -| `collect_replication` | Collect replication monitoring metrics | true |
147 -
148 -## Permissions
149 -
150 -Create a monitoring user with the required permissions:
151 -
152 -```sql
153 -CREATE LOGIN netdata_user WITH PASSWORD = 'YourStrongPassword!';
154 -
155 -GRANT VIEW SERVER STATE TO netdata_user;
156 -
157 -USE msdb;
158 -CREATE USER netdata_user FOR LOGIN netdata_user;
159 -GRANT SELECT ON dbo.sysjobs TO netdata_user;
160 -```
161 -
162 -## Troubleshooting
163 -
164 -### Connection refused
165 -
166 -- Verify SQL Server is running
167 -- Check that TCP/IP is enabled in SQL Server Configuration Manager
168 -- Ensure the firewall allows connections on port 1433
169 -
170 -### Login failed
171 -
172 -- Verify credentials are correct
173 -- Ensure SQL Server is configured for mixed mode authentication
174 -- Check that the user has permission to connect
175 -
176 -### Permission denied on DMVs
177 -
178 -Grant VIEW SERVER STATE permission:
179 -
180 -```sql
181 -GRANT VIEW SERVER STATE TO netdata_user;
182 -```
183 -
184 -### SQL Agent job metrics not collected
185 -
186 -Grant access to the msdb database:
187 -
188 -```sql
189 -USE msdb;
190 -CREATE USER netdata_user FOR LOGIN netdata_user;
191 -GRANT SELECT ON dbo.sysjobs TO netdata_user;
192 -```
193 -
194 -### Replication metrics not collected
195 -
196 -For replication monitoring, grant access to the distribution database:
197 -
198 -```sql
199 -USE distribution;
200 -CREATE USER netdata_user FOR LOGIN netdata_user;
201 -GRANT SELECT ON dbo.MSreplication_monitordata TO netdata_user;
202 -GRANT SELECT ON dbo.MSpublications TO netdata_user;
203 -GRANT SELECT ON dbo.MSsubscriptions TO netdata_user;
204 -```
205 -
206 -Note: The distribution database only exists if replication is configured on the server.
src/go/plugin/go.d/collector/mssql/README.md new
+1
@@ -0,0 +1 @@
1 +integrations/microsoft_sql_server.md
\ No newline at end of file
src/go/plugin/go.d/collector/mssql/integrations/microsoft_sql_server.md new
+531
@@ -0,0 +1,531 @@
1 +<!--startmeta
2 +custom_edit_url: "https://github.com/netdata/netdata/edit/master/src/go/plugin/go.d/collector/mssql/README.md"
3 +meta_yaml: "https://github.com/netdata/netdata/edit/master/src/go/plugin/go.d/collector/mssql/metadata.yaml"
4 +sidebar_label: "Microsoft SQL Server"
5 +learn_status: "Published"
6 +learn_rel_path: "Collecting Metrics/Databases"
7 +most_popular: False
8 +keywords: ['db', 'database', 'mssql', 'sql server', 'microsoft']
9 +message: "DO NOT EDIT THIS FILE DIRECTLY, IT IS GENERATED BY THE COLLECTOR'S metadata.yaml FILE"
10 +endmeta-->
11 +
12 +# Microsoft SQL Server
13 +
14 +
15 +<img src="https://netdata.cloud/img/mssql.svg" width="150"/>
16 +
17 +
18 +Plugin: go.d.plugin
19 +Module: mssql
20 +
21 +<img src="https://img.shields.io/badge/maintained%20by-Netdata-%2300ab44" />
22 +
23 +## Overview
24 +
25 +This collector monitors the health and performance of Microsoft SQL Server instances.
26 +
27 +It collects metrics from:
28 +- Performance counters (buffer manager, memory manager, SQL statistics)
29 +- Dynamic management views (DMVs) for wait statistics, locks, and sessions
30 +- Per-database transaction and lock statistics
31 +- SQL Server Agent job status (if permissions allow)
32 +
33 +
34 +It connects to the SQL Server instance via TCP using the go-mssqldb driver and executes queries against:
35 +
36 +- `sys.dm_os_performance_counters` - Performance counter values
37 +- `sys.dm_exec_sessions` - Connection information
38 +- `sys.dm_os_wait_stats` - Wait statistics
39 +- `sys.dm_tran_locks` - Lock information
40 +- `sys.dm_io_virtual_file_stats` - I/O stall (latency) statistics
41 +- `sys.dm_os_process_memory` - SQL Server process memory
42 +- `sys.dm_os_sys_memory` - OS physical memory and page file
43 +- `sys.master_files` - Database file sizes
44 +- `msdb.dbo.sysjobs` - SQL Agent job status (optional)
45 +
46 +
47 +This collector is supported on all platforms.
48 +
49 +This collector supports collecting metrics from multiple instances of this integration, including remote instances.
50 +
51 +The monitoring user requires the VIEW SERVER STATE permission to access DMVs.
52 +For SQL Agent job monitoring, access to the msdb database is required.
53 +
54 +
55 +### Default Behavior
56 +
57 +#### Auto-Detection
58 +
59 +By default, it tries to connect to SQL Server on localhost:1433 without authentication.
60 +You must configure proper credentials for monitoring.
61 +
62 +
63 +#### Limits
64 +
65 +The default configuration for this integration does not impose any limits on data collection.
66 +
67 +#### Performance Impact
68 +
69 +The collector executes lightweight queries against system views.
70 +Most queries complete in milliseconds and have minimal impact on server performance.
71 +
72 +
73 +## Metrics
74 +
75 +Metrics grouped by *scope*.
76 +
77 +The scope defines the instance that the metric belongs to. An instance is uniquely identified by a set of labels.
78 +
79 +
80 +
81 +### Per Microsoft SQL Server instance
82 +
83 +These metrics refer to the entire SQL Server instance.
84 +
85 +This scope has no labels.
86 +
87 +Metrics:
88 +
89 +| Metric | Dimensions | Unit | SQL Server 2016+ | Azure SQL Database |
90 +|:------|:----------|:----|:---:|:---:|
91 +| mssql.user_connections | user | connections | • | • |
92 +| mssql.session_connections | user, internal | connections | • | • |
93 +| mssql.blocked_processes | blocked | processes | • | • |
94 +| mssql.batch_requests | batch | requests/s | • | • |
95 +| mssql.compilations | compilations | compilations/s | • | • |
96 +| mssql.recompilations | recompilations | recompilations/s | • | • |
97 +| mssql.auto_param_attempts | total, safe, failed | attempts/s | • | • |
98 +| mssql.sql_errors | errors | errors/s | • | • |
99 +| mssql.buffer_cache_hit_ratio | hit_ratio | percentage | • | • |
100 +| mssql.buffer_page_life_expectancy | life_expectancy | seconds | • | • |
101 +| mssql.buffer_page_iops | read, written | pages/s | • | • |
102 +| mssql.buffer_checkpoint_pages | flushed | pages/s | • | • |
103 +| mssql.buffer_page_lookups | lookups | lookups/s | • | • |
104 +| mssql.buffer_lazy_writes | lazy_writes | writes/s | • | • |
105 +| mssql.memory_total | memory | bytes | • | • |
106 +| mssql.memory_connection | memory | bytes | • | • |
107 +| mssql.memory_pending_grants | pending | processes | • | • |
108 +| mssql.memory_external_benefit | benefit | benefit | • | • |
109 +| mssql.page_splits | page | splits/s | • | • |
110 +| mssql.process_memory_resident | resident | bytes | • | • |
111 +| mssql.process_memory_virtual | virtual | bytes | • | • |
112 +| mssql.process_memory_utilization | utilization | percentage | • | • |
113 +| mssql.process_page_faults | page_faults | faults | • | • |
114 +| mssql.os_memory | used, available | bytes | • | • |
115 +| mssql.os_pagefile | used, available | bytes | • | • |
116 +
117 +### Per database
118 +
119 +These metrics refer to individual databases.
120 +
121 +Labels:
122 +
123 +| Label | Description |
124 +|:-----------|:----------------|
125 +| database | Database name |
126 +
127 +Metrics:
128 +
129 +| Metric | Dimensions | Unit | SQL Server 2016+ | Azure SQL Database |
130 +|:------|:----------|:----|:---:|:---:|
131 +| mssql.database_active_transactions | active | transactions | • | • |
132 +| mssql.database_transactions | transactions | transactions/s | • | • |
133 +| mssql.database_write_transactions | write | transactions/s | • | • |
134 +| mssql.database_log_flushes | flushes | flushes/s | • | • |
135 +| mssql.database_log_flushed | flushed | bytes/s | • | • |
136 +| mssql.database_log_growths | growths | growths | • | • |
137 +| mssql.database_io_stall | read, write | ms | • | • |
138 +| mssql.database_data_file_size | size | bytes | • | • |
139 +| mssql.database_backup_restore_throughput | throughput | bytes/s | • | • |
140 +| mssql.database_state | online, restoring, recovering, pending, suspect, emergency, offline | state | • | • |
141 +| mssql.database_read_only | read_only, read_write | status | • | • |
142 +
143 +### Per lock stats
144 +
145 +These metrics refer to lock statistics by lock resource type (from performance counters).
146 +
147 +Labels:
148 +
149 +| Label | Description |
150 +|:-----------|:----------------|
151 +| resource | Lock resource type (Database, File, Object, Page, Key, Extent, RID, HoBT, etc.) |
152 +
153 +Metrics:
154 +
155 +| Metric | Dimensions | Unit | SQL Server 2016+ | Azure SQL Database |
156 +|:------|:----------|:----|:---:|:---:|
157 +| mssql.lock_stats_deadlocks | deadlocks | deadlocks/s | • | • |
158 +| mssql.lock_stats_waits | waits | waits/s | • | • |
159 +| mssql.lock_stats_timeouts | timeouts | timeouts/s | • | • |
160 +| mssql.lock_stats_requests | requests | requests/s | • | • |
161 +
162 +### Per lock resource
163 +
164 +These metrics refer to lock resource types (from sys.dm_tran_locks).
165 +
166 +Labels:
167 +
168 +| Label | Description |
169 +|:-----------|:----------------|
170 +| resource | Lock resource type (Database, File, Object, Page, Key, etc.) |
171 +
172 +Metrics:
173 +
174 +| Metric | Dimensions | Unit | SQL Server 2016+ | Azure SQL Database |
175 +|:------|:----------|:----|:---:|:---:|
176 +| mssql.locks_by_resource | locks | locks | • | • |
177 +
178 +### Per wait type
179 +
180 +These metrics refer to individual wait types (from sys.dm_os_wait_stats).
181 +
182 +Labels:
183 +
184 +| Label | Description |
185 +|:-----------|:----------------|
186 +| wait_type | Wait type name |
187 +| wait_category | Wait category (CPU, Lock, Latch, Buffer IO, etc.) |
188 +
189 +Metrics:
190 +
191 +| Metric | Dimensions | Unit | SQL Server 2016+ | Azure SQL Database |
192 +|:------|:----------|:----|:---:|:---:|
193 +| mssql.wait_total_time | duration | ms | • | • |
194 +| mssql.wait_resource_time | duration | ms | • | • |
195 +| mssql.wait_signal_time | duration | ms | • | • |
196 +| mssql.wait_max_time | max_time | ms | • | • |
197 +| mssql.wait_count | waits | waits/s | • | • |
198 +
199 +### Per job
200 +
201 +These metrics refer to SQL Server Agent jobs.
202 +
203 +Labels:
204 +
205 +| Label | Description |
206 +|:-----------|:----------------|
207 +| job_name | Job name |
208 +
209 +Metrics:
210 +
211 +| Metric | Dimensions | Unit | SQL Server 2016+ | Azure SQL Database |
212 +|:------|:----------|:----|:---:|:---:|
213 +| mssql.job_status | enabled, disabled | status | • | • |
214 +
215 +### Per replication
216 +
217 +These metrics refer to SQL Server replication publications.
218 +
219 +Labels:
220 +
221 +| Label | Description |
222 +|:-----------|:----------------|
223 +| publisher_db | Publisher database name |
224 +| publication | Publication name |
225 +
226 +Metrics:
227 +
228 +| Metric | Dimensions | Unit | SQL Server 2016+ | Azure SQL Database |
229 +|:------|:----------|:----|:---:|:---:|
230 +| mssql.replication_status | started, succeeded, in_progress, idle, retrying, failed | status | • | • |
231 +| mssql.replication_warning | expiration, latency, merge_expiration, merge_slow_duration, merge_fast_duration, merge_fast_speed, merge_slow_speed | flags | • | • |
232 +| mssql.replication_latency | average, best, worst | seconds | • | • |
233 +| mssql.replication_subscriptions | total, agents_running | subscriptions | • | • |
234 +
235 +
236 +
237 +## Alerts
238 +
239 +There are no alerts configured by default for this integration.
240 +
241 +
242 +## Setup
243 +
244 +
245 +You can configure the **mssql** collector in two ways:
246 +
247 +| Method | Best for | How to |
248 +|-----------------------|------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------|
249 +| [**UI**](#via-ui) | Fast setup without editing files | Go to **Nodes → Configure this node → Collectors → Jobs**, search for **mssql**, then click **+** to add a job. |
250 +| [**File**](#via-file) | If you prefer configuring via file, or need to automate deployments (e.g., with Ansible) | Edit `go.d/mssql.conf` and add a job. |
251 +
252 +:::important
253 +
254 +UI configuration requires paid Netdata Cloud plan.
255 +
256 +:::
257 +
258 +
259 +### Prerequisites
260 +
261 +#### Create monitoring user
262 +
263 +Create a SQL Server login with VIEW SERVER STATE permission:
264 +
265 +```sql
266 +-- Create login
267 +CREATE LOGIN netdata_user WITH PASSWORD = 'YourStrongPassword!';
268 +
269 +-- Grant VIEW SERVER STATE (required for DMVs)
270 +GRANT VIEW SERVER STATE TO netdata_user;
271 +
272 +-- Optional: Grant access to msdb for SQL Agent job monitoring
273 +USE msdb;
274 +CREATE USER netdata_user FOR LOGIN netdata_user;
275 +GRANT SELECT ON dbo.sysjobs TO netdata_user;
276 +
277 +-- Optional: Grant access to distribution database for replication monitoring
278 +-- (only if replication is configured)
279 +USE distribution;
280 +CREATE USER netdata_user FOR LOGIN netdata_user;
281 +GRANT SELECT ON dbo.MSreplication_monitordata TO netdata_user;
282 +GRANT SELECT ON dbo.MSpublications TO netdata_user;
283 +GRANT SELECT ON dbo.MSsubscriptions TO netdata_user;
284 +```
285 +
286 +**Required permissions:**
287 +- `VIEW SERVER STATE` - Access to dynamic management views
288 +
289 +**Optional permissions:**
290 +- `SELECT on msdb.dbo.sysjobs` - SQL Agent job status monitoring
291 +- `SELECT on distribution.dbo.MSreplication_monitordata` - Replication monitoring
292 +- `SELECT on distribution.dbo.MSpublications` - Publication information
293 +- `SELECT on distribution.dbo.MSsubscriptions` - Subscription counts
294 +
295 +
296 +
297 +### Configuration
298 +
299 +#### Options
300 +
301 +The following options can be defined globally: update_every, autodetection_retry.
302 +
303 +
304 +<details open><summary>Config options</summary>
305 +
306 +
307 +
308 +| Group | Option | Description | Default | Required |
309 +|:------|:-----|:------------|:--------|:---------:|
310 +| **Collection** | update_every | Data collection interval (seconds). | 10 | no |
311 +| | autodetection_retry | Autodetection retry interval (seconds). Set 0 to disable. | 0 | no |
312 +| **Target** | dsn | SQL Server DSN (Data Source Name). See [DSN syntax](https://github.com/microsoft/go-mssqldb#connection-parameters-and-dsn). | sqlserver://localhost:1433 | yes |
313 +| | timeout | Query timeout (seconds). | 5 | no |
314 +| **Collection Options** | collect_transactions | Collect per-database transaction metrics. | yes | no |
315 +| | collect_waits | Collect wait statistics from sys.dm_os_wait_stats. | yes | no |
316 +| | collect_locks | Collect lock metrics from sys.dm_tran_locks. | yes | no |
317 +| | collect_jobs | Collect SQL Agent job status. | yes | no |
318 +| | collect_buffer_stats | Collect buffer manager and memory statistics. | yes | no |
319 +| | collect_database_size | Collect data file sizes for each database. | yes | no |
320 +| | collect_user_connections | Collect user connection counts. | yes | no |
321 +| | collect_blocked_processes | Collect blocked process count. | yes | no |
322 +| | collect_sql_errors | Collect SQL error statistics. | yes | no |
323 +| | collect_database_status | Collect database state and read-only status. | yes | no |
324 +| | collect_replication | Collect replication monitoring metrics (requires distribution database). | yes | no |
325 +| **Virtual Node** | vnode | Associates this data collection job with a [Virtual Node](https://learn.netdata.cloud/docs/netdata-agent/configuration/organize-systems-metrics-and-alerts#virtual-nodes). | | no |
326 +
327 +
328 +</details>
329 +
330 +
331 +#### via UI
332 +
333 +Configure the **mssql** collector from the Netdata web interface:
334 +
335 +1. Go to **Nodes**.
336 +2. Select the node **where you want the mssql data-collection job to run** and click the :gear: (**Configure this node**). That node will run the data collection.
337 +3. The **Collectors → Jobs** view opens by default.
338 +4. In the Search box, type _mssql_ (or scroll the list) to locate the **mssql** collector.
339 +5. Click the **+** next to the **mssql** collector to add a new job.
340 +6. Fill in the job fields, then click **Test** to verify the configuration and **Submit** to save.
341 + - **Test** runs the job with the provided settings and shows whether data can be collected.
342 + - If it fails, an error message appears with details (for example, connection refused, timeout, or command execution errors), so you can adjust and retest.
343 +
344 +
345 +#### via File
346 +
347 +The configuration file name for this integration is `go.d/mssql.conf`.
348 +
349 +The file format is YAML. Generally, the structure is:
350 +
351 +```yaml
352 +update_every: 1
353 +autodetection_retry: 0
354 +jobs:
355 + - name: some_name1
356 + - name: some_name2
357 +```
358 +You can edit the configuration file using the [`edit-config`](https://github.com/netdata/netdata/blob/master/docs/netdata-agent/configuration/README.md#edit-configuration-files) script from the
359 +Netdata [config directory](https://github.com/netdata/netdata/blob/master/docs/netdata-agent/configuration/README.md#locate-your-config-directory).
360 +
361 +```bash
362 +cd /etc/netdata 2>/dev/null || cd /opt/netdata/etc/netdata
363 +sudo ./edit-config go.d/mssql.conf
364 +```
365 +
366 +##### Examples
367 +
368 +###### Basic configuration
369 +
370 +Connect to local SQL Server with SQL authentication.
371 +
372 +<details open><summary>Config</summary>
373 +
374 +```yaml
375 +jobs:
376 + - name: local
377 + dsn: "sqlserver://netdata_user:password@localhost:1433"
378 +
379 +```
380 +</details>
381 +
382 +###### Windows Authentication
383 +
384 +Connect using Windows integrated authentication.
385 +
386 +<details open><summary>Config</summary>
387 +
388 +```yaml
389 +jobs:
390 + - name: local
391 + dsn: "sqlserver://localhost:1433?trusted_connection=yes"
392 +
393 +```
394 +</details>
395 +
396 +###### Named instance
397 +
398 +Connect to a named SQL Server instance.
399 +
400 +<details open><summary>Config</summary>
401 +
402 +```yaml
403 +jobs:
404 + - name: named_instance
405 + dsn: "sqlserver://netdata_user:password@localhost/INSTANCENAME"
406 +
407 +```
408 +</details>
409 +
410 +###### Remote server
411 +
412 +Connect to a remote SQL Server.
413 +
414 +<details open><summary>Config</summary>
415 +
416 +```yaml
417 +jobs:
418 + - name: remote
419 + dsn: "sqlserver://netdata_user:password@192.168.1.100:1433"
420 +
421 +```
422 +</details>
423 +
424 +###### Multi-instance
425 +
426 +> **Note**: When you define multiple jobs, their names must be unique.
427 +
428 +Monitoring multiple SQL Server instances.
429 +
430 +
431 +<details open><summary>Config</summary>
432 +
433 +```yaml
434 +jobs:
435 + - name: production
436 + dsn: "sqlserver://netdata_user:password@prod-sql:1433"
437 +
438 + - name: development
439 + dsn: "sqlserver://netdata_user:password@dev-sql:1433"
440 +
441 +```
442 +</details>
443 +
444 +
445 +
446 +## Troubleshooting
447 +
448 +### Debug Mode
449 +
450 +**Important**: Debug mode is not supported for data collection jobs created via the UI using the Dyncfg feature.
451 +
452 +To troubleshoot issues with the `mssql` collector, run the `go.d.plugin` with the debug option enabled. The output
453 +should give you clues as to why the collector isn't working.
454 +
455 +- Navigate to the `plugins.d` directory, usually at `/usr/libexec/netdata/plugins.d/`. If that's not the case on
456 + your system, open `netdata.conf` and look for the `plugins` setting under `[directories]`.
457 +
458 + ```bash
459 + cd /usr/libexec/netdata/plugins.d/
460 + ```
461 +
462 +- Switch to the `netdata` user.
463 +
464 + ```bash
465 + sudo -u netdata -s
466 + ```
467 +
468 +- Run the `go.d.plugin` to debug the collector:
469 +
470 + ```bash
471 + ./go.d.plugin -d -m mssql
472 + ```
473 +
474 + To debug a specific job:
475 +
476 + ```bash
477 + ./go.d.plugin -d -m mssql -j jobName
478 + ```
479 +
480 +### Getting Logs
481 +
482 +If you're encountering problems with the `mssql` collector, follow these steps to retrieve logs and identify potential issues:
483 +
484 +- **Run the command** specific to your system (systemd, non-systemd, or Docker container).
485 +- **Examine the output** for any warnings or error messages that might indicate issues. These messages should provide clues about the root cause of the problem.
486 +
487 +#### System with systemd
488 +
489 +Use the following command to view logs generated since the last Netdata service restart:
490 +
491 +```bash
492 +journalctl _SYSTEMD_INVOCATION_ID="$(systemctl show --value --property=InvocationID netdata)" --namespace=netdata --grep mssql
493 +```
494 +
495 +#### System without systemd
496 +
497 +Locate the collector log file, typically at `/var/log/netdata/collector.log`, and use `grep` to filter for collector's name:
498 +
499 +```bash
500 +grep mssql /var/log/netdata/collector.log
501 +```
502 +
503 +**Note**: This method shows logs from all restarts. Focus on the **latest entries** for troubleshooting current issues.
504 +
505 +#### Docker Container
506 +
507 +If your Netdata runs in a Docker container named "netdata" (replace if different), use this command:
508 +
509 +```bash
510 +docker logs netdata 2>&1 | grep mssql
511 +```
512 +
513 +### Connection refused
514 +
515 +Ensure SQL Server is running and accepting TCP connections on the configured port.
516 +Check that the SQL Server Browser service is running if using named instances.
517 +
518 +
519 +### Login failed
520 +
521 +Verify the username and password in the DSN are correct.
522 +Ensure SQL Server is configured for mixed mode authentication if using SQL logins.
523 +
524 +
525 +### Permission denied
526 +
527 +The monitoring user needs VIEW SERVER STATE permission.
528 +Grant it with: `GRANT VIEW SERVER STATE TO netdata_user;`
529 +
530 +
531 +