Skip to content

Commit 9dd1f39

Browse files
committed
feat: change display priority of postgress and mysql to keep only most important fields on top
1 parent 14de42a commit 9dd1f39

4 files changed

Lines changed: 179 additions & 179 deletions

File tree

mysql/assets/configuration/spec.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ files:
7070
type: string
7171

7272
- name: dbm
73-
display_priority: 2
73+
display_priority: 0
7474
fleet_configurable: true
7575
description: |
7676
Set to `true` to enable Database Monitoring.
@@ -1023,7 +1023,7 @@ files:
10231023
tags:
10241024
- test:mysql
10251025
metric_prefix: mysql
1026-
custom_queries.display_priority: 1
1026+
custom_queries.display_priority: 0
10271027
- template: instances/default
10281028
overrides:
10291029
disable_generic_tags.hidden: false
@@ -1032,7 +1032,7 @@ files:
10321032
Replaces generic tag such as `server` with `mysql_server` to avoid getting it mixed with
10331033
other integrations tags.
10341034
1035-
tags.display_priority: 3
1035+
tags.display_priority: 0
10361036
- template: logs
10371037
example:
10381038
- type: file

mysql/datadog_checks/mysql/data/conf.yaml.example

Lines changed: 69 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -52,80 +52,11 @@ instances:
5252
#
5353
password: <PASSWORD>
5454

55-
## @param tags - list of strings - optional
56-
## A list of tags to attach to every metric and service check emitted by this instance.
57-
##
58-
## Learn more about tagging at https://docs.datadoghq.com/tagging
59-
#
60-
# tags:
61-
# - <KEY_1>:<VALUE_1>
62-
# - <KEY_2>:<VALUE_2>
63-
6455
## @param dbm - boolean - optional - default: false
6556
## Set to `true` to enable Database Monitoring.
6657
#
6758
# dbm: false
6859

69-
## @param custom_queries - list of mappings - optional
70-
## Each query must have 2 fields, and can have a third optional field:
71-
##
72-
## 1. query - The SQL to execute. It can be a simple statement or a multi-line script.
73-
## Use the pipe `|` if you require a multi-line script.
74-
## 2. columns - The list representing each column, ordered sequentially from left to right.
75-
## The number of columns must equal the number of columns returned in the query.
76-
## There are 2 required pieces of data:
77-
## 1. name - The suffix to append to `<INTEGRATION>.` to form
78-
## the full metric name. If `type` is a `tag` type, this column is considered a tag and applied
79-
## to every metric collected by this particular query.
80-
## 2. type - The submission method (gauge, monotonic_count, etc.).
81-
## This can also be set to the following `tag` types to tag each metric in the row with the name
82-
## and value of the item in this column:
83-
## 1. tag - This is the default tag type
84-
## 2. tag_list - This allows multiple values to be attached to the tag name. For example:
85-
## ```
86-
## query = {
87-
## "name": "example",
88-
## "query": "...",
89-
## "columns": [
90-
## {"name": "server_tag", "type": "tag_list"},
91-
## {"name": "foo", "type": "gauge"},
92-
## ]
93-
## }
94-
## ```
95-
## May result in:
96-
## ```
97-
## gauge("foo", tags=["server_tag:us", "server_tag:primary", "server_tag:default"])
98-
## gauge("foo", tags=["server_tag:eu"])
99-
## gauge("foo", tags=["server_tag:eu", "server_tag:primary"])
100-
## ```
101-
## 3. tag_not_null - This only sets tags in the metric if the value is not null
102-
## You can use the `count` type to perform aggregation for queries that return multiple rows with
103-
## the same or no tags.
104-
## Columns without a name are ignored. To skip a column, enter:
105-
## ```
106-
## - {}
107-
## ```
108-
## 3. tags (optional) - A list of tags to apply to each metric.
109-
## 4. collection_interval (optional) - The frequency at which to collect the metrics.
110-
## If collection_interval is not set, the query will be run every check run.
111-
## If the collection interval is less than check collection interval, the query will be run every check
112-
## run.
113-
## If the collection interval is greater than check collection interval, the query will NOT BE RUN
114-
## exactly at the collection interval.
115-
## The query will be run at the next check run after the collection interval has passed.
116-
## 5. metric_prefix (optional) - The prefix to apply to each metric.
117-
#
118-
# custom_queries:
119-
# - query: SELECT foo, COUNT(*) FROM table.events GROUP BY foo
120-
# columns:
121-
# - name: foo
122-
# type: tag
123-
# - name: event.total
124-
# type: gauge
125-
# tags:
126-
# - test:mysql
127-
# metric_prefix: mysql
128-
12960
## @param propagate_agent_tags - boolean - optional - default: false
13061
## Set to `true` to propagate the tags from `datadog.yaml` to the check.
13162
## When set to `true`, the tags from `datadog.yaml` are added to the check's tags for all instances.
@@ -784,6 +715,75 @@ instances:
784715
#
785716
# use_global_custom_queries: 'true'
786717

