-
Notifications
You must be signed in to change notification settings - Fork 1.4k
/
Copy pathspec.yaml
981 lines (927 loc) · 39.9 KB
/
spec.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
name: SQL Server
files:
- name: sqlserver.yaml
options:
- template: init_config
options:
- name: custom_metrics
description: |
Collect custom metrics and send them to Datadog based on
your SQL server counters.
See https://docs.datadoghq.com/integrations/guide/collect-sql-server-custom-metrics/
value:
type: array
items:
type: object
example:
- name: sqlserver.clr.execution
counter_name: CLR Execution
- name: propagate_agent_tags
description: |
Set to `true` to propagate the tags from `datadog.yaml` and the agent host tags to the check.
When set to `true`, the tags from the agent host are added to the check's tags for all instances.
value:
example: false
type: boolean
- template: init_config/db
- template: init_config/default
- template: instances
description: |
Every instance is scheduled independent of the others.
Note: All '%' characters must be escaped as '%%'.
options:
- name: host
description: |
Host and port of your SQL server. If a port is ommitted, a default port of 1433 will be used.
If you use Sql Server Browser Service or a similar port autodiscovery service, pass in a port
of 0 to omit port from your connection string. This should allow SSBS to autodiscover the
correct database port.
required: true
value:
type: string
example: <HOST>,<PORT>
- name: username
description: Username for the Datadog-SQL server check user. It will be ignored if using Windows authentication.
value:
type: string
- name: password
description: Password for the Datadog-SQL server check user. It will be ignored if using Windows authentication.
value:
type: string
- name: server_version
description: |
Server version year of sqlserver the agent will connect to.
Important for validating connection string attributes for older sqlserver versions.
This is required if connecting to a SQLServer instance older than 2014.
value:
type: string
example: "2014"
- name: database
description: |
Database name to query. Not compatible with `database_autodiscovery`.
value:
type: string
example: master
- name: reported_hostname
description: |
Set the reported hostname for this instance. This value overrides the hostname detected by the Agent
and can be useful to set a custom hostname when connecting to a remote database through a proxy.
value:
type: string
- name: database_autodiscovery
description: |
Auto-discover and monitor databases. Supported for the metrics check.
If `true`, overrides `database` option.
Can be combined with `autodiscovery_include` and `autodiscovery_exclude` options.
value:
type: boolean
example: false
- name: autodiscovery_include
description: |
Regular expression for database names to include as part of `database_autodiscovery`.
Will report metrics for databases that are found in this instance, ignores databases listed but not found.
Character casing is ignored. The regular expressions start matching from the beginning, so
to match anywhere, prepend `.*`. For exact matches append `$`.
Defaults to `.*` to include everything.
value:
type: array
items:
type: string
example:
- master$
- AdventureWorks.*
- name: autodiscovery_exclude
description: |
Regular expression for database names to exclude as part of `database_autodiscovery`.
Character casing is ignored. The regular expressions start matching from the beginning, so
to match anywhere, prepend `.*`. For exact matches append `$`.
In case of conflicts, database exclusion via `autodiscovery_exclude` takes precedence over
those found via `autodiscovery_include`.
value:
type: array
items:
type: string
example:
- model
- msdb
- model_replicatedmaster
- model_msdb
- name: database_autodiscovery_interval
description: |
Frequency in seconds of scans for new databases. Defaults to `3600`.
value:
type: integer
example: 3600
- name: autodiscovery_db_service_check
description: |
When enabled with database autodiscovery, attempts to connect to the list of
autodiscovered databases and submits a service check that signifies whether
the agent can connect to that database or not.
enabled: true
value:
type: boolean
example: false
display_default: true
- name: database_metrics
description: |
Configure the collection of database metrics
options:
- name: ao_metrics
description: |
Configure collection of AlwaysOn availability group metrics.
Set `ao_metrics.enabled` to true to enable collection of AlwaysOn metrics. Defaults to false.
When `ao_metrics.enabled` is True, use `ao_metrics.availability_group` to specify the
resource group id of a specific availability group that you would like to monitor.
If no availability group is specified, then we will collect AlwaysOn metrics for all
availability groups on the current replica.
Primary replicas may emit metrics for remote secondary replicas
in the same availability group. If `ao_metrics.only_emit_local` is set to true,
the primary replica will only emit information local to itself.
If `ao_metrics.ao_database` is set, AlwaysOn metrics are only emitted for the selected `ao_database`.
value:
type: object
properties:
- name: enabled
type: boolean
example: false
- name: availability_group
type: string
- name: only_emit_local
type: boolean
example: false
- name: ao_database
type: string
- name: db_backup_metrics
description: |
Configure collection of database backup metrics.
Set `db_backup_metrics.enabled` to true to enable collection of database backup metrics. Defaults to true.
Use `db_backup_metrics.collection_interval` to set the interval (in seconds) for the collection of
database backup metrics. Defaults to 300 seconds (5 minutes). If you intend on updating this value,
it is strongly recommended to use a consistent value throughout all SQL Server agent deployments.
hidden: true
value:
type: object
properties:
- name: enabled
type: boolean
example: true
- name: collection_interval
type: integer
example: 300
display_default: 300
- name: db_files_metrics
description: |
Configure collection of database files metrics.
Set `db_files_metrics.enabled` to true to enable collection of database files metrics. Defaults to true.
hidden: true
value:
type: object
properties:
- name: enabled
type: boolean
example: true
- name: db_stats_metrics
description: |
Configure collection of database stats metrics
Set `db_stats_metrics.enabled` to true to enable collection of database stats metrics. Defaults to true.
hidden: true
value:
type: object
properties:
- name: enabled
type: boolean
example: true
- name: db_fragmentation_metrics
description: |
Configure collection of database fragmentation metrics.
Note these queries can be resource intensive on large datasets. Recommend to limit these via
autodiscovery or specific database instances.
Set `db_fragmentation_metrics.enabled` to true to enable collection of
database index fragmentation statistics. Defaults to false.
Use `db_fragmentation_metrics.enabled_tempdb` to enable collection of database index fragmentation statistics
in tempdb database from the `sys.dm_db_index_physical_stats` DMF.
By default, we do not collect index fragmentation statistics in the tempdb database, as those queries
might cause blocking. This configuration parameter allows enabling the collection of this metric.
This parameter is ignored if the 'enabled' option for 'db_fragmentation_metrics' is set to false.
Use `db_fragmentation_metrics.collection_interval` to set the interval (in seconds) for the collection of
database fragmentation metrics from the `sys.dm_db_index_physical_stats` DMF.
Defaults to 300 seconds (5 minutes). If you intend on updating this value, it is strongly recommended
to use a consistent value throughout all SQL Server agent deployments.
value:
type: object
properties:
- name: enabled
type: boolean
example: false
- name: enabled_tempdb
type: boolean
example: false
- name: collection_interval
type: integer
example: 300
display_default: 300
- name: fci_metrics
description: |
Configure collection of Failover Cluster Instance metrics. Note that these metrics
requires a SQLServer set up with Failover Clustering enabled.
Set `fci_metrics.enabled` to true to enable collection of Failover Cluster Instance metrics.
Defaults to false.
value:
type: object
properties:
- name: enabled
type: boolean
example: false
- name: file_stats_metrics
description: |
Configure collection of file stats metrics.
Set `file_stats_metrics.enabled` to true to enable collection of file stats metrics. Defaults to true.
hidden: true
value:
type: object
properties:
- name: enabled
type: boolean
example: true
- name: index_usage_metrics
description: |
Configure collection of user table index usage statistics from the `sys.dm_db_index_usage_stats` DMV.
Because the `sys.dm_db_index_usage_stats` view is scoped to the current database, enable
`database_autodiscovery` or set `database`.
Set `index_usage_metrics.enabled` to true to enable collection of user table index usage statistics.
Defaults to false.
Use `index_usage_metrics.enabled_tempdb` to enable collection of user table index usage statistics in tempdb
database from the `sys.dm_db_index_usage_stats` DMV.
By default, we do not collect index usage statistics in the tempdb database, as those queries
might cause blocking. This configuration parameter allows enabling the collection of this metric.
This parameter is ignored if 'index_usage_metrics.enabled' is set to false.
Use `index_usage_metrics.collection_interval` to set the interval (in seconds) for the collection of index
usage statistics from the `sys.dm_db_index_usage_stats` DMV.
Defaults to 300 seconds (5 minutes). If you intend on updating this value, it is strongly recommended
to use a consistent value throughout all SQL Server agent deployments.
value:
type: object
properties:
- name: enabled
type: boolean
example: false
- name: enabled_tempdb
type: boolean
example: false
- name: collection_interval
type: integer
example: 300
display_default: 300
- name: instance_metrics
description: |
Configure collection of server-level instance metrics. When setting up multiple instances for
different databases on the same host these metrics will be duplicated unless this option is turned off.
Set `instance_metrics.enabled` to true to enable collection of server-level instance metrics.
Defaults to true.
value:
type: object
properties:
- name: enabled
type: boolean
example: true
- name: master_files_metrics
description: |
Configure collection of database file size and state from `sys.master_files`
Set `master_files_metrics.enabled` to true to enable collection of database file size and state metrics.
Defaults to false.
value:
type: object
properties:
- name: enabled
type: boolean
example: false
- name: primary_log_shipping_metrics
description: |
Configure collection of metrics for a log shipping setup. Required to run against the
primary instance in a transaction log shipping configuration. Note that
the Datadog user needs to be present in msdb and must be added to the db_datareader role.
Set `primary_log_shipping_metrics.enabled` to true to enable collection of primary log shipping metrics.
Defaults to false.
value:
type: object
properties:
- name: enabled
type: boolean
example: false
- name: secondary_log_shipping_metrics
description: |
Configure collection of metrics for a log shipping setup. Required to run against the
secondary instance in a transaction log shipping configuration. Note that
the Datadog user needs to be present in msdb and must be added to the db_datareader role.
Set `secondary_log_shipping_metrics.enabled` to true to enable collection of secondary log shipping metrics.
Defaults to false.
value:
type: object
properties:
- name: enabled
type: boolean
example: false
- name: server_state_metrics
description: |
Configure collection of server state metrics
Set `server_state_metrics.enabled` to true to enable collection of server state metrics. Defaults to true.
hidden: true
value:
type: object
properties:
- name: enabled
type: boolean
example: true
- name: task_scheduler_metrics
description: |
Configure collection of additional Task and Scheduler metrics.
Set `task_scheduler_metrics.enabled` to true to enable collection of additional Task and Scheduler metrics.
Defaults to false.
value:
type: object
properties:
- name: enabled
type: boolean
example: false
- name: tempdb_file_space_usage_metrics
description: |
Configure collection of tempdb file space usage metrics for how space is used in tempdb data files.
Set `tempdb_file_space_usage_metrics.enabled` to true to enable collection of
tempdb file space usage metrics. Defaults to true.
value:
type: object
properties:
- name: enabled
type: boolean
example: true
- name: xe_metrics
description: |
Configure collection of extended events (XE) metrics.
Set `xe_metrics.enabled` to true to enable collection of extended events metrics. Defaults to false.
value:
type: object
properties:
- name: enabled
type: boolean
example: false
- name: agent_jobs
description: Configure collection of SQL Server Agent jobs events and metrics
options:
- name: enabled
description: |
Enable collection of agent jobs events and metrics. Requires `dbm: true`.
value:
type: boolean
example: false
- name: collection_interval
description: |
Configure the interval (in seconds) for the collection of agent jobs events and metrics.
Set the query metric collection interval (in seconds).
value:
type: number
example: 15
- name: history_row_limit
description: |
Set the maximum number of job step rows that can be retrieved in a single check run.
value:
type: integer
example: 10000
- name: db_fragmentation_object_names
description: |
Fragmentation metrics normally emit metrics for all objects within a database.
This option allows you to specify database object names to query for fragmentation metrics.
Note: Each object name is unique to each database.
value:
type: array
items:
type: string
- name: adoprovider
description: |
Choose the ADO provider. Note that the (default) provider
SQLOLEDB is being deprecated. To use the newer MSOLEDBSQL
provider, set the adoprovider to "MSOLEDBSQL" below or "MSOLEDBSQL19" for version 19 of the driver.
You will also need to download the new provider from
https://docs.microsoft.com/en-us/sql/connect/oledb/oledb-driver-for-sql-server?view=sql-server-2017
value:
type: string
example: SQLOLEDB
- name: connector
description: |
Change the connection method from adodbapi (the default) to
odbc (valid connector names are 'odbc' and 'adodbapi')
Note: 'adodbapi` is only available on Windows
value:
type: string
example: adodbapi
- name: driver
description: If using odbc, use the named driver.
value:
type: string
example: SQL Server
- name: dsn
description: If using odbc, configure a connection using a DSN.
value:
type: string
- name: connection_string
description: |
Specify a custom connection string to be used
Ex: "ApplicationIntent=ReadWrite" or "Trusted_Connection=Yes" to use Windows Authentication
(note that in this case the connection will be performed with the `ddagentuser` user, you can
find more information about this user in https://docs.datadoghq.com/agent/faq/windows-agent-ddagent-user/)
Please note that certain connection string values will vary depending on the connection Provider used,
for example:
* "OLE DB" provider uses "MultiSubnetFailover=Yes"
* "ADO" provider uses "MultiSubnetFailover=True"
value:
type: string
example: "<CONNECTION_STRING>"
- name: dbm
description: |
Set to `true` to enable Database Monitoring.
value:
type: boolean
example: false
display_default: false
- name: collect_settings
description: Configure collection of sys.configurations.
options:
- name: enabled
description: |
Enable collection of sys.configurations. Requires `dbm: true`.
value:
type: boolean
example: false
- name: collection_interval
description: |
Set the database settings collection interval (in seconds). Each collection involves a single query to
`sys.configurations`.
value:
type: number
example: 600
- name: query_metrics
description: Configure collection of query metrics
options:
- name: enabled
description: |
Enable collection of query metrics. Requires `dbm: true`.
value:
type: boolean
example: true
- name: disable_secondary_tags
description: |
Disable the secondary tags on query aggregate metrics, such as `user` and `database`. This is an optimization
for certain database workloads which result in long metric collection times.
value:
type: boolean
example: false
hidden: true
- name: collection_interval
description: |
Set the query metric collection interval (in seconds). Each collection involves one or more queries to
the SQL Server Query Plan Cache. If a non-default value is chosen then that exact same value must be used
for *every* check instance. Running different instances with different collection intervals is not supported.
value:
type: number
example: 60
- name: dm_exec_query_stats_row_limit
description: |
Set the maximum number of query stats rows that can be retrieved in a single check run.
value:
type: integer
example: 10000
- name: samples_per_hour_per_query
description: |
Set the rate limit for the number of query sample events that are ingested per hour and per normalized
execution plan.
value:
type: integer
example: 4
- name: enforce_collection_interval_deadline
description: |
By default, plan collection stops if it is time for the next run of the query metrics & plans loop. This
means that some plans may not be collected. If it is necessary to collect all of the plans and in doing so
cause delays in collecting query metrics, then this deadline can be disabled by setting this option to
false.
value:
type: boolean
example: True
hidden: true
- name: max_queries
description: |
Limit the number of queries sent to the backend.
Note: The only time this value would need to be set is in special cases where the query limit
applied on the backend is being modified.
value:
type: integer
example: 250
display_default: 250
hidden: true
- name: lookback_window
description: |
Queries whose last execution completed after the lookback window are excluded from
metrics collection. Set a longer lookback window (in seconds) to capture infrequently
run queries.
value:
type: integer
display_default: 2 * collection_interval
example: 600
- name: procedure_metrics
description: Configure collection of procedure metrics
options:
- name: enabled
description: |
Enable collection of procedure metrics. Requires `dbm: true`.
value:
type: boolean
example: true
- name: collection_interval
description: |
Set the procedure metric collection interval (in seconds). Each collection involves one query to
sys.dm_exec_procedure_stats. If a non-default value is chosen then that exact same value must
be used for *every* check instance. Running different instances with different collection intervals
is not supported.
value:
type: number
example: 60
- name: dm_exec_procedure_stats_row_limit
description: |
Set the maximum number of procedure stats rows that can be retrieved in a single check run.
value:
type: integer
example: 10000
- name: max_procedures
description: |
Limit the number of procedures sent to the backend.
Note: The only time this value would need to be set is in special cases where the procedure limit
applied on the backend is being modified.
value:
type: integer
example: 250
display_default: 250
hidden: true
- name: query_activity
description: Configure collection of active sessions monitoring
options:
- name: enabled
description: |
Enable collection of active sessions. Requires `dbm: true`.
value:
type: boolean
example: true
- name: collection_interval
description: |
Set the activity collection interval in seconds. Each collection involves querying several
different DMV tables such as `dm_exec_requests`, `dm_exec_sessions`, and `dm_exec_sql_text`.
If a non-default value is chosen, then that exact same value must be used for *every* check instance.
Running different instances with different collection intervals is not supported.
value:
type: number
example: 10
- name: sample_recently_active_idle_sessions
description: |
This option enables the sampling of idle sessions that were active since the last collection.
Recommended for APM customers to boost the APM/DBM correlation.
value:
type: boolean
example: true
- name: stored_procedure_characters_limit
description: |
Limit the number of characters of the text of a stored procedure that is collected.
The characters limit is applicable to both query metrics and query samples.
Please be aware that increasing this value may affect performance,
as more data will be gathered from the database and sent to Datadog.
value:
type: integer
example: 500
display_default: 500
- name: aws
description: |
This block defines the configuration for AWS RDS and Aurora instances.
Complete this section if you have installed the Datadog AWS Integration
(https://docs.datadoghq.com/integrations/amazon_web_services) to enrich instances
with SQL Server integration telemetry.
These values are only applied when `dbm: true` option is set.
options:
- name: instance_endpoint
description: |
Equal to the Endpoint.Address of the instance the agent is connecting to.
This value is optional if the value of `host` is already configured to the instance endpoint.
For more information on instance endpoints,
see the AWS docs https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_Endpoint.html
value:
type: string
example: mydb.cfxgae8cilcf.us-east-1.rds.amazonaws.com
- name: gcp
description: |
This block defines the configuration for Google Cloud SQL instances.
Complete this section if you have installed the Datadog GCP Integration
(https://docs.datadoghq.com/integrations/google_cloud_platform) to enrich instances
with SQL Server integration telemetry.
These values are only applied when `dbm: true` option is set.
options:
- name: project_id
description: |
Equal to the GCP resource's project ID.
For more information on project IDs,
See the GCP docs https://cloud.google.com/resource-manager/docs/creating-managing-projects
value:
type: string
example: foo-project
- name: instance_id
description: |
Equal to the GCP resource's instance ID.
For more information on instance IDs,
See the GCP docs https://cloud.google.com/sql/docs/sqlserver/instance-settings#instance-id-2ndgen
value:
type: string
example: foo-database
- name: azure
description: |
This block defines the configuration for Azure Managed Instance, Azure SQL Database or
SQLServer on Virtual Machines.
Complete this section if you have installed the Datadog Azure Integration
(https://docs.datadoghq.com/integrations/azure) to enrich instances
with SQL Server integration telemetry.
These values are only applied when `dbm: true` option is set.
options:
- name: deployment_type
description: |
Equal to the deployment type for the managed database.
Acceptable values are:
- `sql_database`
- `managed_instance`
- `virtual_machine`
For more information on deployment types, see the Azure
docs https://docs.microsoft.com/en-us/azure/azure-sql/azure-sql-iaas-vs-paas-what-is-overview?view=azuresql
value:
type: string
example: sql_database
- name: fully_qualified_domain_name
description: |
Equal to the name of the SQL Database, Managed Instance (SQL MI) or virtual machine.
This value is optional if the value of `host` is already configured to the fully qualified domain name.
value:
type: string
example: my-sqlserver-database.database.windows.net
- name: aggregate_sql_databases
description: |
Aggregate individual Azure SQL Databases under a single logical SQL server database instance.
Only applicable when `deployment_type` is set to `sql_database`.
value:
type: boolean
example: false
- name: managed_identity
description: |
Configuration section used for Azure AD Authentication.
This supports using System or User assigned managed identities.
If this section is set, then the `username` and `password` fields will be ignored.
For more information on Managed Identities, see the Azure docs
https://learn.microsoft.com/en-us/azure/active-directory/managed-identities-azure-resources/overview
options:
- name: client_id
description: |
Client ID of the Managed Identity.
value:
type: string
- name: identity_scope
description: |
The permission scope from where to access the identity token. This value is optional if using the default
identity scope for Azure managed databases.
For more information on scopes, see the Azure docs
https://learn.microsoft.com/en-us/azure/active-directory/develop/scopes-oidc
value:
type: string
example: https://database.windows.net/.default
- name: obfuscator_options
description: |
Configure how the SQL obfuscator behaves.
Note: This option only applies when `dbm` is enabled.
options:
- name: obfuscation_mode
description: |
Set the obfuscation mode. The obfuscation mode determines how the SQL obfuscator will obfuscate your SQL
statements. The following modes are supported:
- `obfuscate_only`: Obfuscate the SQL statement without normalizing the statement.
- `obfuscate_and_normalize`: Obfuscate the SQL statement and normalize the statement.
value:
type: string
example: obfuscate_and_normalize
display_default: obfuscate_and_normalize
- name: replace_digits
description: |
Set to `true` to replace digits in identifiers and table names with question marks in your SQL statements.
Note: This option also applies to extracted tables using `collect_tables`.
value:
type: boolean
example: false
- name: collect_metadata
description: |
Set to `false` to disable the collection of metadata in your SQL statements.
Metadata includes things such as tables, commands, and comments.
value:
type: boolean
example: true
- name: collect_tables
description: |
Set to `false` to disable the collection of tables in your SQL statements.
Requires `collect_metadata: true`.
value:
type: boolean
example: true
- name: collect_commands
description: |
Set to `false` to disable the collection of commands in your SQL statements.
Requires `collect_metadata: true`.
Examples: SELECT, UPDATE, DELETE, etc.
value:
type: boolean
example: true
- name: collect_comments
description: |
Set to `false` to disable the collection of comments in your SQL statements.
Requires `collect_metadata: true`.
Note: This option must be `true` in order to correlate Database Monitoring samples and APM traces.
See https://docs.datadoghq.com/database_monitoring/connect_dbm_and_apm
value:
type: boolean
example: true
- name: keep_sql_alias
description: |
Set to `true` to keep sql aliases in obfuscated SQL statements. Examples of aliases are
`with select 1 as alias`, `select column as other_name`, or `select * from table t`.
When `true` these aliases will not be removed.
value:
type: boolean
example: true
display_default: true
- name: remove_space_between_parentheses
description: |
Set to `true` to remove spaces between parentheses in your normalized SQL statements.
value:
type: boolean
example: false
display_default: false
- name: keep_null
description: |
Set to `true` to keep the keyword `NULL` in your obfuscated SQL statements.
value:
type: boolean
example: false
display_default: false
- name: keep_boolean
description: |
Set to `true` to keep the keywords `TRUE` and `FALSE` in your obfuscated SQL statements.
value:
type: boolean
example: false
display_default: false
- name: keep_positional_parameter
description: |
Set to `true` to keep positional parameters (e.g. `$1`) in your obfuscated SQL statements.
value:
type: boolean
example: false
display_default: false
- name: keep_trailing_semicolon
description: |
Set to `true` to keep trailing semicolons in your normalized SQL statements.
value:
type: boolean
example: false
display_default: false
- name: keep_identifier_quotation
description: |
Set to `true` to keep identifier quotations (e.g. `"my_table"`) in your normalized SQL statements.
value:
type: boolean
example: false
display_default: false
- name: log_unobfuscated_queries
hidden: true
description: |
Set to `true` to enable logging of original unobfuscated SQL queries when obfuscation errors occur.
For security purposes, it is recommended to use this option for debugging only when requested by Datadog Support.
Note: This option only applies when `dbm` is enabled.
value:
type: boolean
example: false
display_default: false
- name: log_unobfuscated_plans
hidden: true
description: |
Set to `true` to enable logging of original unobfuscated SQL plans when obfuscation errors occur.
For security purposes, it is recommended to use this option for debugging only when requested by Datadog Support.
Note: This option only applies when `dbm` is enabled.
value:
type: boolean
example: false
display_default: false
- name: command_timeout
description: Timeout in seconds for the connection and each command run
value:
type: integer
example: 10
- template: instances/db
- name: stored_procedure
description: |
DEPRECATED - use `custom_queries` instead. For guidance, see:
https://docs.datadoghq.com/integrations/guide/collect-sql-server-custom-metrics/
Get metrics from custom proc in MyDB but only if the database is writable
(i.e. it's the master in an availability group) Note: Custom proc must be defined in its own instance
value:
type: string
example: <PROCEDURE_NAME>
- name: proc_only_if
description: Run this SQL before each call to `stored_procedure`. Only if it returns 1 then call the proc.
value:
type: string
example: <SQL_QUERY>
- name: proc_only_if_database
description: The database to run the `proc_only_if` SQL in.
value:
type: string
example: master
- name: ignore_missing_database
description: |
DEPRECATED - use `database_autodiscovery` instead, when database name is uncertain.
If the DB specified doesn't exist on the server then don't do the check
value:
type: boolean
example: false
- name: database_instance_collection_interval
hidden: true
description: |
Set the database instance collection interval (in seconds). The database instance collection sends
basic information about the database instance along with a signal that it still exists.
This collection does not involve any additional queries to the database.
value:
type: number
example: 1800
display_default: 300
- name: schemas_collection
description: |
Available for Agent 7.56 and newer.
Configure collection of schemas. If `database_autodiscovery` is not enabled, data is collected
only for the database configured with `database` parameter.
options:
- name: enabled
description: |
Enable schema collection. Requires `dbm: true`. Defaults to false.
value:
type: boolean
example: false
- name: collection_interval
description: |
Set the database schema collection interval (in seconds). Defaults to 600 seconds.
value:
type: number
example: 600
- name: max_execution_time
description: |
Set the maximum time for schema collection (in seconds). Defaults to 10 seconds.
Capped by `schemas_collection.collection_interval`
value:
type: number
example: 10
- name: propagate_agent_tags
description: |
Set to `true` to propagate the tags from `datadog.yaml` and the agent host tags to the check.
When set to `true`, the tags from the agent host are added to the check's tags for all instances.
This option takes precedence over the `propagate_agent_tags` option in `init_config`.
value:
example: false
type: boolean
- name: deadlocks_collection
description: |
Configure the collection of deadlock data.
options:
- name: enabled
description: |
Enable the collection of deadlock data. Requires `dbm: true`. Disabled by default.
value:
type: boolean
example: false
- name: collection_interval
description: |
Set the interval for collecting deadlock data, in seconds. Defaults to 600 seconds.
value:
type: number
example: 600
- name: max_deadlocks
description: |
Set the maximum number of deadlocks to retrieve per collection.
value:
type: number
example: 100
- template: instances/default
- template: logs
example:
- type: file
path: /var/opt/mssql/log/errorlog
source: sqlserver
encoding: utf-16-le
service: <SERVICE_NAME>
log_processing_rules:
- type: multi_line
name: new_log_start_with_date
pattern: \d{4}\-\d{2}\-\d{2}