-
Notifications
You must be signed in to change notification settings - Fork 1.4k
/
conf.yaml.example
747 lines (650 loc) · 33.6 KB
/
conf.yaml.example
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
## All options defined here are available to all instances.
#
init_config:
## @param custom_metrics - list of mappings - optional
## 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/
#
# custom_metrics:
# - name: sqlserver.clr.execution
# counter_name: CLR Execution
## @param global_custom_queries - list of mappings - optional
## See `custom_queries` defined below.
##
## Global custom queries can be applied to all instances using the
## `use_global_custom_queries` setting at the instance level.
#
# global_custom_queries:
# - query: <QUERY>
# columns: <COLUMNS>
# tags: <TAGS>
# collection_interval: <COLLECTION_INTERVAL>
## @param service - string - optional
## Attach the tag `service:<SERVICE>` to every metric, event, and service check emitted by this integration.
##
## Additionally, this sets the default `service` for every log source.
#
# service: <SERVICE>
## Every instance is scheduled independent of the others.
##
## Note: All '%' characters must be escaped as '%%'.
#
instances:
## @param host - string - required
## 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.
#
- host: <HOST>,<PORT>
## @param username - string - optional
## Username for the Datadog-SQL server check user. It will be ignored if using Windows authentication.
#
# username: <USERNAME>
## @param password - string - optional
## Password for the Datadog-SQL server check user. It will be ignored if using Windows authentication.
#
# password: <PASSWORD>
## @param server_version - string - optional - default: 2014
## 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.
#
# server_version: '2014'
## @param database - string - optional - default: master
## Database name to query. Not compatible with `database_autodiscovery`.
#
# database: master
## @param reported_hostname - string - optional
## 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.
#
# reported_hostname: <REPORTED_HOSTNAME>
## @param database_autodiscovery - boolean - optional - default: false
## 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.
#
# database_autodiscovery: false
## @param autodiscovery_include - list of strings - optional
## 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.
#
# autodiscovery_include:
# - master$
# - AdventureWorks.*
## @param autodiscovery_exclude - list of strings - optional
## 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`.
#
# autodiscovery_exclude:
# - model
# - msdb
# - model_replicatedmaster
# - model_msdb
## @param database_autodiscovery_interval - integer - optional - default: 3600
## Frequency in seconds of scans for new databases. Defaults to `3600`.
#
# database_autodiscovery_interval: 3600
## @param autodiscovery_db_service_check - boolean - optional - default: true
## 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.
#
autodiscovery_db_service_check: false
## @param include_ao_metrics - boolean - optional - default: false
## Include AlwaysOn availability group metrics.
#
# include_ao_metrics: false
## @param availability_group - string - optional
## You can specify an availability group when `include_ao_metrics`
## is enabled to monitor a specific availability group.
## If no availability group is specified, then all availability
## groups on the current replica will output metrics.
#
# availability_group: <AVAILABILITY_GROUP>
## @param only_emit_local - boolean - optional - default: false
## Primary replicas may emit metrics for remote secondary replicas
## in the same availability group. If this option is set to true,
## the primary replica will only emit information local to itself.
#
# only_emit_local: false
## @param ao_database - string - optional
## AlwaysOn metrics are only emitted for the selected `ao_database` if not empty.
#
# ao_database: <AO_DATABASE>
## @param include_master_files_metrics - boolean - optional - default: false
## Include database file size and state from `sys.master_files`.
#
# include_master_files_metrics: false
## @param include_fci_metrics - boolean - optional - default: false
## Include Failover Cluster Instance metrics. Note that these metrics
## requires a SQLServer set up with Failover Clustering enabled.
#
# include_fci_metrics: false
## @param include_primary_log_shipping_metrics - boolean - optional - default: false
## Include log_shipping_primary 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.
#
# include_primary_log_shipping_metrics: false
## @param include_secondary_log_shipping_metrics - boolean - optional - default: false
## Include log_shipping_secondary metrics for a log shipping setup. Required to run
## against a 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.
#
# include_secondary_log_shipping_metrics: false
## @param include_instance_metrics - boolean - optional - default: true
## Include 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.
#
# include_instance_metrics: true
## @param include_task_scheduler_metrics - boolean - optional - default: false
## Include additional Task and Scheduler metrics.
#
# include_task_scheduler_metrics: false
## @param include_db_fragmentation_metrics - boolean - optional - default: false
## Include database fragmentation metrics. Note these queries can be resource intensive on large datasets.
## Recommend to limit these via autodiscovery or specific database instances.
#
# include_db_fragmentation_metrics: false
## @param include_db_fragmentation_metrics_tempdb - boolean - optional - default: false
## Configure the 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 'include_db_fragmentation_metrics' is set to false.
#
# include_db_fragmentation_metrics_tempdb: false
## @param include_index_usage_metrics - boolean - optional - default: true
## Configure the 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`.
#
# include_index_usage_metrics: true
## @param include_index_usage_metrics_tempdb - boolean - optional - default: false
## Configure the 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 'include_index_usage_metrics' is set to false.
#
# include_index_usage_metrics_tempdb: false
## @param index_usage_metrics_interval - integer - optional - default: 300
## Configure 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.
#
# index_usage_metrics_interval: 300
## @param db_fragmentation_object_names - list of strings - optional
## 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.
#
# db_fragmentation_object_names: []
## @param include_tempdb_file_space_usage_metrics - boolean - optional - default: true
## Include tempdb file space usage metrics for how space is used in tempdb data files.
#
# include_tempdb_file_space_usage_metrics: true
## @param adoprovider - string - optional - default: SQLOLEDB
## 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
#
# adoprovider: SQLOLEDB
## @param connector - string - optional - default: adodbapi
## Change the connection method from adodbapi (the default) to
## odbc (valid connector names are 'odbc' and 'adodbapi')
## Note: 'adodbapi` is only available on Windows
#
# connector: adodbapi
## @param driver - string - optional - default: SQL Server
## If using odbc, use the named driver.
#
# driver: SQL Server
## @param dsn - string - optional
## If using odbc, configure a connection using a DSN.
#
# dsn: <DSN>
## @param connection_string - string - optional
## 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"
#
# connection_string: <CONNECTION_STRING>
## @param dbm - boolean - optional - default: false
## Set to `true` to enable Database Monitoring.
#
# dbm: false
## Configure collection of sys.configurations.
#
# collect_settings:
## @param enabled - boolean - optional - default: false
## Enable collection of sys.configurations. Requires `dbm: true`.
#
# enabled: false
## @param collection_interval - number - optional - default: 600
## Set the database settings collection interval (in seconds). Each collection involves a single query to
## `sys.configurations`.
#
# collection_interval: 600
## Configure collection of query metrics
#
# query_metrics:
## @param enabled - boolean - optional - default: true
## Enable collection of query metrics. Requires `dbm: true`.
#
# enabled: true
## @param collection_interval - number - optional - default: 60
## 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.
#
# collection_interval: 60
## @param dm_exec_query_stats_row_limit - integer - optional - default: 10000
## Set the maximum number of query stats rows that can be retrieved in a single check run.
#
# dm_exec_query_stats_row_limit: 10000
## @param samples_per_hour_per_query - integer - optional - default: 4
## Set the rate limit for the number of query sample events that are ingested per hour and per normalized
## execution plan.
#
# samples_per_hour_per_query: 4
## Configure collection of procedure metrics
#
# procedure_metrics:
## @param enabled - boolean - optional - default: true
## Enable collection of procedure metrics. Requires `dbm: true`.
#
# enabled: true
## @param collection_interval - number - optional - default: 60
## 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.
#
# collection_interval: 60
## @param dm_exec_procedure_stats_row_limit - integer - optional - default: 10000
## Set the maximum number of procedure stats rows that can be retrieved in a single check run.
#
# dm_exec_procedure_stats_row_limit: 10000
## Configure collection of active sessions monitoring
#
# query_activity:
## @param enabled - boolean - optional - default: true
## Enable collection of active sessions. Requires `dbm: true`.
#
# enabled: true
## @param collection_interval - number - optional - default: 10
## 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.
#
# collection_interval: 10
## @param stored_procedure_characters_limit - integer - optional - default: 500
## 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.
#
# stored_procedure_characters_limit: 500
## 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.
#
# aws:
## @param instance_endpoint - string - optional - default: mydb.cfxgae8cilcf.us-east-1.rds.amazonaws.com
## 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
#
# instance_endpoint: mydb.cfxgae8cilcf.us-east-1.rds.amazonaws.com
## 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.
#
# gcp:
## @param project_id - string - optional - default: foo-project
## 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
#
# project_id: foo-project
## @param instance_id - string - optional - default: foo-database
## 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
#
# instance_id: foo-database
## 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.
#
# azure:
## @param deployment_type - string - optional - default: sql_database
## 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
#
# deployment_type: sql_database
## @param fully_qualified_domain_name - string - optional - default: my-sqlserver-database.database.windows.net
## 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.
#
# fully_qualified_domain_name: my-sqlserver-database.database.windows.net
## 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
#
# managed_identity:
## @param client_id - string - optional
## Client ID of the Managed Identity.
#
# client_id: <CLIENT_ID>
## @param identity_scope - string - optional - default: https://database.windows.net/.default
## 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
#
# identity_scope: https://database.windows.net/.default
## Configure how the SQL obfuscator behaves.
## Note: This option only applies when `dbm` is enabled.
#
# obfuscator_options:
## @param obfuscation_mode - string - optional - default: obfuscate_and_normalize
## 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.
#
# obfuscation_mode: obfuscate_and_normalize
## @param replace_digits - boolean - optional - default: false
## 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`.
#
# replace_digits: false
## @param collect_metadata - boolean - optional - default: true
## Set to `false` to disable the collection of metadata in your SQL statements.
## Metadata includes things such as tables, commands, and comments.
#
# collect_metadata: true
## @param collect_tables - boolean - optional - default: true
## Set to `false` to disable the collection of tables in your SQL statements.
## Requires `collect_metadata: true`.
#
# collect_tables: true
## @param collect_commands - boolean - optional - default: true
## Set to `false` to disable the collection of commands in your SQL statements.
## Requires `collect_metadata: true`.
##
## Examples: SELECT, UPDATE, DELETE, etc.
#
# collect_commands: true
## @param collect_comments - boolean - optional - default: true
## Set to `false` to disable the collection of comments in your SQL statements.
## Requires `collect_metadata: true`.
#
# collect_comments: true
## @param keep_sql_alias - boolean - optional - default: true
## 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.
#
# keep_sql_alias: true
## @param remove_space_between_parentheses - boolean - optional - default: false
## Set to `true` to remove spaces between parentheses in your normalized SQL statements.
#
# remove_space_between_parentheses: false
## @param keep_null - boolean - optional - default: false
## Set to `true` to keep the keyword `NULL` in your obfuscated SQL statements.
#
# keep_null: false
## @param keep_boolean - boolean - optional - default: false
## Set to `true` to keep the keywords `TRUE` and `FALSE` in your obfuscated SQL statements.
#
# keep_boolean: false
## @param keep_positional_parameter - boolean - optional - default: false
## Set to `true` to keep positional parameters (e.g. `$1`) in your obfuscated SQL statements.
#
# keep_positional_parameter: false
## @param keep_trailing_semicolon - boolean - optional - default: false
## Set to `true` to keep trailing semicolons in your normalized SQL statements.
#
# keep_trailing_semicolon: false
## @param keep_identifier_quotation - boolean - optional - default: false
## Set to `true` to keep identifier quotations (e.g. `"my_table"`) in your normalized SQL statements.
#
# keep_identifier_quotation: false
## @param command_timeout - integer - optional - default: 10
## Timeout in seconds for the connection and each command run
#
# command_timeout: 10
## @param only_custom_queries - boolean - optional - default: false
## Set this parameter to `true` if you want to skip the integration's default metrics collection.
## Only metrics specified in `custom_queries` will be collected.
#
# only_custom_queries: false
## @param use_global_custom_queries - string - optional - default: true
## How `global_custom_queries` should be used for this instance. There are 3 options:
##
## 1. true - `global_custom_queries` override `custom_queries`.
## 2. false - `custom_queries` override `global_custom_queries`.
## 3. extend - `global_custom_queries` are used in addition to any `custom_queries`.
#
# use_global_custom_queries: 'true'
## @param custom_queries - list of mappings - optional
## Each query must have 2 fields, and can have a third optional field:
##
## 1. query - The SQL to execute. It can be a simple statement or a multi-line script.
## Use the pipe `|` if you require a multi-line script.
## 2. columns - The list representing each column, ordered sequentially from left to right.
## The number of columns must equal the number of columns returned in the query.
## There are 2 required pieces of data:
## a. name - The suffix to append to `<INTEGRATION>.` to form
## the full metric name. If `type` is a `tag` type, this column is
## considered a tag and applied to every
## metric collected by this particular query.
## b. type - The submission method (gauge, monotonic_count, etc.).
## This can also be set to the following `tag` types to
## tag each metric in the row with the name and value
## of the item in this column:
## i. tag - This is the default tag type
## ii. tag_list - This allows multiple values to be attached
## to the tag name. For example:
##
## query = {
## "name": "example",
## "query": "...",
## "columns": [
## {"name": "server_tag", "type": "tag_list"},
## {"name": "foo", "type": "gauge"},
## ]
## }
##
## May result in:
## gauge("foo", tags=[
## "server_tag:us",
## "server_tag:primary",
## "server_tag:default"
## ])
## gauge("foo", tags=["server_tag:eu"])
## gauge("foo", tags=["server_tag:eu", "server_tag:primary"])
## iii. tag_not_null - This only sets tags in the metric if the value is not null
## You can use the `count` type to perform aggregation
## for queries that return multiple rows with the same or no tags.
## Columns without a name are ignored. To skip a column, enter:
## - {}
## 3. tags (optional) - A list of tags to apply to each metric.
## 4. collection_interval (optional) - The frequency at which to collect the metrics.
## If collection_interval is not set, the query will be run every check run.
## If the collection interval is less than check collection interval,
## the query will be run every check run.
## If the collection interval is greater than check collection interval,
## the query will NOT BE RUN exactly at the collection interval.
## The query will be run at the next check run after the collection interval has passed.
## 5. metric_prefix (optional) - The prefix to apply to each metric.
#
# custom_queries:
# - query: SELECT foo, COUNT(*) FROM table.events GROUP BY foo
# columns:
# - name: foo
# type: tag
# - name: event.total
# type: gauge
# tags:
# - test:<INTEGRATION>
# collection_interval: 30
# metric_prefix: foo_prefix
## @param stored_procedure - string - optional
## 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
#
# stored_procedure: <PROCEDURE_NAME>
## @param proc_only_if - string - optional
## Run this SQL before each call to `stored_procedure`. Only if it returns 1 then call the proc.
#
# proc_only_if: <SQL_QUERY>
## @param proc_only_if_database - string - optional - default: master
## The database to run the `proc_only_if` SQL in.
#
# proc_only_if_database: master
## @param ignore_missing_database - boolean - optional - default: false
## 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
#
# ignore_missing_database: false
## Configure collection of schemas. If `database_autodiscovery` is not enabled, data is collected
## only for the database configured with `database` parameter.
#
# schemas_collection:
## @param enabled - boolean - optional - default: false
## Enable schema collection. Requires `dbm: true`. Defaults to false.
#
# enabled: false
## @param collection_interval - number - optional - default: 600
## Set the database schema collection interval (in seconds). Defaults to 600 seconds.
#
# collection_interval: 600
## @param max_execution_time - number - optional - default: 10
## Set the maximum time for schema collection (in seconds). Defaults to 10 seconds.
## Capped by `schemas_collection.collection_interval`
#
# max_execution_time: 10
## @param tags - list of strings - optional
## A list of tags to attach to every metric and service check emitted by this instance.
##
## Learn more about tagging at https://docs.datadoghq.com/tagging
#
# tags:
# - <KEY_1>:<VALUE_1>
# - <KEY_2>:<VALUE_2>
## @param service - string - optional
## Attach the tag `service:<SERVICE>` to every metric, event, and service check emitted by this integration.
##
## Overrides any `service` defined in the `init_config` section.
#
# service: <SERVICE>
## @param min_collection_interval - number - optional - default: 15
## This changes the collection interval of the check. For more information, see:
## https://docs.datadoghq.com/developers/write_agent_check/#collection-interval
#
# min_collection_interval: 15
## @param empty_default_hostname - boolean - optional - default: false
## This forces the check to send metrics with no hostname.
##
## This is useful for cluster-level checks.
#
# empty_default_hostname: false
## @param metric_patterns - mapping - optional
## A mapping of metrics to include or exclude, with each entry being a regular expression.
##
## Metrics defined in `exclude` will take precedence in case of overlap.
#
# metric_patterns:
# include:
# - <INCLUDE_REGEX>
# exclude:
# - <EXCLUDE_REGEX>
## Log Section
##
## type - required - Type of log input source (tcp / udp / file / windows_event).
## port / path / channel_path - required - Set port if type is tcp or udp.
## Set path if type is file.
## Set channel_path if type is windows_event.
## source - required - Attribute that defines which integration sent the logs.
## encoding - optional - For file specifies the file encoding. Default is utf-8. Other
## possible values are utf-16-le and utf-16-be.
## service - optional - The name of the service that generates the log.
## Overrides any `service` defined in the `init_config` section.
## tags - optional - Add tags to the collected logs.
##
## Discover Datadog log collection: https://docs.datadoghq.com/logs/log_collection/
#
# logs:
# - 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}