diff --git a/datadog_csi_driver/assets/configuration/spec.yaml b/datadog_csi_driver/assets/configuration/spec.yaml index 44884f00a6529..e11fa4d8a6d4b 100644 --- a/datadog_csi_driver/assets/configuration/spec.yaml +++ b/datadog_csi_driver/assets/configuration/spec.yaml @@ -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 diff --git a/datadog_csi_driver/changelog.d/21930.fixed b/datadog_csi_driver/changelog.d/21930.fixed new file mode 100644 index 0000000000000..41bbc5a7d810b --- /dev/null +++ b/datadog_csi_driver/changelog.d/21930.fixed @@ -0,0 +1,2 @@ +Update auto_conf.yaml to use openmetrics_endpoint instead of deprecated prometheus_url parameter. + diff --git a/datadog_csi_driver/datadog_checks/datadog_csi_driver/data/auto_conf.yaml b/datadog_csi_driver/datadog_checks/datadog_csi_driver/data/auto_conf.yaml index a67437b73f260..d85446ab263bc 100644 --- a/datadog_csi_driver/datadog_checks/datadog_csi_driver/data/auto_conf.yaml +++ b/datadog_csi_driver/datadog_checks/datadog_csi_driver/data/auto_conf.yaml @@ -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 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: _ + # raw_metric_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 .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: + ## - + ## - + ## ``` + ## 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: + ## - : + ## - : + ## ``` + ## 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: + ## - : + ## name: + ## type: + ## - : + ## name: + ## type: + ## ``` + ## 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: + # - + # - : + # - : + # name: + # type: + + ## @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: