-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Expand file tree
/
Copy pathspec.yaml
More file actions
1650 lines (1608 loc) · 64.1 KB
/
Copy pathspec.yaml
File metadata and controls
1650 lines (1608 loc) · 64.1 KB
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
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
name: Postgres
fleet_configurable: true
files:
- name: postgres.yaml
options:
- template: init_config
options:
- name: propagate_agent_tags
display_priority: 0
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.
fleet_configurable: true
value:
example: false
type: boolean
- template: init_config/db
- template: init_config/default
- template: instances
options:
- name: host
display_priority: 24
description: |
The hostname to connect to. To connect to a Unix socket, specify the full path to the socket directory,
e.g. `/var/run/postgresql`.
fleet_configurable: true
value:
type: string
display_default: "localhost"
- name: port
display_priority: 23
description: The port to use when connecting to PostgreSQL.
fleet_configurable: true
value:
type: integer
display_default: 5432
- name: username
display_priority: 22
description: The Datadog username created to connect to PostgreSQL.
fleet_configurable: true
value:
type: string
display_default: "datadog"
- name: password
display_priority: 21
description: The password associated with the Datadog user.
fleet_configurable: true
secret: true
value:
type: string
- name: dbname
display_priority: 0
description: |
The name of the PostgreSQL database to monitor.
Note: If omitted, the default system Postgres database is queried.
fleet_configurable: true
value:
type: string
display_default: postgres
- name: dbm
display_priority: 0
fleet_configurable: true
description: |
Set to `true` to enable Database Monitoring.
value:
type: boolean
example: false
display_default: false
- name: relations
display_priority: 0
fleet_configurable: true
description: |
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 (dozens per relation, plus several more for each index).
Be mindful of the metric volume this can produce: on large instances, broad `relation_regex`
patterns that match many relations can emit metrics in the thousands.
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.
relations:
value:
type: array
items:
anyOf:
- type: string
- type: object
properties:
- name: relation_name
type: string
- name: relation_schema
type: string
- name: schemas
type: array
items:
type: string
- name: relation_regex
type: string
- name: relkind
type: array
items:
type: string
default: []
example:
- relation_name: <TABLE_NAME>
schemas:
- <SCHEMA_NAME1>
- relation_regex: <TABLE_PATTERN>
relkind:
- r
- p
- name: collect_activity_metrics
display_priority: 0
fleet_configurable: true
description: |
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.
value:
type: boolean
example: false
- name: collect_function_metrics
display_priority: 0
fleet_configurable: true
description: |
If set to true, collects metrics regarding PL/pgSQL functions from pg_stat_user_functions.
value:
type: boolean
example: false
- name: collect_database_size_metrics
display_priority: 0
fleet_configurable: true
description: Collect database size metrics.
value:
type: boolean
example: true
- name: collect_bloat_metrics
display_priority: 0
fleet_configurable: true
description: Collect metrics about table bloat. Only available when `relation` metrics are enabled.
enabled: true
value:
type: boolean
example: false
- name: tag_replication_role
display_priority: 0
fleet_configurable: true
hidden: true
description: Tag metrics and checks with `replication_role:<master|standby>`.
value:
type: boolean
example: true
- name: collect_count_metrics
display_priority: 0
fleet_configurable: true
description: Collect count of user tables from pg_class.
value:
type: boolean
example: true
- name: max_relations
display_priority: 0
fleet_configurable: true
description: Determines the maximum number of relations to fetch.
value:
type: integer
example: 300
- name: ssl
display_priority: 0
description: |
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 it 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
fleet_configurable: true
value:
type: string
example: 'allow'
default: 'allow'
- name: collect_default_database
display_priority: 0
fleet_configurable: true
description: Include statistics from the default database 'postgres' in the check metrics.
value:
type: boolean
example: true
- name: query_timeout
display_priority: 0
fleet_configurable: true
description: |
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.
value:
type: integer
example: 5000
- name: reported_hostname
display_priority: 0
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.
fleet_configurable: true
value:
type: string
default: null
- name: ignore_databases
display_priority: 0
fleet_configurable: true
description: |
A list of databases 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
value:
type: array
items:
type: string
example:
- 'template0'
- 'template1'
- rdsadmin
- azure_maintenance
- cloudsqladmin
- alloydbadmin
- alloydbmetadata
default:
- 'template0'
- 'template1'
- rdsadmin
- azure_maintenance
- cloudsqladmin
- alloydbadmin
- alloydbmetadata
- name: exclude_hostname
display_priority: 0
description: |
Omit the hostname from tags and events. This is useful when the database host is not monitored by an agent.
value:
type: boolean
example: false
fleet_configurable: false
- name: database_identifier
display_priority: 0
description: |
Controls how the database is identified. Each unique value of this identifier will appear in DBM as a separate
billable instance.
The default value is the resolved hostname for the instance, which respects the `reported_hostname` option.
This value will be used as-is for the display name of the instance but will be normalized
when applied as the `database_instance` tag. Please see https://docs.datadoghq.com/getting_started/tagging/
for more details on Datadog tag normalization.
options:
- name: template
value:
type: string
display_default: "$resolved_hostname"
example: "$env-$resolved_hostname:$port"
description: |
The template to use for the database identifier. The default value is `$resolved_hostname`.
You can use the following variables, prefixed by `$` in the template:
- resolved_hostname: The resolved hostname of the instance, which respects the `reported_hostname` option.
- host: The provided host of the instance.
- port: The port number of the instance.
In addition, you can use any key from the `tags` section of the configuration.
fleet_configurable: false
- name: dbstrict
display_priority: 0
fleet_configurable: true
description: |
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.
value:
type: boolean
display_default: false
example: false
- name: ignore_schemas_owned_by
display_priority: 0
fleet_configurable: true
description: |
A list of database users which own schemas to ignore.
No metrics will be collected for these schemas.
Each value can be a plain string or a Postgres pattern.
value:
type: array
items:
type: string
example:
- rds_superuser
- rdsadmin
- user123
- 'dev_%_owner'
default:
- rds_superuser
- rdsadmin
- name: ssl_root_cert
display_priority: 0
description: |
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
fleet_configurable: true
value:
type: string
require_trusted_provider: true
default: null
- name: ssl_cert
display_priority: 0
description: |
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
fleet_configurable: true
value:
type: string
require_trusted_provider: true
default: null
- name: ssl_key
display_priority: 0
description: |
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
value:
type: string
require_trusted_provider: true
default: null
fleet_configurable: false
- name: ssl_password
display_priority: 0
description: |
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
secret: true
value:
type: string
default: null
fleet_configurable: false
- name: idle_connection_timeout
display_priority: 0
fleet_configurable: true
description: |
Sets the timeout (in ms) a connection used in the connection pool will be idle until it is closed by the pooler.
This value should be configured to a lower value if you are observing connection buildup on the Postgres server,
or a higher value if connections are getting prematurely closed.
hidden: true
value:
type: integer
example: 60000
- name: max_connections
display_priority: 0
hidden: true
description: |
Sets the upper bound limit on the number of concurrent connections the Agent can have on the database server.
The Agent needs to open additional connections to collect explain plans across databases.
Idle connections are cached, but pruned over time to balance the performance impact of opening connections and the cost of having many open connections.
Raising the default value should only be needed on workloads with >50 databases.
Lowering the default value can reduce the number of explain plans collected and is not recommended in most cases.
value:
type: integer
example: 30
display_default: 30
fleet_configurable: false
- name: locks_idle_in_transaction
display_priority: 0
description: Configure collection of idle in transaction lock age metrics
hidden: true
options:
- name: enabled
description: Enable collection of idle in transaction lock age metrics.
value:
type: boolean
example: true
display_default: true
hidden: true
fleet_configurable: false
- name: collection_interval
description: Set the collection interval (in seconds) for idle in transaction lock age metrics.
value:
type: number
example: 300
display_default: 300
hidden: true
fleet_configurable: false
- name: max_rows
description: Set the maximum number of rows to collect per check run.
value:
type: integer
example: 100
display_default: 100
hidden: true
fleet_configurable: false
- name: collect_checksum_metrics
display_priority: 0
fleet_configurable: true
description: Collect counts of database failed checksums. Only supported on versions >= 12.
value:
type: boolean
example: false
- name: activity_metrics_excluded_aggregations
display_priority: 0
description: |
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.
value:
type: array
items:
type: string
example:
- application_name
default: []
fleet_configurable: false
- name: collect_buffercache_metrics
display_priority: 0
fleet_configurable: true
description: |
If set to true, collects metrics regarding buffer cache usage from pg_buffercache.
pg_buffercache extension must be installed.
value:
type: boolean
example: false
- name: collect_wal_metrics
display_priority: 0
fleet_configurable: true
description: |
Collect metrics about WAL file age.
When unset, this defaults to `true` for Postgres 10+ (uses `pg_ls_waldir` via SQL) and `false` for
Postgres 9.6 and below (requires local filesystem access to the WAL directory).
Set to `true` explicitly for Postgres 9.6 and below only if the Agent runs on the same host as the
database and has read access to the WAL directory. You must also configure `data_directory`.
value:
type: boolean
example: true
display_default: null
- name: data_directory
display_priority: 0
description: |
The data directory of your postgres installation.
Only used when `collect_wal_metrics` is explicitly set to `true` on Postgres 9.6 and below.
value:
type: string
example: /usr/local/pgsql/data
display_default: /usr/local/pgsql/data
fleet_configurable: false
- name: table_count_limit
display_priority: 0
fleet_configurable: true
description: The maximum number of tables to collect metrics from.
value:
type: integer
display_default: 200
- name: custom_metrics
display_priority: 0
description: This option is deprecated. Use `custom_queries` instead.
hidden: true
value:
type: array
items:
type: object
fleet_configurable: false
- name: database_autodiscovery
display_priority: 0
fleet_configurable: true
description: |
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.
options:
- name: enabled
fleet_configurable: true
description: Enable database autodiscovery.
value:
type: boolean
example: false
display_default: false
- name: global_view_db
fleet_configurable: true
description: Database the agent connects to perform autodiscovery operations
value:
type: string
example: postgres
display_default: postgres
- name: max_databases
fleet_configurable: true
description: The maximum number of databases this host should monitor.
value:
type: integer
example: 100
display_default: 100
- name: include
fleet_configurable: true
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.*"
display_default:
- ".*"
- name: exclude
fleet_configurable: true
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 `exclude` takes precedence over
those found via `include`
value:
type: array
items:
type: string
example:
- "model"
- "msdb"
- "cloudsqladmin"
- "rdsadmin"
display_default:
- "template0"
- "template1"
- "rdsadmin"
- "azure_maintenance"
- "cloudsqladmin"
- "alloydbadmin"
- "alloydbmetadata"
- name: refresh
description: Frequency in seconds of scans for new databases. Defaults to 10 minutes.
value:
type: integer
example: 600
display_default: 600
fleet_configurable: false
- name: application_name
display_priority: 0
fleet_configurable: true
description: |
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.
value:
type: string
example: "datadog-agent"
- name: data_observability
display_priority: 0
fleet_configurable: true
description: |
Configure the Data Observability async job, which executes monitoring
queries delivered via Remote Configuration.
options:
- name: enabled
fleet_configurable: true
description: Enable the Data Observability job.
value:
type: boolean
example: false
display_default: false
- name: collection_interval
fleet_configurable: true
description: |
How often (in seconds) the job wakes up to check which queries are
due. Individual queries have their own interval_seconds. This value
must be less than or equal to the smallest interval_seconds across
all configured queries (i.e. the least common denominator), otherwise
queries with short intervals will be delayed.
value:
type: number
example: 10
display_default: 10
- name: run_sync
hidden: true
description: Run the job synchronously (for testing).
value:
type: boolean
example: false
display_default: false
fleet_configurable: false
- name: config_id
hidden: true
description: |
Unique identifier of the Remote Configuration payload that populated
this data_observability block. Set automatically by the Datadog Agent
Go RC handler when it delivers query configuration; do not set this
field manually. It is forwarded as-is on every emitted event so that
the intake can correlate results back to the originating RC config.
value:
type: string
fleet_configurable: false
- name: queries
hidden: true
description: |
List of monitor queries to execute. Populated automatically by the
Datadog Agent Go RC handler when Remote Configuration delivers a
DO_QUERY_ACTIONS payload; do not set this field manually. Each entry
describes one SQL monitoring query along with its scheduling
parameters and entity metadata.
value:
type: array
items:
type: object
required:
- monitor_id
- dbname
- query
- query_timeout
- entity
properties:
- name: monitor_id
type: integer
- name: dbname
type: string
- name: type
type: string
- name: query
type: string
- name: interval_seconds
description: |
How often (in seconds) to run this query. Ignored when schedule is set
(see schedule for the precedence rule).
type: integer
- name: schedule
description: |
A standard 5-field cron expression (minute hour dom month dow) specifying
when to run this query. When both schedule and interval_seconds are set,
schedule wins and interval_seconds is ignored. If neither is set, the
query is skipped at runtime with a warning.
type: string
- name: query_timeout
description: |
Statement timeout for this query in milliseconds. Overrides the instance-level
query_timeout for this query only.
type: integer
- name: entity
type: object
required:
- platform
- account
- database
- schema
- table
properties:
- name: platform
type: string
- name: account
type: string
- name: database
type: string
- name: schema
type: string
- name: table
type: string
- name: custom_sql_select_fields
type: object
properties:
- name: metric_config_id
type: integer
- name: entity_id
type: string
fleet_configurable: false
- name: pg_stat_statements_view
display_priority: 0
description: |
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.
value:
type: string
example: show_pg_stat_statements()
display_default: pg_stat_statements
fleet_configurable: false
- name: pg_stat_activity_view
display_priority: 0
hidden: true
description: |
Set this value if you want to define a custom view or function to allow the datadog user to query the
`pg_stat_activity` 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.
value:
type: string
display_default: pg_stat_activity
fleet_configurable: false
- name: query_encodings
display_priority: 0
description: |
Set this value if your database is encoded in SQL_ASCII and you have clients that use encodings other than UTF-8.
When attempting to decode stored query text for query metrics, samples and activity, the agent will use these
values in order and return the first successful decoding. Only supported for Postgres 10 and above.
Note that the values should be the Python versions of the encoding names, which can be referenced at:
https://docs.python.org/3/library/codecs.html#standard-encodings
value:
type: array
items:
type: string
example:
- utf8
- latin1
display_default:
- utf8
fleet_configurable: false
- name: query_metrics
display_priority: 0
fleet_configurable: true
description: Configure collection of query metrics
options:
- name: enabled
fleet_configurable: true
description: |
Enable collection of query metrics. Requires `dbm: true`.
value:
type: boolean
example: true
- name: collection_interval
fleet_configurable: true
description: |
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.
value:
type: number
example: 10
- name: pg_stat_statements_max_warning_threshold
hidden: true
description: |
Set the threshold for a safe value of `pg_stat_statements.max`. If the database is configured with a value
higher than this threshold, a warning is emitted to recommend lowering the setting value.
value:
type: number
default: 10000
fleet_configurable: false
- name: full_statement_text_cache_max_size
hidden: true
description: |
Set the max size of the cache used for the full statement text.
value:
type: number
default: 10000
fleet_configurable: false
- name: full_statement_text_samples_per_hour_per_query
hidden: true
description: |
Set the max number of full statement text samples to collect per hour per query.
value:
type: number
default: 1
fleet_configurable: false
- name: incremental_query_metrics
hidden: true
description: |
When enabled query metrics collection uses a lightweight multi-pass pipeline.
The check determines which statements had a change in call counts since the last collection, then fetches
query text from `pg_stat_statements` and runs obfuscation for those statements.
value:
type: boolean
display_default: true
example: true
fleet_configurable: false
- name: run_sync
hidden: true
description: |
Run the query metrics collection synchronously. This is useful for testing purposes, but should not be used
in production as it can block the main thread and cause performance issues.
value:
type: boolean
example: false
fleet_configurable: false
- name: batch_max_content_size
hidden: true
description: |
This is a stub option for type hints. This value is actually set in the datadog.yaml config using
database_monitoring.metrics.batch_max_content_size. For details on this parameter, see statements.py.
value:
type: integer
example: 20_000_000
fleet_configurable: false
- name: query_samples
display_priority: 0
fleet_configurable: true
description: Configure collection of explain plan samples
options:
- name: enabled
fleet_configurable: true
description: |
Enable collection of explain plans. Requires `dbm: true`.
value:
type: boolean
example: true
- name: collection_interval
fleet_configurable: true
description: |
Set the explain plan 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.
value:
type: number
example: 1
- name: explain_function
fleet_configurable: true
description: |
Override the default function used to collect explain plans for queries.
value:
type: string
example: datadog.explain_statement
- name: explained_queries_per_hour_per_query
description: |
Set the rate limit for how many explain plans will be collected per hour per normalized query.
value:
type: integer
example: 60
fleet_configurable: false
- name: samples_per_hour_per_query
description: |
Set the rate limit for how many explain plan events will be ingested per hour per normalized explain
plan.
value:
type: integer
example: 15
fleet_configurable: false
- name: explained_queries_cache_maxsize
description: |
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.
value:
type: integer
example: 5000
fleet_configurable: false
- name: seen_samples_cache_maxsize
description: |
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 explain plans which exceed the cache's limit.
value:
type: integer
example: 10000
fleet_configurable: false
- name: explain_parameterized_queries
fleet_configurable: true
description: |
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.
value:
type: boolean
example: true
- name: explain_errors_cache_maxsize
hidden: true
description: |
Set the max size of the cache used for the explain errors.
value:
type: integer
default: 5000
fleet_configurable: false
- name: explain_errors_cache_ttl
hidden: true
description: |
Set the ttl in seconds of the cache used for the explain errors.
value:
type: integer
default: 86400
fleet_configurable: false
- name: run_sync
hidden: true
description: |
Run the query metrics collection synchronously. This is useful for testing purposes, but should not be used
in production as it can block the main thread and cause performance issues.
value:
type: boolean
example: false
fleet_configurable: false
- name: query_activity
display_priority: 0
fleet_configurable: true
description: Configure collection of in-flight query samples
options:
- name: enabled
fleet_configurable: true
description: |
Enable collection of in-flight query samples. Requires `dbm: true`.
value:
type: boolean
example: true
- name: collection_interval
fleet_configurable: true
description: |
Set the in-flight query sample collection interval (in seconds). This number cannot be smaller than
the `query_samples` configured collection_interval.
value:
type: number
example: 10
hidden: true
- name: payload_row_limit
fleet_configurable: true
description: |
Set the 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.
value:
type: number
example: 3500
- name: collect_settings
display_priority: 0
fleet_configurable: true
description: Configure collection of pg_settings.
options:
- name: enabled
fleet_configurable: true
description: |
Enable collection of pg_settings. Requires `dbm: true`.
value:
type: boolean
example: true
- name: collection_interval
fleet_configurable: true
description: |
Set the database settings collection interval (in seconds). Each collection involves a single query to
`pg_settings`.
value:
type: number
example: 600
- name: ignored_settings_patterns
fleet_configurable: true
description: |
A list of setting patterns to ignore. Any setting key matching one of the values in this list will
not be collected. This uses the traditional LIKE pattern-matching approach.
value:
type: array
items:
type: string
example:
- plpgsql%
default:
- plpgsql%
- name: run_sync
fleet_configurable: true
hidden: true
description: |
Run the metadata collection synchronously. This is useful for testing purposes, but should not be used
in production as it can block the main thread and cause performance issues.
value:
type: boolean
example: false
- name: collect_schemas
display_priority: 0
fleet_configurable: true
description: |
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.
options:
- name: enabled
fleet_configurable: true
description: |
Enable collection of database schemas. Requires `dbm: true`.
value:
type: boolean
example: true
- name: max_tables
fleet_configurable: true
description: |
Maximum amount of tables the Agent collects from the instance.