Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update custom_queries configuration to support optional collection_interval #16957

Merged
merged 7 commits into from
Feb 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions clickhouse/changelog.d/16957.added
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
update custom_queries configuration to support optional collection_interval
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ class CustomQuery(BaseModel):
arbitrary_types_allowed=True,
frozen=True,
)
collection_interval: Optional[int] = None
columns: Optional[tuple[MappingProxyType[str, Any], ...]] = None
query: Optional[str] = None
tags: Optional[tuple[str, ...]] = None
Expand Down
7 changes: 7 additions & 0 deletions clickhouse/datadog_checks/clickhouse/data/conf.yaml.example
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,13 @@ instances:
## 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.
#
# custom_queries:
# - query: SELECT foo, COUNT(*) FROM table.events GROUP BY foo
Expand Down
1 change: 1 addition & 0 deletions datadog_checks_dev/changelog.d/16957.added
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
update custom_queries configuration to support optional collection_interval
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@
- query: <QUERY>
columns: <COLUMNS>
tags: <TAGS>
collection_interval: <COLLECTION_INTERVAL>
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,13 @@
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.
value:
type: array
items:
Expand All @@ -74,6 +81,8 @@
type: array
items:
type: string
- name: collection_interval
type: integer
example:
- query: SELECT foo, COUNT(*) FROM table.events GROUP BY foo
columns:
Expand All @@ -83,3 +92,4 @@
type: gauge
tags:
- test:<INTEGRATION>
collection_interval: 30
1 change: 1 addition & 0 deletions mysql/changelog.d/16957.added
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
update custom_queries configuration to support optional collection_interval
1 change: 1 addition & 0 deletions mysql/datadog_checks/mysql/config_models/instance.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ class CustomQuery(BaseModel):
arbitrary_types_allowed=True,
frozen=True,
)
collection_interval: Optional[int] = None
columns: Optional[tuple[MappingProxyType[str, Any], ...]] = None
query: Optional[str] = None
tags: Optional[tuple[str, ...]] = None
Expand Down
7 changes: 7 additions & 0 deletions mysql/datadog_checks/mysql/data/conf.yaml.example
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,13 @@ instances:
## 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.
#
# custom_queries:
# - query: SELECT foo, COUNT(*) FROM table.events GROUP BY foo
Expand Down
1 change: 1 addition & 0 deletions oracle/changelog.d/16957.added
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
update custom_queries configuration to support optional collection_interval
1 change: 1 addition & 0 deletions oracle/datadog_checks/oracle/config_models/instance.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ class CustomQuery(BaseModel):
arbitrary_types_allowed=True,
frozen=True,
)
collection_interval: Optional[int] = None
columns: Optional[tuple[MappingProxyType[str, Any], ...]] = None
query: Optional[str] = None
tags: Optional[tuple[str, ...]] = None
Expand Down
9 changes: 9 additions & 0 deletions oracle/datadog_checks/oracle/data/conf.yaml.example
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ init_config:
# - 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.
Expand Down Expand Up @@ -145,6 +146,13 @@ instances:
## 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.
#
# custom_queries:
# - query: SELECT foo, COUNT(*) FROM table.events GROUP BY foo
Expand All @@ -155,6 +163,7 @@ instances:
# type: gauge
# tags:
# - test:<INTEGRATION>
# collection_interval: 30

## @param tags - list of strings - optional
## A list of tags to attach to every metric and service check emitted by this instance.
Expand Down
1 change: 1 addition & 0 deletions sap_hana/changelog.d/16957.added
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
update custom_queries configuration to support optional collection_interval
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ class CustomQuery(BaseModel):
arbitrary_types_allowed=True,
frozen=True,
)
collection_interval: Optional[int] = None
columns: Optional[tuple[MappingProxyType[str, Any], ...]] = None
query: Optional[str] = None
tags: Optional[tuple[str, ...]] = None
Expand Down
9 changes: 9 additions & 0 deletions sap_hana/datadog_checks/sap_hana/data/conf.yaml.example
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ init_config:
# - 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.
Expand Down Expand Up @@ -137,6 +138,13 @@ instances:
## 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.
#
# custom_queries:
# - query: SELECT foo, COUNT(*) FROM table.events GROUP BY foo
Expand All @@ -147,6 +155,7 @@ instances:
# type: gauge
# tags:
# - test:<INTEGRATION>
# collection_interval: 30

## @param persist_db_connections - boolean - optional - default: true
## Whether or not to persist database connections.
Expand Down
1 change: 1 addition & 0 deletions singlestore/changelog.d/16957.added
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
update custom_queries configuration to support optional collection_interval
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ class CustomQuery(BaseModel):
arbitrary_types_allowed=True,
frozen=True,
)
collection_interval: Optional[int] = None
columns: Optional[tuple[MappingProxyType[str, Any], ...]] = None
query: Optional[str] = None
tags: Optional[tuple[str, ...]] = None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ init_config:
# - query: <QUERY>
# columns: <COLUMNS>
# tags: <TAGS>
# collection_interval: <COLLECTION_INTERVAL>

## Every instance is scheduled independently of the others.
#
Expand Down Expand Up @@ -112,6 +113,13 @@ instances:
## 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.
#
# custom_queries:
# - query: SELECT foo, COUNT(*) FROM table.events GROUP BY foo
Expand All @@ -122,6 +130,7 @@ instances:
# type: gauge
# tags:
# - test:<INTEGRATION>
# collection_interval: 30

