From bfe5f7db4fa8c9ca22edd7a302897deb18bdb340 Mon Sep 17 00:00:00 2001 From: khewonc <39867936+khewonc@users.noreply.github.com> Date: Fri, 12 Nov 2021 16:52:46 -0500 Subject: [PATCH] Add kube_metrics_server config spec (#10509) * Add kube_metrics_server config spec * Github comments - docs --- .../assets/configuration/spec.yaml | 22 + .../data/conf.yaml.example | 481 +++++++++++++++++- kube_metrics_server/manifest.json | 7 +- 3 files changed, 498 insertions(+), 12 deletions(-) create mode 100644 kube_metrics_server/assets/configuration/spec.yaml diff --git a/kube_metrics_server/assets/configuration/spec.yaml b/kube_metrics_server/assets/configuration/spec.yaml new file mode 100644 index 0000000000000..f6cdd216fc7d1 --- /dev/null +++ b/kube_metrics_server/assets/configuration/spec.yaml @@ -0,0 +1,22 @@ +name: Kube metrics server +files: +- name: kube_metrics_server.yaml + options: + - template: init_config + options: + - template: init_config/openmetrics_legacy + - template: instances + options: + - template: instances/openmetrics_legacy + overrides: + prometheus_url.value.example: https://localhost:443/metrics + prometheus_url.display_priority: 1 + prometheus_url.description: | + The URL where your application metrics are exposed by Prometheus. + It could be either the address of the metrics server service or + the address of the pod itself. + **Note**: Monitoring an exposed service of the metrics server + that is backed by more than one pod could lead to inaccurate metrics + because of load balancing. In this case, it is recommended to + enable endpoint checks alongside the service check and use Autodiscovery + to get the pod IP by setting `prometheus_url` to https://%%host%%:443/metrics diff --git a/kube_metrics_server/datadog_checks/kube_metrics_server/data/conf.yaml.example b/kube_metrics_server/datadog_checks/kube_metrics_server/data/conf.yaml.example index cb5fd81fefb59..733e79d6be55f 100644 --- a/kube_metrics_server/datadog_checks/kube_metrics_server/data/conf.yaml.example +++ b/kube_metrics_server/datadog_checks/kube_metrics_server/data/conf.yaml.example @@ -1,28 +1,489 @@ +## All options defined here are available to all instances. +# init_config: + ## @param proxy - mapping - optional + ## Set HTTP or HTTPS proxies for all instances. Use the `no_proxy` list + ## to specify hosts that must bypass proxies. + ## + ## The SOCKS protocol is also supported like so: + ## + ## socks5://user:pass@host:port + ## + ## Using the scheme `socks5` causes the DNS resolution to happen on the + ## client, rather than on the proxy server. This is in line with `curl`, + ## which uses the scheme to decide whether to do the DNS resolution on + ## the client or proxy. If you want to resolve the domains on the proxy + ## server, use `socks5h` as the scheme. + # + # proxy: + # http: http://: + # https: https://: + # no_proxy: + # - + # - + + ## @param skip_proxy - boolean - optional - default: false + ## If set to `true`, this makes the check bypass any proxy + ## settings enabled and attempt to reach services directly. + # + # skip_proxy: false + + ## @param timeout - number - optional - default: 10 + ## The timeout for connecting to services. + # + # timeout: 10 + + ## @param service - string - optional + ## Attach the tag `service:` to every metric, event, and service check emitted by this integration. + ## + ## Additionally, this sets the default `service` for every log source. + # + # service: + +## Every instance is scheduled independent of the others. +# instances: ## @param prometheus_url - string - required ## The URL where your application metrics are exposed by Prometheus. ## It could be either the address of the metrics server service or ## the address of the pod itself. - ## Please note that monitoring an exposed service of the metrics server + ## **Note**: Monitoring an exposed service of the metrics server ## that is backed by more than one pod could lead to inaccurate metrics - ## because of to the load balancing. In this case, it is recommended to - ## enable endpoint checks alongside the service check and use autodiscovery - ## to get pod IP by setting up `prometheus_url` to https://%%host%%:443/metrics + ## because of load balancing. In this case, it is recommended to + ## enable endpoint checks alongside the service check and use Autodiscovery + ## to get the pod IP by setting `prometheus_url` to https://%%host%%:443/metrics # - prometheus_url: https://localhost:443/metrics - ## @param tags - list of key:value elements - optional - ## List of tags to attach to every metrics, events and service checks emitted by this integration. - ## Learn more about tagging: https://docs.datadoghq.com/tagging/ + ## @param prometheus_metrics_prefix - string - optional + ## Removes a given from exposed Prometheus metrics. + # + # prometheus_metrics_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 + # + # health_service_check: true + + ## @param label_to_hostname - string - optional + ## Override the hostname with the value of one label. + # + # label_to_hostname: