Skip to content
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
6 changes: 3 additions & 3 deletions datadog_csi_driver/assets/configuration/spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ files:
- csi-driver
- template: init_config
options:
- template: init_config/openmetrics_legacy
- template: init_config/openmetrics
- template: instances
options:
- template: instances/openmetrics_legacy
- template: instances/openmetrics
overrides:
prometheus_url.value.example: http://%%host%%:5000/metrics
openmetrics_endpoint.value.example: http://%%host%%:5000/metrics
2 changes: 2 additions & 0 deletions datadog_csi_driver/changelog.d/21930.fixed
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Update auto_conf.yaml to use openmetrics_endpoint instead of deprecated prometheus_url parameter.

Original file line number Diff line number Diff line change
Expand Up @@ -53,78 +53,170 @@ init_config:
#
instances:

## @param prometheus_url - string - required
## The URL where your application metrics are exposed by Prometheus.
## @param openmetrics_endpoint - string - required
## The URL exposing metrics in the OpenMetrics format.
#
- prometheus_url: http://%%host%%:5000/metrics
- openmetrics_endpoint: http://%%host%%:5000/metrics

## @param prometheus_metrics_prefix - string - optional
## Removes a given <PREFIX> from exposed Prometheus metrics.
## @param raw_metric_prefix - string - optional
## A prefix that is removed from all exposed metric names, if present.
## All configuration options will use the prefix-less name.
#
# prometheus_metrics_prefix: <PREFIX>_
# raw_metric_prefix: <PREFIX>_

## @param health_service_check - boolean - optional - default: true
## Send a service check reporting about the health of the Prometheus endpoint.
## The service check is named <NAMESPACE>.prometheus.health
## @param extra_metrics - (list of string or mapping) - optional
## This list defines metrics to collect from the `openmetrics_endpoint`, in addition to
## what the check collects by default. If the check already collects a metric, then
## metric definitions here take precedence. Metrics may be defined in 3 ways:
##
## 1. If the item is a string, then it represents the exposed metric name, and
## the sent metric name will be identical. For example:
## ```
## extra_metrics:
## - <METRIC_1>
## - <METRIC_2>
## ```
## 2. If the item is a mapping, then the keys represent the exposed metric names.
##
## 1. If a value is a string, then it represents the sent metric name. For example:
## ```
## extra_metrics:
## - <EXPOSED_METRIC_1>: <SENT_METRIC_1>
## - <EXPOSED_METRIC_2>: <SENT_METRIC_2>
## ```
## 2. If a value is a mapping, then it must have a `name` and/or `type` key.
## The `name` represents the sent metric name, and the `type` represents how
## the metric should be handled, overriding any type information the endpoint
## may provide. For example:
## ```
## extra_metrics:
## - <EXPOSED_METRIC_1>:
## name: <SENT_METRIC_1>
## type: <METRIC_TYPE_1>
## - <EXPOSED_METRIC_2>:
## name: <SENT_METRIC_2>
## type: <METRIC_TYPE_2>
## ```
## The supported native types are `gauge`, `counter`, `histogram`, and `summary`.
##
## Note: To collect counter metrics with names ending in `_total`, specify the metric name without the `_total`
## suffix. For example, to collect the counter metric `promhttp_metric_handler_requests_total`, specify
## `promhttp_metric_handler_requests`. This submits to Datadog the metric name appended with `.count`.
## For more information, see:
## https://github.com/OpenObservability/OpenMetrics/blob/main/specification/OpenMetrics.md#suffixes
##
## Regular expressions may be used to match the exposed metric names, for example:
## ```
## extra_metrics:
## - ^network_(ingress|egress)_.+
## - .+:
## type: gauge
## ```
#
# extra_metrics:
# - <METRIC_1>
# - <EXPOSED_METRIC_2>: <SENT_METRIC_2>
# - <EXPOSED_METRIC_3>:
# name: <SENT_METRIC_3>
# type: <METRIC_TYPE_3>

## @param exclude_metrics - list of strings - optional
## A list of metrics to exclude, with each entry being either
## the exact metric name or a regular expression.
## In order to exclude all metrics but the ones matching a specific filter,
## you can use a negative lookahead regex like:
## - ^(?!foo).*$
#
# exclude_metrics: []

## @param exclude_metrics_by_labels - mapping - optional
## A mapping of labels to exclude metrics with matching label name and their corresponding metric values. To match
## all values of a label, set it to `true`.
##
## Note: Label filtering happens before `rename_labels`.
##
## For example, the following configuration instructs the check to exclude all metrics with
## a label `worker` or a label `pid` with the value of either `23` or `42`.
##
## exclude_metrics_by_labels:
## worker: true
## pid:
## - '23'
## - '42'
#
# health_service_check: true
# exclude_metrics_by_labels: {}

## @param label_to_hostname - string - optional
## Override the hostname with the value of one label.
## @param exclude_labels - list of strings - optional
## A list of labels to exclude, useful for high cardinality values like timestamps or UUIDs.
## May be used in conjunction with `include_labels`.
## Labels defined in `exclude_labels` will take precedence in case of overlap.
##
## Note: Label filtering happens before `rename_labels`.
#
# label_to_hostname: <LABEL>
# exclude_labels: []

## @param label_joins - mapping - optional
## Allows targeting a metric to retrieve its label with a 1:1 mapping.
## @param include_labels - list of strings - optional
## A list of labels to include. May be used in conjunction with `exclude_labels`.
## Labels defined in `exclude_labels` will take precedence in case of overlap.
##
## Note: Label filtering happens before `rename_labels`.
#
# include_labels: []

## @param rename_labels - mapping - optional
## A mapping of label names to their new names.
#
# label_joins:
# target_metric:
# label_to_match: <MATCHED_LABEL>
# labels_to_get:
# - <EXTRA_LABEL_1>
# - <EXTRA_LABEL_2>
# rename_labels:
# <LABEL_NAME_1>: <NEW_LABEL_NAME_1>
# <LABEL_NAME_2>: <NEW_LABEL_NAME_2>

## @param labels_mapper - mapping - optional
## The label mapper allows you to rename labels.
## Format is <LABEL_TO_RENAME>: <NEW_LABEL_NAME>
## @param enable_health_service_check - boolean - optional - default: true
## Whether or not to send a service check named `<NAMESPACE>.openmetrics.health` which reports
## the health of the `openmetrics_endpoint`.
#
# labels_mapper:
# flavor: origin
# enable_health_service_check: true

## @param type_overrides - mapping - optional
## Override a type in the Prometheus payload or type an untyped metric (ignored by default).
## Supported <METRIC_TYPE> are `gauge`, `counter`, `histogram`, and `summary`.
## The "*" wildcard can be used to match multiple metric names.
## @param ignore_connection_errors - boolean - optional - default: false
## Whether or not to ignore connection errors when scraping `openmetrics_endpoint`.
#
# type_overrides:
# <METRIC_NAME>: <METRIC_TYPE>
# ignore_connection_errors: false

## @param send_histograms_buckets - boolean - optional - default: true
## Set send_histograms_buckets to true to send the histograms bucket.
## @param hostname_label - string - optional
## Override the hostname for every metric submission with the value of one of its labels.
#
# send_histograms_buckets: true
# hostname_label: <HOSTNAME_LABEL>

## @param send_distribution_buckets - boolean - optional - default: false
## Set `send_distribution_buckets` to `true` to send histograms as Datadog distribution metrics.
##
## Learn more about distribution metrics: https://docs.datadoghq.com/developers/metrics/distributions/
## @param hostname_format - string - optional
## When `hostname_label` is set, this instructs the check how to format the values. The string
## `<HOSTNAME>` is replaced by the value of the label defined by `hostname_label`.
#
# send_distribution_buckets: false
# hostname_format: <HOSTNAME>

## @param send_monotonic_counter - boolean - optional - default: true
## Set send_monotonic_counter to true to send counters as monotonic counter.
## @param collect_histogram_buckets - boolean - optional - default: true
## Whether or not to send histogram buckets.
#
# send_monotonic_counter: true
# collect_histogram_buckets: true

## @param send_distribution_counts_as_monotonic - boolean - optional - default: false
## If set to true, sends histograms and summary counters as monotonic counters (instead of gauges).
## @param non_cumulative_histogram_buckets - boolean - optional - default: false
## Whether or not histogram buckets are non-cumulative and to come with a `lower_bound` tag.
#
# send_distribution_counts_as_monotonic: false
# non_cumulative_histogram_buckets: false

## @param send_distribution_sums_as_monotonic - boolean - optional - default: false
## If set to true, sends histograms and summary sums as monotonic counters (instead of gauges).
## @param histogram_buckets_as_distributions - boolean - optional - default: false
## Whether or not to send histogram buckets as Datadog distribution metrics. This implicitly
## enables the `collect_histogram_buckets` and `non_cumulative_histogram_buckets` options.
##
## Learn more about distribution metrics:
## https://docs.datadoghq.com/developers/metrics/types/?tab=distribution#metric-types
#
# send_distribution_sums_as_monotonic: false
# histogram_buckets_as_distributions: false

## @param collect_counters_with_distributions - boolean - optional - default: false
## Whether or not to also collect the observation counter metrics ending in `.sum` and `.count`
## when sending histogram buckets as Datadog distribution metrics. This implicitly enables the
## `histogram_buckets_as_distributions` option.
#
# collect_counters_with_distributions: false

## @param use_process_start_time - boolean - optional - default: false
## Whether to enable a heuristic for reporting counter values on the first scrape. When true,
Expand All @@ -134,59 +226,61 @@ instances:
#
# use_process_start_time: false

## @param exclude_labels - list of strings - optional
## A list of labels to be excluded. May be used in conjunction with `include_labels`.
## Labels defined in `excluded labels` will take precedence in case of overlap.
#
# exclude_labels:
# - timestamp

## @param include_labels - list of strings - optional
## A list of labels to include. May be used in conjunction with `exclude_labels`.
## Labels defined in `excluded labels` will take precedence in case of overlap.
#
# include_labels: []

## @param bearer_token_auth - boolean or string - optional - default: false
## If set to true, adds a bearer token authentication header.
## If set to 'tls_only', only adds a bearer token authentication header if the endpoint is secure https.
## Note: If bearer_token_path is not set, the default path is /var/run/secrets/kubernetes.io/serviceaccount/token.
#
# bearer_token_auth: false

## @param bearer_token_path - string - optional
## The path to a Kubernetes service account bearer token file. Make sure the file exists and is mounted correctly.
## Note: bearer_token_auth should be set to true to enable adding the token to HTTP headers for authentication.
## @param share_labels - mapping - optional
## This mapping allows for the sharing of labels across multiple metrics. The keys represent the
## exposed metrics from which to share labels, and the values are mappings that configure the
## sharing behavior. Each mapping must have at least one of the following keys:
##
## - labels - This is a list of labels to share. All labels are shared if this is not set.
## - match - This is a list of labels to match on other metrics as a condition for sharing.
## - values - This is a list of allowed values as a condition for sharing.
##
## To unconditionally share all labels of a metric, set it to `true`.
##
## For example, the following configuration instructs the check to apply all labels from `metric_a`
## to all other metrics, the `node` label from `metric_b` to only those metrics that have a `pod`
## label value that matches the `pod` label value of `metric_b`, and all labels from `metric_c`
## to all other metrics if their value is equal to `23` or `42`.
#
# share_labels:
# metric_a: true
# metric_b:
# labels:
# - node
# match:
# - pod
# metric_c:
# values:
# - 23
# - 42

## @param cache_shared_labels - boolean - optional - default: true
## When `share_labels` is set, it instructs the check to cache labels collected from the first payload
## for improved performance.
##
## Set this to `false` to compute label sharing for every payload at the risk of potentially increased memory usage.
#
# bearer_token_path: <TOKEN_PATH>
# cache_shared_labels: true

## @param bearer_token_refresh_interval - integer - optional - default: 60
## The refresh interval to keep the bearer token up-to-date.
## @param raw_line_filters - list of strings - optional
## A list of regular expressions used to exclude lines read from the `openmetrics_endpoint`
## from being parsed.
#
# bearer_token_refresh_interval: 60
# raw_line_filters: []

## @param ignore_metrics - list of strings - optional
## A list of metrics to ignore, the "*" wildcard can be used to match multiple metric names.
## The wildcard matching is done via fnmatch, it locates a match anywhere in the string.
## @param cache_metric_wildcards - boolean - optional - default: true
## Whether or not to cache data from metrics that are defined by regular expressions rather
## than the full metric name.
#
# ignore_metrics:
# - <IGNORED_METRIC_NAME>
# - <SUBSTRING_*>
# - <*_SUBSTRING>
# cache_metric_wildcards: true

## @param ignore_metrics_by_labels - mapping - optional
## A mapping of labels where metrics with matching label key and values are ignored.
## Use the "*" wildcard to match all label values.
## @param telemetry - boolean - optional - default: false
## Whether or not to submit metrics prefixed by `<NAMESPACE>.telemetry.` for debugging purposes.
#
# ignore_metrics_by_labels:
# <KEY_1>:
# - <LABEL_1>
# - <LABEL_2>
# <KEY_2>:
# - '*'
# telemetry: false

## @param ignore_tags - list of strings - optional
## A list of regular expressions used to ignore tags added by autodiscovery and entries in the `tags` option.
## A list of regular expressions used to ignore tags added by Autodiscovery and entries in the `tags` option.
#
# ignore_tags:
# - <FULL:TAG>
Expand Down Expand Up @@ -494,10 +588,10 @@ instances:
#
# read_timeout: <READ_TIMEOUT>

## @param request_size - number - optional - default: 10
## @param request_size - number - optional - default: 16
## The number of kibibytes (KiB) to read from streaming HTTP responses at a time.
#
# request_size: 10
# request_size: 16

## @param log_requests - boolean - optional - default: false
## Whether or not to debug log the HTTP(S) requests made, including the method and URL.
Expand Down
Loading