## @param collect_system_metrics - boolean - optional - default: false
## Collect additional system metrics from the MV_SYSINFO_* tables. Disabled by default to limit
Expand Down
1 change: 1 addition & 0 deletions snowflake/changelog.d/16957.added
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
update custom_queries configuration to support optional collection_interval
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ class CustomQuery(BaseModel):
arbitrary_types_allowed=True,
frozen=True,
)
collection_interval: Optional[int] = None
columns: Optional[tuple[MappingProxyType[str, Any], ...]] = None
query: Optional[str] = None
tags: Optional[tuple[str, ...]] = None
Expand Down
8 changes: 8 additions & 0 deletions snowflake/datadog_checks/snowflake/data/conf.yaml.example
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ init_config:
# - query: <QUERY>
# columns: <COLUMNS>
# tags: <TAGS>
# collection_interval: <COLLECTION_INTERVAL>

## @param proxy_host - string - optional
## The host of your proxy server.
Expand Down Expand Up @@ -245,6 +246,13 @@ instances:
## 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.
#
# custom_queries:
# - query: SELECT foo, COUNT(*) FROM table.events GROUP BY foo
Expand Down
1 change: 1 addition & 0 deletions sqlserver/changelog.d/16957.added
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
update custom_queries configuration to support optional collection_interval
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ class CustomQuery(BaseModel):
arbitrary_types_allowed=True,
frozen=True,
)
collection_interval: Optional[int] = None
columns: Optional[tuple[MappingProxyType[str, Any], ...]] = None
query: Optional[str] = None
tags: Optional[tuple[str, ...]] = None
Expand Down
9 changes: 9 additions & 0 deletions sqlserver/datadog_checks/sqlserver/data/conf.yaml.example
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ init_config:
# - 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.
Expand Down Expand Up @@ -593,6 +594,13 @@ instances:
## 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.
#
# custom_queries:
# - query: SELECT foo, COUNT(*) FROM table.events GROUP BY foo
Expand All @@ -603,6 +611,7 @@ instances:
# type: gauge
# tags:
# - test:<INTEGRATION>
# collection_interval: 30

## @param stored_procedure - string - optional
## DEPRECATED - use `custom_queries` instead. For guidance, see:
Expand Down
1 change: 1 addition & 0 deletions teradata/changelog.d/16957.added
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
update custom_queries configuration to support optional collection_interval
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ class CustomQuery(BaseModel):
arbitrary_types_allowed=True,
frozen=True,
)
collection_interval: Optional[int] = None
columns: Optional[tuple[MappingProxyType[str, Any], ...]] = None
query: Optional[str] = None
tags: Optional[tuple[str, ...]] = None
Expand Down
9 changes: 9 additions & 0 deletions teradata/datadog_checks/teradata/data/conf.yaml.example
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ init_config:
# - query: <QUERY>
# columns: <COLUMNS>
# tags: <TAGS>
# collection_interval: <COLLECTION_INTERVAL>

## Every instance is scheduled independently of the others.
#
Expand Down Expand Up @@ -199,6 +200,13 @@ instances:
## 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.
#
# custom_queries:
# - query: SELECT foo, COUNT(*) FROM table.events GROUP BY foo
Expand All @@ -209,6 +217,7 @@ instances:
# type: gauge
# tags:
# - test:<INTEGRATION>
# collection_interval: 30

## @param tags - list of strings - optional
## A list of tags to attach to every metric and service check emitted by this instance.
Expand Down
1 change: 1 addition & 0 deletions vertica/changelog.d/16957.added
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
update custom_queries configuration to support optional collection_interval
1 change: 1 addition & 0 deletions vertica/datadog_checks/vertica/config_models/instance.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ class CustomQuery(BaseModel):
arbitrary_types_allowed=True,
frozen=True,
)
collection_interval: Optional[int] = None
columns: Optional[tuple[MappingProxyType[str, Any], ...]] = None
query: Optional[str] = None
tags: Optional[tuple[str, ...]] = None
Expand Down
7 changes: 7 additions & 0 deletions vertica/datadog_checks/vertica/data/conf.yaml.example
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,13 @@ instances:
## 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.
#
# custom_queries:
# - query: SELECT force_outer, table_name FROM v_catalog.tables
Expand Down
1 change: 1 addition & 0 deletions voltdb/changelog.d/16957.added
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
update custom_queries configuration to support optional collection_interval
1 change: 1 addition & 0 deletions voltdb/datadog_checks/voltdb/config_models/instance.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ class CustomQuery(BaseModel):
arbitrary_types_allowed=True,
frozen=True,
)
collection_interval: Optional[int] = None
columns: Optional[tuple[MappingProxyType[str, Any], ...]] = None
query: Optional[str] = None
tags: Optional[tuple[str, ...]] = None
Expand Down
9 changes: 9 additions & 0 deletions voltdb/datadog_checks/voltdb/data/conf.yaml.example
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ init_config:
# - 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.
Expand Down Expand Up @@ -309,6 +310,13 @@ instances:
## 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.
#
# custom_queries:
# - query: SELECT foo, COUNT(*) FROM table.events GROUP BY foo
Expand All @@ -319,6 +327,7 @@ instances:
# type: gauge
# tags:
# - test:<INTEGRATION>
# collection_interval: 30

## @param tags - list of strings - optional
## A list of tags to attach to every metric and service check emitted by this instance.
Expand Down
Loading