-
Notifications
You must be signed in to change notification settings - Fork 1.4k
/
conf.yaml.example
900 lines (786 loc) · 40.4 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
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
## All options defined here are available to all instances.
#
init_config:
## @param propagate_agent_tags - boolean - optional - default: false
## 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.
#
# propagate_agent_tags: false
## @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 independently of the others.
#
instances:
## @param host - string - required
## The hostname to connect to.
## NOTE: Even if the server name is `localhost`, the Agent connects to PostgreSQL using TCP/IP unless you also
## provide a value for the sock key.
#
- host: localhost
## @param port - integer - optional - default: 5432
## The port to use when connecting to PostgreSQL.
#
# port: 5432
## @param username - string - required
## The Datadog username created to connect to PostgreSQL.
#
username: datadog
## @param password - string - optional
## The password associated with the Datadog user.
#
# password: <PASSWORD>
## @param dbname - string - optional - default: postgres
## The name of the PostgresSQL database to monitor.
## Note: If omitted, the default system Postgres database is queried.
#
# dbname: <DBNAME>
## @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 dbstrict - boolean - optional - default: false
## Whether to restrict the scope of the check to just the database in question.
## Set to `true` if you only want to gather metrics from the database provided in the dbname parameter.
#
# dbstrict: false
## @param ignore_databases - list of strings - optional
## A list of database to ignore. No metrics or statement samples will be collected for these databases.
## Each value can be a plain string or a Postgres pattern. If you want to ignore the postgres database,
## set collect_default_database to false in addition to adding it to this array.
## For more information on how patterns work, see https://www.postgresql.org/docs/12/functions-matching.html
#
# ignore_databases:
# - template%
# - rdsadmin
# - azure_maintenance
# - cloudsqladmin
## @param ssl - string - optional - default: allow
## This option determines whether or not and with what priority a secure SSL TCP/IP connection
## is negotiated with the server. There are six modes:
## - `disable`: Only tries a non-SSL connection.
## - `allow`: First tries a non-SSL connection; if if fails, tries an SSL connection.
## - `prefer`: First tries an SSL connection; if it fails, tries a non-SSL connection.
## - `require`: Only tries an SSL connection. If a root CA file is present, verifies the certificate in
## the same way as if verify-ca was specified.
## - `verify-ca`: Only tries an SSL connection, and verifies that the server certificate is issued by a
## trusted certificate authority (CA).
## - `verify-full`: Only tries an SSL connection and verifies that the server certificate is issued by a
## trusted CA and that the requested server host name matches the one in the certificate.
##
## For a detailed description of how these options work see https://www.postgresql.org/docs/current/libpq-ssl.html
#
# ssl: allow
## @param ssl_root_cert - string - optional
## The path to the ssl root certificate.
##
## For a detailed description of how this option works see https://www.postgresql.org/docs/current/libpq-ssl.html
#
# ssl_root_cert: <SSL_ROOT_CERT>
## @param ssl_cert - string - optional
## The path to the ssl certificate.
##
## For a detailed description of how this option works see https://www.postgresql.org/docs/current/libpq-ssl.html
#
# ssl_cert: <SSL_CERT>
## @param ssl_key - string - optional
## The path to the ssl client key.
##
## For a detailed description of how this option works see https://www.postgresql.org/docs/current/libpq-ssl.html
#
# ssl_key: <SSL_KEY>
## @param ssl_password - string - optional
## The password for the secret key specified in ssl_key, allowing client certificate private keys to be stored
## in encrypted form on disk.
##
## For a detailed description of how this option works see https://www.postgresql.org/docs/current/libpq-ssl.html
#
# ssl_password: <SSL_PASSWORD>
## @param query_timeout - integer - optional - default: 5000
## Adds a statement_timeout https://www.postgresql.org/docs/current/runtime-config-client.html#GUC-STATEMENT-TIMEOUT
## to all metric collection queries. Aborts any statement that takes more than the specified number of milliseconds,
## starting from the time the command arrives at the server from the client. A value of zero turns this off.
## Cancelled queries won't log any metrics.
#
# query_timeout: 5000
## @param relations - (list of string or mapping) - optional
## The list of relations/tables must be specified here to track per-relation (table, index , view, etc.) metrics.
## If enabled, `dbname` should be specified to collect database-specific relations metrics.
## You can either specify a single relation by its exact name in 'relation_name' or use a regex to track metrics
## from all matching relations (useful in cases where relation names are dynamically generated, e.g. TimescaleDB).
## Each relation generates many metrics (10 + 10 per index).
##
## By default all schemas are included. To track relations from specific schemas only,
## you can specify the `schemas` attribute and provide a list of schemas to use for filtering.
##
## Size metrics are collected only for ordinary tables. Index metrics are collected only for user indexes. Lock
## metrics are collected for all relation types (table, index , view, etc.). The rest of the metrics are
## collected only for user tables.
## To track lock metrics for relations of a specific kind only, specify the `relkind` attribute
## as a list of the options:
## * r = ordinary table
## * i = index
## * S = sequence
## * t = TOAST table
## * m = materialized view
## * c = composite type
## * f = foreign table
## * p = partitioned table
##
## Note: For compatibility reasons you can also use the following syntax to track relations metrics by specifying
## the list of table names. All schemas are included and regex are not supported.
## relations:
#
# relations:
# - relation_name: <TABLE_NAME>
# schemas:
# - <SCHEMA_NAME1>
# - relation_regex: <TABLE_PATTERN>
# relkind:
# - r
# - p
## @param max_relations - integer - optional - default: 300
## Determines the maximum number of relations to fetch.
#
# max_relations: 300
## @param collect_function_metrics - boolean - optional - default: false
## If set to true, collects metrics regarding PL/pgSQL functions from pg_stat_user_functions.
#
# collect_function_metrics: false
## @param collect_count_metrics - boolean - optional - default: true
## Collect count of user tables from pg_class.
#
# collect_count_metrics: true
## @param collect_checksum_metrics - boolean - optional - default: false
## Collect counts of database failed checksums. Only supported on versions >= 12.
#
# collect_checksum_metrics: false
## @param collect_activity_metrics - boolean - optional - default: false
## Collect metrics regarding transactions from pg_stat_activity. Please make sure the user
## has sufficient privileges to read from pg_stat_activity before enabling this option.
#
# collect_activity_metrics: false
## @param activity_metrics_excluded_aggregations - list of strings - optional
## A list of columns to remove from the pg_stat_activity aggregation.
## By default, datname, usename and application_name will be used.
## If applications with different application_name are creating a lot of short-lived queries,
## removing application_name from the aggregation can help generate more stable metrics.
## Note that datname is a required aggregation on activity metrics and can't be excluded.
#
# activity_metrics_excluded_aggregations:
# - application_name
## @param collect_buffercache_metrics - boolean - optional - default: false
## If set to true, collects metrics regarding buffer cache usage from pg_buffercache.
## pg_buffercache extension must be installed.
#
# collect_buffercache_metrics: false
## @param collect_database_size_metrics - boolean - optional - default: true
## Collect database size metrics.
#
# collect_database_size_metrics: true
## @param collect_default_database - boolean - optional - default: true
## Include statistics from the default database 'postgres' in the check metrics.
#
# collect_default_database: true
## @param collect_bloat_metrics - boolean - optional - default: false
## Collect metrics about table bloat. Only available when `relation` metrics are enabled.
#
collect_bloat_metrics: false
## @param collect_wal_metrics - boolean - optional - default: false
## Collect metrics about WAL file age.
## NOTE:
## For Postgres 9.6 and below, you must run the check local to your database if you want to enable this option.
## Starting Postgres 10, WAL file metrics are enabled by default using `pg_ls_waldir` and don't need local access.
#
# collect_wal_metrics: false
## @param data_directory - string - optional - default: /usr/local/pgsql/data
## The data directory of your postgres installation
## Required when collecting WAL metrics.
#
# data_directory: /usr/local/pgsql/data
## @param tag_replication_role - boolean - optional - default: false
## Tag metrics and checks with `replication_role:<master|standby>`.
#
# tag_replication_role: false
## @param table_count_limit - integer - optional - default: 200
## The maximum number of tables to collect metrics from.
#
# table_count_limit: 200
## @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:postgresql
# metric_prefix: postgresql
## Define the configuration for database autodiscovery.
## Complete this section if you want to auto-discover databases on this host
## instead of specifying each using dbname.
#
# database_autodiscovery:
## @param enabled - boolean - optional - default: false
## Enable database autodiscovery.
#
# enabled: false
## @param global_view_db - string - optional - default: postgres
## Database the agent connects to perform autodiscovery operations
#
# global_view_db: postgres
## @param max_databases - integer - optional - default: 100
## The maximum number of databases this host should monitor.
#
# max_databases: 100
## @param include - list of strings - optional - default: ['.*']
## 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.
#
# include:
# - master$
# - AdventureWorks.*
## @param exclude - list of strings - optional - default: ['cloudsqladmin']
## 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 `exclude` takes precedence over
## those found via `include`
#
# exclude:
# - model
# - msdb
# - cloudsqladmin
# - rdsadmin
## @param refresh - integer - optional - default: 600
## Frequency in seconds of scans for new databases. Defaults to 10 minutes.
#
# refresh: 600
## @param application_name - string - optional - default: datadog-agent
## The application_name can be any string of less than NAMEDATALEN characters (64 characters in a standard build).
## It is typically set by an application upon connection to the server.
## The name is displayed in the pg_stat_activity view and included in CSV log entries.
#
# application_name: datadog-agent
## @param dbm - boolean - optional - default: false
## Set to `true` to enable Database Monitoring.
#
# dbm: false
## @param pg_stat_statements_view - string - optional - default: pg_stat_statements
## Set this value if you want to define a custom view or function to allow the datadog user to query the
## `pg_stat_statements` table, which is useful for restricting the permissions given to the datadog agent.
## Please note this is an ALPHA feature and is subject to change or deprecation without notice.
#
# pg_stat_statements_view: show_pg_stat_statements()
## 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: 10
## Set the query metric collection interval (in seconds). Each collection involves a single query to
## `pg_stat_statements`. 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
## Configure collection of query samples
#
# query_samples:
## @param enabled - boolean - optional - default: true
## Enable collection of query samples. Requires `dbm: true`.
#
# enabled: true
## @param collection_interval - number - optional - default: 1
## Set the query sample collection interval (in seconds). Each collection involves a single query to
## `pg_stat_activity` followed by at most one `EXPLAIN` query per unique normalized query seen.
#
# collection_interval: 1
## @param explain_function - string - optional - default: datadog.explain_statement
## Override the default function used to collect execution plans for queries.
#
# explain_function: datadog.explain_statement
## @param explained_queries_per_hour_per_query - integer - optional - default: 60
## Set the rate limit for how many execution plans will be collected per hour per normalized query.
#
# explained_queries_per_hour_per_query: 60
## @param samples_per_hour_per_query - integer - optional - default: 15
## Set the rate limit for how many query sample events will be ingested per hour per normalized execution
## plan.
#
# samples_per_hour_per_query: 15
## @param explained_queries_cache_maxsize - integer - optional - default: 5000
## Set the max size of the cache used for the explained_queries_per_hour_per_query rate limit. This should
## be increased for databases with a very large number unique normalized queries which exceed the cache's
## limit.
#
# explained_queries_cache_maxsize: 5000
## @param seen_samples_cache_maxsize - integer - optional - default: 10000
## Set the max size of the cache used for the samples_per_hour_per_query rate limit. This should be increased
## for databases with a very large number of unique normalized execution plans which exceed the cache's limit.
#
# seen_samples_cache_maxsize: 10000
## @param explain_parameterized_queries - boolean - optional - default: true
## This option will enable the ability to explain parameterized queries.
## This is useful if your SQL clients are using the extended query protocol or prepared statements.
#
# explain_parameterized_queries: true
## Configure collection of query activity
#
# query_activity:
## @param enabled - boolean - optional - default: true
## Enable collection of query activity. Requires `dbm: true`.
#
# enabled: true
## @param collection_interval - number - optional - default: 10
## Set the query activity collection interval (in seconds). This number cannot be smaller than
## query_samples configured collection_interval.
#
# collection_interval: 10
## @param payload_row_limit - number - optional - default: 3500
## Set the query activity maximum number of pg_stat_activity rows you want to report. If the table is larger
## than the maximum rows set, then the top N longest running transactions will be reported.
#
# payload_row_limit: 3500
## Configure collection of pg_settings.
#
# collect_settings:
## @param enabled - boolean - optional - default: false
## Enable collection of pg_settings. 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
## `pg_settings`.
#
# collection_interval: 600
## @param ignored_settings_patterns - list of strings - optional
## A list of setting patterns to ignore. Any setting key matching one of the value in this list will
## not be collected. This uses the traditional LIKE pattern-matching approach.
#
# ignored_settings_patterns:
# - plpgsql%
## Enable collection of database schemas. In order to collect schemas from all user databases,
## enable `database_autodiscovery`. To collect from a single database, set `dbname` to collect
## the schema for that database.
#
# collect_schemas:
## @param enabled - boolean - optional - default: false
## Enable collection of database schemas. Requires `dbm: true`.
#
# enabled: false
## @param max_tables - number - optional - default: 300
## Maximum amount of tables the Agent collects from the instance.
#
# max_tables: 300
## @param max_columns - number - optional - default: 50
## Maximum amount of columns the Agent collects per table.
#
# max_columns: 50
## @param collection_interval - number - optional - default: 600
## The database schema collection interval (in seconds).
#
# collection_interval: 600
## @param include_databases - list of strings - optional
## A list of regex patterns to include databases.
## Any database whose name matches any one of these patterns will be included.
## If empty, all databases matching other filters are included.
#
# include_databases:
# - mydb
## @param exclude_databases - list of strings - optional
## A list of regex patterns to exclude databases.
## Any database whose name matches any one of these patterns will be excluded.
## If empty, all databases matching other filters are included.
#
# exclude_databases:
# - privatedb.*
## @param include_schemas - list of strings - optional
## A list of regex patterns to include schemas.
## Any schema whose name matches any one of these patterns will be included.
## If empty, all schemas matching other filters are included.
#
# include_schemas:
# - myschema
## @param exclude_schemas - list of strings - optional
## A list of regex patterns to exclude schemas.
## Any schema whose name matches any one of these patterns will be excluded.
## If empty, all schemas matching other filters are included.
#
# exclude_schemas:
# - privateschema.*
## @param include_tables - list of strings - optional
## A list of regex patterns to include tables.
## Any table whose name matches any one of these patterns will be included.
## If empty, all tables matching other filters are included.
#
# include_tables:
# - users.*
## @param exclude_tables - list of strings - optional
## A list of regex patterns to exclude tables.
## Any table whose name matches any one of these patterns will be excluded.
## If empty, all tables matching other filters are included.
#
# exclude_tables:
# - customer.*
## 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 Postgres 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
## @param region - string - optional - default: us-east-1
## Equal to the region of the instance the agent is connecting to.
## This value is used to configure IAM authentication.
#
# region: us-east-1
## @param managed_authentication - mapping - optional
## Configure section used for AWS IAM Authentication with RDS.
##
## This supports using IAM database authentication to connect to your database instance.
##
## For more information on configuration, see
## https://docs.datadoghq.com/database_monitoring/guide/managed_authentication
##
## For more information on RDS IAM Authentication, see the AWS docs
## https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/UsingWithRDS.IAMDBAuth.Connecting.html
##
## To enable IAM Authentication, set `aws.managed_authentication.enabled` to `true`.
## If `aws.managed_authentication.enabled` is set, then the `password` fields will be ignored.
## `aws.region` is required to enable IAM Authentication.
##
## Optionally, you can set `aws.managed_authentication.role_arn` to specify the IAM role ARN.
## This can be used to perform cross-account authentication.
#
# managed_authentication: {}
## 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 Postgres 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/postgres/instance-settings#instance-id-2ndgen
#
# instance_id: foo-database
## This block defines the configuration for Azure Database for PostgreSQL.
##
## Complete this section if you have installed the Datadog Azure Integration
## (https://docs.datadoghq.com/integrations/azure) to enrich instances
## with Postgres integration telemetry.
## These values are only applied when `dbm: true` option is set.
#
# azure:
## @param deployment_type - string - optional - default: flexible_server
## Equal to the deployment type for the managed database.
##
## Acceptable values are:
## - `flexible_server`
## - `single_server`
## - `virtual_machine`
##
## For more information on deployment types,
## see the Azure docs https://docs.microsoft.com/en-us/azure/postgresql/overview-postgres-choose-server-options
#
# deployment_type: flexible_server
## @param fully_qualified_domain_name - string - optional - default: my-postgres-database.database.windows.net
## Equal to the full qualified domain name of the Azure PostgreSQL database.
##
## This value is optional if the value of `host` is already configured to the fully qualified domain name.
#
# fully_qualified_domain_name: my-postgres-database.database.windows.net
## @param managed_authentication - mapping - optional
## Configuration section used for Azure AD Authentication.
##
## This supports using System or User assigned managed identities.
##
## For more information on configuration, see
## https://docs.datadoghq.com/database_monitoring/guide/managed_authentication
##
## For more information on Managed Identities, see the Azure docs
## https://learn.microsoft.com/en-us/azure/active-directory/managed-identities-azure-resources/overview
##
## To enable Azure AD Authentication, set `azure.managed_authentication.enabled` to `true`.
## If `azure.managed_authentication.enabled` is set, then the `password` fields will be ignored.
## `azure.managed_authentication.client_id` is required to enable Azure AD Authentication.
##
## For more information on scopes, see the Azure docs
## https://learn.microsoft.com/en-us/azure/active-directory/develop/scopes-oidc
#
# managed_authentication: {}
## DEPRECATED: Please use `azure.managed_authentication` instead.
##
## 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://ossrdbms-aad.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://ossrdbms-aad.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 keep_dollar_quoted_func - boolean - optional - default: true
## Set to `true` to prevent dollar quoted function strings (e.g. `$func$`) from being removed.
## When not removed, the sql content of dollar quoted func strings will be obfuscated.
## Only strings with the tag `$func$` are supported.
#
# keep_dollar_quoted_func: 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 propagate_agent_tags - boolean - optional - default: false
## 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`.
#
# propagate_agent_tags: false
## @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 disable_generic_tags - boolean - optional - default: false
## The integration will stop sending server tag as is reduntant with host tag
#
disable_generic_tags: true
## @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: /path/to/postgres.log
# source: postgresql
# service: <SERVICE>
# log_processing_rules:
# - type: multi_line
# pattern: \d{4}\-(0?[1-9]|1[012])\-(0?[1-9]|[12][0-9]|3[01])
# name: new_log_start_with_date