Skip to content

Commit

Permalink
Fix auto-discovery for latest versions on Kubernetes (#9577)
Browse files Browse the repository at this point in the history
* [kube_apiserver_metrics] Update `auto_conf.yaml` to provide a list of possible Prometheus URLs
  • Loading branch information
L3n41c committed Jul 1, 2021
1 parent e3f1d9b commit 0548518
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 4 deletions.
19 changes: 17 additions & 2 deletions kube_apiserver_metrics/assets/configuration/spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,24 @@ files:
options: []
- template: instances
options:
- name: prometheus_url
- name: possible_prometheus_urls
required: true
description: The URL where your application metrics are exposed by Prometheus.
description: |
The URLs to try to get your application metrics that are exposed by Prometheus.
The check will try each URLs in the list and will use the first working one.
One of possible_prometheus_urls or prometheus_url parameter is required.
value:
type: array
items:
type: string
example:
- https://%%host%%:6443/metrics
- https://%%host%%:8443/metrics
- name: prometheus_url
required: false
description: |
The URL where your application metrics are exposed by Prometheus.
One of possible_prometheus_urls or prometheus_url parameter is required.
value:
example: https://%%host%%:6443/metrics
type: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,20 @@ init_config:
#
instances:

## @param prometheus_url - string - required
## @param possible_prometheus_urls - list of strings - required
## The URLs to try to get your application metrics that are exposed by Prometheus.
## The check will try each URLs in the list and will use the first working one.
## One of possible_prometheus_urls or prometheus_url parameter is required.
#
- possible_prometheus_urls:
- https://%%host%%:6443/metrics
- https://%%host%%:8443/metrics

## @param prometheus_url - string - optional - default: https://%%host%%:6443/metrics
## The URL where your application metrics are exposed by Prometheus.
## One of possible_prometheus_urls or prometheus_url parameter is required.
#
- prometheus_url: https://%%host%%:6443/metrics
# prometheus_url: https://%%host%%:6443/metrics

## @param bearer_token_auth - boolean - optional - default: true
## Used if you are using RBACs and need the Agent to authenticate
Expand Down

0 comments on commit 0548518

Please sign in to comment.