718+
## @param custom_queries - list of mappings - optional
719+
## Each query must have 2 fields, and can have a third optional field:
720+
##
721+
## 1. query - The SQL to execute. It can be a simple statement or a multi-line script.
722+
## Use the pipe `|` if you require a multi-line script.
723+
## 2. columns - The list representing each column, ordered sequentially from left to right.
724+
## The number of columns must equal the number of columns returned in the query.
725+
## There are 2 required pieces of data:
726+
## 1. name - The suffix to append to `<INTEGRATION>.` to form
727+
## the full metric name. If `type` is a `tag` type, this column is considered a tag and applied
728+
## to every metric collected by this particular query.
729+
## 2. type - The submission method (gauge, monotonic_count, etc.).
730+
## This can also be set to the following `tag` types to tag each metric in the row with the name
731+
## and value of the item in this column:
732+
## 1. tag - This is the default tag type
733+
## 2. tag_list - This allows multiple values to be attached to the tag name. For example:
734+
## ```
735+
## query = {
736+
## "name": "example",
737+
## "query": "...",
738+
## "columns": [
739+
## {"name": "server_tag", "type": "tag_list"},
740+
## {"name": "foo", "type": "gauge"},
741+
## ]
742+
## }
743+
## ```
744+
## May result in:
745+
## ```
746+
## gauge("foo", tags=["server_tag:us", "server_tag:primary", "server_tag:default"])
747+
## gauge("foo", tags=["server_tag:eu"])
748+
## gauge("foo", tags=["server_tag:eu", "server_tag:primary"])
749+
## ```
750+
## 3. tag_not_null - This only sets tags in the metric if the value is not null
751+
## You can use the `count` type to perform aggregation for queries that return multiple rows with
752+
## the same or no tags.
753+
## Columns without a name are ignored. To skip a column, enter:
754+
## ```
755+
## - {}
756+
## ```
757+
## 3. tags (optional) - A list of tags to apply to each metric.
758+
## 4. collection_interval (optional) - The frequency at which to collect the metrics.
759+
## If collection_interval is not set, the query will be run every check run.
760+
## If the collection interval is less than check collection interval, the query will be run every check
761+
## run.
762+
## If the collection interval is greater than check collection interval, the query will NOT BE RUN
763+
## exactly at the collection interval.
764+
## The query will be run at the next check run after the collection interval has passed.
765+
## 5. metric_prefix (optional) - The prefix to apply to each metric.
766+
#
767+
# custom_queries:
768+
# - query: SELECT foo, COUNT(*) FROM table.events GROUP BY foo
769+
# columns:
770+
# - name: foo
771+
# type: tag
772+
# - name: event.total
773+
# type: gauge
774+
# tags:
775+
# - test:mysql
776+
# metric_prefix: mysql
777+
778+
## @param tags - list of strings - optional
779+
## A list of tags to attach to every metric and service check emitted by this instance.
780+
##
781+
## Learn more about tagging at https://docs.datadoghq.com/tagging
782+
#
783+
# tags:
784+
# - <KEY_1>:<VALUE_1>
785+
# - <KEY_2>:<VALUE_2>
786+
787787
## @param service - string - optional
788788
## Attach the tag `service:<SERVICE>` to every metric, event, and service check emitted by this integration.
789789
##

postgres/assets/configuration/spec.yaml

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ files:
4949
value:
5050
type: string
5151
- name: dbname
52-
display_priority: 19
52+
display_priority: 0
5353
description: |
5454
The name of the PostgreSQL database to monitor.
5555
Note: If omitted, the default system Postgres database is queried.
@@ -58,7 +58,7 @@ files:
5858
type: string
5959
display_default: postgres
6060
- name: dbm
61-
display_priority: 18
61+
display_priority: 0
6262
fleet_configurable: true
6363
description: |
6464
Set to `true` to enable Database Monitoring.
@@ -67,7 +67,7 @@ files:
6767
example: false
6868
display_default: false
6969
- name: relations
70-
display_priority: 17
70+
display_priority: 0
7171
fleet_configurable: true
7272
description: |
7373
The list of relations/tables must be specified here to track per-relation (table, index, view, etc.) metrics.
@@ -129,7 +129,7 @@ files:
129129
- r
130130
- p
131131
- name: collect_activity_metrics
132-
display_priority: 15
132+
display_priority: 0
133133
fleet_configurable: true
134134
description: |
135135
Collect metrics regarding transactions from pg_stat_activity. Please make sure the user
@@ -138,52 +138,52 @@ files:
138138
type: boolean
139139
example: false
140140
- name: collect_function_metrics
141-
display_priority: 14
141+
display_priority: 0
142142
fleet_configurable: true
143143
description: |
144144
If set to true, collects metrics regarding PL/pgSQL functions from pg_stat_user_functions.
145145
value:
146146
type: boolean
147147
example: false
148148
- name: collect_database_size_metrics
149-
display_priority: 13
149+
display_priority: 0
150150
fleet_configurable: true
151151
description: Collect database size metrics.
152152
value:
153153
type: boolean
154154
example: true
155155
- name: collect_bloat_metrics
156-
display_priority: 12
156+
display_priority: 0
157157
fleet_configurable: true
158158
description: Collect metrics about table bloat. Only available when `relation` metrics are enabled.
159159
enabled: true
160160
value:
161161
type: boolean
162162
example: false
163163
- name: tag_replication_role
164-
display_priority: 10
164+
display_priority: 0
165165
fleet_configurable: true
166166
hidden: true
167167
description: Tag metrics and checks with `replication_role:<master|standby>`.
168168
value:
169169
type: boolean
170170
example: true
171171
- name: collect_count_metrics
172-
display_priority: 9
172+
display_priority: 0
173173
fleet_configurable: true
174174
description: Collect count of user tables from pg_class.
175175
value:
176176
type: boolean
177177
example: true
178178
- name: max_relations
179-
display_priority: 8
179+
display_priority: 0
180180
fleet_configurable: true
181181
description: Determines the maximum number of relations to fetch.
182182
value:
183183
type: integer
184184
example: 300
185185
- name: ssl
186-
display_priority: 7
186+
display_priority: 0
187187
description: |
188188
This option determines whether or not and with what priority a secure SSL TCP/IP connection
189189
is negotiated with the server.
@@ -206,14 +206,14 @@ files:
206206
example: 'allow'
207207
default: 'allow'
208208
- name: collect_default_database
209-
display_priority: 4
209+
display_priority: 0
210210
fleet_configurable: true
211211
description: Include statistics from the default database 'postgres' in the check metrics.
212212
value:
213213
type: boolean
214214
example: true
215215
- name: query_timeout
216-
display_priority: 3
216+
display_priority: 0
217217
fleet_configurable: true
218218
description: |
219219
Adds a statement_timeout https://www.postgresql.org/docs/current/runtime-config-client.html#GUC-STATEMENT-TIMEOUT
@@ -224,7 +224,7 @@ files:
224224
type: integer
225225
example: 5000
226226
- name: reported_hostname
227-
display_priority: 2
227+
display_priority: 0
228228
description: |
229229
Set the reported hostname for this instance. This value overrides the hostname detected by the Agent
230230
and can be useful to set a custom hostname when connecting to a remote database through a proxy.
@@ -233,7 +233,7 @@ files:
233233
type: string
234234
default: null
235235
- name: ignore_databases
236-
display_priority: 1
236+
display_priority: 0
237237
fleet_configurable: true
238238
description: |
239239
A list of databases to ignore. No metrics or statement samples will be collected for these databases.
@@ -1628,16 +1628,16 @@ files:
16281628
tags:
16291629
- test:postgresql
16301630
metric_prefix: postgresql
1631-
custom_queries.display_priority: 16
1631+
custom_queries.display_priority: 0
16321632
- template: instances/default
16331633
overrides:
16341634
disable_generic_tags.hidden: False
16351635
disable_generic_tags.enabled: True
16361636
disable_generic_tags.description: The integration will stop sending server tag as is reduntant with host tag
1637-
tags.display_priority: 20
1638-
min_collection_interval.display_priority: 11
1639-
disable_generic_tags.display_priority: 6
1640-
empty_default_hostname.display_priority: 5
1637+
tags.display_priority: 0
1638+
min_collection_interval.display_priority: 0
1639+
disable_generic_tags.display_priority: 0
1640+
empty_default_hostname.display_priority: 0
16411641
- template: logs
16421642
example:
16431643
- type: file

0 commit comments

Comments
 (0)