mirror of
https://github.com/prometheus/prometheus.git
synced 2024-12-24 05:04:05 -08:00
fixes yamllint errors
Signed-off-by: Michal Wasilewski <mwasilewski@gmx.com>
This commit is contained in:
parent
46153083db
commit
3f686cad8b
|
@ -69,8 +69,7 @@ jobs:
|
|||
command: |
|
||||
choco upgrade -y golang
|
||||
- run:
|
||||
command:
|
||||
refreshenv
|
||||
command: refreshenv
|
||||
- run:
|
||||
command: |
|
||||
$env:GOARCH=""; $env:GOOS=""; cd web/ui; go generate
|
||||
|
|
4
.github/workflows/codeql-analysis.yml
vendored
4
.github/workflows/codeql-analysis.yml
vendored
|
@ -18,7 +18,7 @@ on:
|
|||
# The branches below must be a subset of the branches above
|
||||
branches: [main]
|
||||
schedule:
|
||||
- cron: '26 14 * * 1'
|
||||
- cron: "26 14 * * 1"
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
|
@ -28,7 +28,7 @@ jobs:
|
|||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
language: [ 'go', 'javascript' ]
|
||||
language: ["go", "javascript"]
|
||||
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
|
||||
# Learn more:
|
||||
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
|
||||
|
|
4
.github/workflows/funcbench.yml
vendored
4
.github/workflows/funcbench.yml
vendored
|
@ -32,13 +32,13 @@ jobs:
|
|||
- name: Prepare nodepool
|
||||
uses: docker://prominfra/funcbench:master
|
||||
with:
|
||||
entrypoint: 'docker_entrypoint'
|
||||
entrypoint: "docker_entrypoint"
|
||||
args: make deploy
|
||||
- name: Delete all resources
|
||||
if: always()
|
||||
uses: docker://prominfra/funcbench:master
|
||||
with:
|
||||
entrypoint: 'docker_entrypoint'
|
||||
entrypoint: "docker_entrypoint"
|
||||
args: make clean
|
||||
- name: Update status to failure
|
||||
if: failure()
|
||||
|
|
10
.github/workflows/fuzzing.yml
vendored
10
.github/workflows/fuzzing.yml
vendored
|
@ -2,9 +2,9 @@ name: CIFuzz
|
|||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- 'go.sum'
|
||||
- 'go.mod'
|
||||
- '**.go'
|
||||
- "go.sum"
|
||||
- "go.mod"
|
||||
- "**.go"
|
||||
jobs:
|
||||
Fuzzing:
|
||||
runs-on: ubuntu-latest
|
||||
|
@ -13,12 +13,12 @@ jobs:
|
|||
id: build
|
||||
uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master
|
||||
with:
|
||||
oss-fuzz-project-name: 'prometheus'
|
||||
oss-fuzz-project-name: "prometheus"
|
||||
dry-run: false
|
||||
- name: Run Fuzzers
|
||||
uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master
|
||||
with:
|
||||
oss-fuzz-project-name: 'prometheus'
|
||||
oss-fuzz-project-name: "prometheus"
|
||||
fuzz-seconds: 600
|
||||
dry-run: false
|
||||
- name: Upload Crash
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
---
|
||||
tasks:
|
||||
- init:
|
||||
make build
|
||||
|
|
10
cmd/promtool/testdata/unittest.yml
vendored
10
cmd/promtool/testdata/unittest.yml
vendored
|
@ -8,13 +8,13 @@ tests:
|
|||
- interval: 1m
|
||||
input_series:
|
||||
- series: test_full
|
||||
values: '0 0'
|
||||
values: "0 0"
|
||||
|
||||
- series: test_stale
|
||||
values: '0 stale'
|
||||
values: "0 stale"
|
||||
|
||||
- series: test_missing
|
||||
values: '0 _ _ _ _ _ _ 0'
|
||||
values: "0 _ _ _ _ _ _ 0"
|
||||
|
||||
promql_expr_test:
|
||||
# Ensure the sample is evaluated at the time we expect it to be.
|
||||
|
@ -36,7 +36,7 @@ tests:
|
|||
eval_time: 59s
|
||||
exp_samples:
|
||||
- value: 0
|
||||
labels: 'test_stale'
|
||||
labels: "test_stale"
|
||||
- expr: test_stale
|
||||
eval_time: 1m
|
||||
exp_samples: []
|
||||
|
@ -120,7 +120,7 @@ tests:
|
|||
- series: 'test{job="test", instance="x:0"}'
|
||||
# 2 minutes + 1 second of input data, recording rules should only run
|
||||
# once a minute.
|
||||
values: '0+1x120'
|
||||
values: "0+1x120"
|
||||
|
||||
promql_expr_test:
|
||||
- expr: job:test:count_over_time1m
|
||||
|
|
1
config/testdata/bearertoken.bad.yml
vendored
1
config/testdata/bearertoken.bad.yml
vendored
|
@ -3,4 +3,3 @@ scrape_configs:
|
|||
|
||||
bearer_token: 1234
|
||||
bearer_token_file: somefile
|
||||
|
||||
|
|
|
@ -5,4 +5,3 @@ scrape_configs:
|
|||
basic_auth:
|
||||
username: user
|
||||
password: password
|
||||
|
||||
|
|
32
config/testdata/conf.good.yml
vendored
32
config/testdata/conf.good.yml
vendored
|
@ -65,7 +65,7 @@ scrape_configs:
|
|||
- bar/*.yaml
|
||||
|
||||
static_configs:
|
||||
- targets: ['localhost:9090', 'localhost:9191']
|
||||
- targets: ["localhost:9090", "localhost:9191"]
|
||||
labels:
|
||||
my: label
|
||||
your: label
|
||||
|
@ -87,7 +87,6 @@ scrape_configs:
|
|||
authorization:
|
||||
credentials_file: valid_token_file
|
||||
|
||||
|
||||
- job_name: service-x
|
||||
|
||||
basic_auth:
|
||||
|
@ -138,9 +137,9 @@ scrape_configs:
|
|||
- job_name: service-y
|
||||
|
||||
consul_sd_configs:
|
||||
- server: 'localhost:1234'
|
||||
- server: "localhost:1234"
|
||||
token: mysecret
|
||||
services: ['nginx', 'cache', 'mysql']
|
||||
services: ["nginx", "cache", "mysql"]
|
||||
tags: ["canary", "v1"]
|
||||
node_meta:
|
||||
rack: "123"
|
||||
|
@ -154,7 +153,7 @@ scrape_configs:
|
|||
|
||||
relabel_configs:
|
||||
- source_labels: [__meta_sd_consul_tags]
|
||||
separator: ','
|
||||
separator: ","
|
||||
regex: label:([^=]+)=([^,]+)
|
||||
target_label: ${1}
|
||||
replacement: ${2}
|
||||
|
@ -172,33 +171,32 @@ scrape_configs:
|
|||
|
||||
kubernetes_sd_configs:
|
||||
- role: endpoints
|
||||
api_server: 'https://localhost:1234'
|
||||
api_server: "https://localhost:1234"
|
||||
tls_config:
|
||||
cert_file: valid_cert_file
|
||||
key_file: valid_key_file
|
||||
|
||||
basic_auth:
|
||||
username: 'myusername'
|
||||
password: 'mysecret'
|
||||
username: "myusername"
|
||||
password: "mysecret"
|
||||
|
||||
- job_name: service-kubernetes-namespaces
|
||||
|
||||
kubernetes_sd_configs:
|
||||
- role: endpoints
|
||||
api_server: 'https://localhost:1234'
|
||||
api_server: "https://localhost:1234"
|
||||
namespaces:
|
||||
names:
|
||||
- default
|
||||
|
||||
basic_auth:
|
||||
username: 'myusername'
|
||||
username: "myusername"
|
||||
password_file: valid_password_file
|
||||
|
||||
|
||||
- job_name: service-marathon
|
||||
marathon_sd_configs:
|
||||
- servers:
|
||||
- 'https://marathon.example.com:443'
|
||||
- "https://marathon.example.com:443"
|
||||
|
||||
auth_token: "mysecret"
|
||||
tls_config:
|
||||
|
@ -266,13 +264,13 @@ scrape_configs:
|
|||
|
||||
- job_name: httpsd
|
||||
http_sd_configs:
|
||||
- url: 'http://example.com/prometheus'
|
||||
- url: "http://example.com/prometheus"
|
||||
|
||||
- job_name: service-triton
|
||||
triton_sd_configs:
|
||||
- account: 'testAccount'
|
||||
dns_suffix: 'triton.example.com'
|
||||
endpoint: 'triton.example.com'
|
||||
- account: "testAccount"
|
||||
dns_suffix: "triton.example.com"
|
||||
endpoint: "triton.example.com"
|
||||
port: 9163
|
||||
refresh_interval: 1m
|
||||
version: 1
|
||||
|
@ -317,7 +315,7 @@ scrape_configs:
|
|||
|
||||
- job_name: service-eureka
|
||||
eureka_sd_configs:
|
||||
- server: 'http://eureka.example.com:8761/eureka'
|
||||
- server: "http://eureka.example.com:8761/eureka"
|
||||
|
||||
- job_name: scaleway
|
||||
scaleway_sd_configs:
|
||||
|
|
|
@ -2,8 +2,7 @@ scrape_configs:
|
|||
- job_name: prometheus
|
||||
|
||||
ec2_sd_configs:
|
||||
- region: 'us-east-1'
|
||||
- region: "us-east-1"
|
||||
filters:
|
||||
- name: 'tag:environment'
|
||||
- name: "tag:environment"
|
||||
values:
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
scrape_configs:
|
||||
|
||||
- job_name: eureka
|
||||
eureka_sd_configs:
|
||||
- server: eureka.com
|
||||
|
|
1
config/testdata/eureka_no_server.bad.yml
vendored
1
config/testdata/eureka_no_server.bad.yml
vendored
|
@ -1,5 +1,4 @@
|
|||
scrape_configs:
|
||||
|
||||
- job_name: eureka
|
||||
eureka_sd_configs:
|
||||
- server:
|
||||
|
|
1
config/testdata/hetzner_role.bad.yml
vendored
1
config/testdata/hetzner_role.bad.yml
vendored
|
@ -1,4 +1,3 @@
|
|||
scrape_configs:
|
||||
- hetzner_sd_configs:
|
||||
- role: invalid
|
||||
|
||||
|
|
|
@ -3,11 +3,10 @@ scrape_configs:
|
|||
|
||||
kubernetes_sd_configs:
|
||||
- role: pod
|
||||
api_server: 'https://localhost:1234'
|
||||
api_server: "https://localhost:1234"
|
||||
|
||||
authorization:
|
||||
credentials: 1234
|
||||
basic_auth:
|
||||
username: user
|
||||
password: password
|
||||
|
||||
|
|
|
@ -3,8 +3,7 @@ scrape_configs:
|
|||
|
||||
kubernetes_sd_configs:
|
||||
- role: node
|
||||
api_server: 'https://localhost:1234'
|
||||
api_server: "https://localhost:1234"
|
||||
|
||||
bearer_token: 1234
|
||||
bearer_token_file: somefile
|
||||
|
||||
|
|
|
@ -3,10 +3,9 @@ scrape_configs:
|
|||
|
||||
kubernetes_sd_configs:
|
||||
- role: pod
|
||||
api_server: 'https://localhost:1234'
|
||||
api_server: "https://localhost:1234"
|
||||
|
||||
bearer_token: 1234
|
||||
basic_auth:
|
||||
username: user
|
||||
password: password
|
||||
|
||||
|
|
1
config/testdata/kubernetes_role.bad.yml
vendored
1
config/testdata/kubernetes_role.bad.yml
vendored
|
@ -2,4 +2,3 @@ scrape_configs:
|
|||
- kubernetes_sd_configs:
|
||||
- api_server: kubernetes:443
|
||||
role: vacation
|
||||
|
||||
|
|
2
config/testdata/labeldrop3.bad.yml
vendored
2
config/testdata/labeldrop3.bad.yml
vendored
|
@ -1,5 +1,5 @@
|
|||
scrape_configs:
|
||||
- job_name: prometheus
|
||||
relabel_configs:
|
||||
- separator: ','
|
||||
- separator: ","
|
||||
action: labeldrop
|
||||
|
|
2
config/testdata/labelkeep3.bad.yml
vendored
2
config/testdata/labelkeep3.bad.yml
vendored
|
@ -1,5 +1,5 @@
|
|||
scrape_configs:
|
||||
- job_name: prometheus
|
||||
relabel_configs:
|
||||
- separator: ','
|
||||
- separator: ","
|
||||
action: labelkeep
|
||||
|
|
|
@ -3,7 +3,7 @@ scrape_configs:
|
|||
|
||||
marathon_sd_configs:
|
||||
- servers:
|
||||
- 'https://localhost:1234'
|
||||
- "https://localhost:1234"
|
||||
|
||||
auth_token: 1234
|
||||
authorization:
|
||||
|
|
|
@ -3,7 +3,7 @@ scrape_configs:
|
|||
|
||||
marathon_sd_configs:
|
||||
- servers:
|
||||
- 'https://localhost:1234'
|
||||
- "https://localhost:1234"
|
||||
|
||||
auth_token: 1234
|
||||
auth_token_file: somefile
|
||||
|
|
|
@ -3,7 +3,7 @@ scrape_configs:
|
|||
|
||||
marathon_sd_configs:
|
||||
- servers:
|
||||
- 'https://localhost:1234'
|
||||
- "https://localhost:1234"
|
||||
|
||||
auth_token: 1234
|
||||
basic_auth:
|
||||
|
|
|
@ -3,7 +3,7 @@ scrape_configs:
|
|||
|
||||
marathon_sd_configs:
|
||||
- servers:
|
||||
- 'https://localhost:1234'
|
||||
- "https://localhost:1234"
|
||||
|
||||
auth_token: 1234
|
||||
bearer_token: 4567
|
||||
|
|
1
config/testdata/marathon_no_servers.bad.yml
vendored
1
config/testdata/marathon_no_servers.bad.yml
vendored
|
@ -4,7 +4,6 @@ global:
|
|||
evaluation_interval: 30s
|
||||
|
||||
scrape_configs:
|
||||
|
||||
- job_name: service-marathon
|
||||
marathon_sd_configs:
|
||||
- servers:
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
scrape_configs:
|
||||
- openstack_sd_configs:
|
||||
- availability: invalid
|
||||
|
||||
|
|
1
config/testdata/openstack_role.bad.yml
vendored
1
config/testdata/openstack_role.bad.yml
vendored
|
@ -1,4 +1,3 @@
|
|||
scrape_configs:
|
||||
- openstack_sd_configs:
|
||||
- role: invalid
|
||||
|
||||
|
|
1
config/testdata/remote_write_dup.bad.yml
vendored
1
config/testdata/remote_write_dup.bad.yml
vendored
|
@ -3,4 +3,3 @@ remote_write:
|
|||
name: queue1
|
||||
- url: localhost:9091
|
||||
name: queue1
|
||||
|
||||
|
|
1
config/testdata/roundtrip.good.yml
vendored
1
config/testdata/roundtrip.good.yml
vendored
|
@ -17,7 +17,6 @@ alerting:
|
|||
- 1.2.3.6:9093
|
||||
|
||||
scrape_configs:
|
||||
|
||||
- job_name: foo
|
||||
static_configs:
|
||||
- targets:
|
||||
|
|
1
config/testdata/scaleway_role.bad.yml
vendored
1
config/testdata/scaleway_role.bad.yml
vendored
|
@ -4,4 +4,3 @@ scrape_configs:
|
|||
project_id: 11111111-1111-1111-1111-111111111112
|
||||
access_key: SCWXXXXXXXXXXXXXXXXX
|
||||
secret_key_file: bar
|
||||
|
||||
|
|
1
config/testdata/scaleway_two_secrets.bad.yml
vendored
1
config/testdata/scaleway_two_secrets.bad.yml
vendored
|
@ -5,4 +5,3 @@ scrape_configs:
|
|||
access_key: SCWXXXXXXXXXXXXXXXXX
|
||||
secret_key_file: bar
|
||||
secret_key: 11111111-1111-1111-1111-111111111112
|
||||
|
||||
|
|
2
config/testdata/unknown_attr.bad.yml
vendored
2
config/testdata/unknown_attr.bad.yml
vendored
|
@ -17,4 +17,4 @@ scrape_configs:
|
|||
- job_name: prometheus
|
||||
|
||||
consult_sd_configs:
|
||||
- server: 'localhost:1234'
|
||||
- server: "localhost:1234"
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
# the YAML structure is identical to valid.yml but the raw data is different.
|
||||
- targets: ['localhost:9090', 'example.org:443']
|
||||
- targets: ["localhost:9090", "example.org:443"]
|
||||
labels:
|
||||
foo: bar
|
||||
|
||||
- targets: ['my.domain']
|
||||
|
||||
- targets: ["my.domain"]
|
||||
|
|
|
@ -2,14 +2,13 @@
|
|||
# DigitalOcean.
|
||||
|
||||
scrape_configs:
|
||||
|
||||
# Make Prometheus scrape itself for metrics.
|
||||
- job_name: 'prometheus'
|
||||
- job_name: "prometheus"
|
||||
static_configs:
|
||||
- targets: ['localhost:9090']
|
||||
- targets: ["localhost:9090"]
|
||||
|
||||
# Discover Node Exporter instances to scrape.
|
||||
- job_name: 'node'
|
||||
- job_name: "node"
|
||||
|
||||
digitalocean_sd_configs:
|
||||
- authorization:
|
||||
|
@ -17,10 +16,10 @@ scrape_configs:
|
|||
relabel_configs:
|
||||
# Only scrape targets that have a tag 'monitoring'.
|
||||
- source_labels: [__meta_digitalocean_tags]
|
||||
regex: '.*,monitoring,.*'
|
||||
regex: ".*,monitoring,.*"
|
||||
action: keep
|
||||
|
||||
# Use the public IPv6 address and port 9100 to scrape the target.
|
||||
- source_labels: [__meta_digitalocean_public_ipv6]
|
||||
target_label: __address__
|
||||
replacement: '[$1]:9100'
|
||||
replacement: "[$1]:9100"
|
||||
|
|
|
@ -1,20 +1,19 @@
|
|||
# A example scrape configuration for running Prometheus with Docker.
|
||||
|
||||
scrape_configs:
|
||||
|
||||
# Make Prometheus scrape itself for metrics.
|
||||
- job_name: 'prometheus'
|
||||
- job_name: "prometheus"
|
||||
static_configs:
|
||||
- targets: ['localhost:9090']
|
||||
- targets: ["localhost:9090"]
|
||||
|
||||
# Create a job for Docker daemon.
|
||||
#
|
||||
# This example requires Docker daemon to be configured to expose
|
||||
# Prometheus metrics, as documented here:
|
||||
# https://docs.docker.com/config/daemon/prometheus/
|
||||
- job_name: 'docker'
|
||||
- job_name: "docker"
|
||||
static_configs:
|
||||
- targets: ['localhost:9323']
|
||||
- targets: ["localhost:9323"]
|
||||
|
||||
# Create a job for Docker Swarm containers.
|
||||
#
|
||||
|
@ -26,7 +25,7 @@ scrape_configs:
|
|||
# --mount type=bind,src=/sys,dst=/sys,ro
|
||||
# --mount type=bind,src=/var/lib/docker,dst=/var/lib/docker,ro
|
||||
# google/cadvisor -docker_only
|
||||
- job_name: 'docker-containers'
|
||||
- job_name: "docker-containers"
|
||||
docker_sd_configs:
|
||||
- host: unix:///var/run/docker.sock # You can also use http/https to connect to the Docker daemon.
|
||||
relabel_configs:
|
||||
|
|
|
@ -2,18 +2,17 @@
|
|||
# Docker Swarm.
|
||||
|
||||
scrape_configs:
|
||||
|
||||
# Make Prometheus scrape itself for metrics.
|
||||
- job_name: 'prometheus'
|
||||
- job_name: "prometheus"
|
||||
static_configs:
|
||||
- targets: ['localhost:9090']
|
||||
- targets: ["localhost:9090"]
|
||||
|
||||
# Create a job for Docker daemons.
|
||||
#
|
||||
# This example requires Docker daemons to be configured to expose
|
||||
# Prometheus metrics, as documented here:
|
||||
# https://docs.docker.com/config/daemon/prometheus/
|
||||
- job_name: 'docker'
|
||||
- job_name: "docker"
|
||||
dockerswarm_sd_configs:
|
||||
- host: unix:///var/run/docker.sock # You can also use http/https to connect to the Docker daemon.
|
||||
role: nodes
|
||||
|
@ -34,7 +33,7 @@ scrape_configs:
|
|||
# --mount type=bind,src=/sys,dst=/sys,ro
|
||||
# --mount type=bind,src=/var/lib/docker,dst=/var/lib/docker,ro
|
||||
# google/cadvisor -docker_only
|
||||
- job_name: 'dockerswarm'
|
||||
- job_name: "dockerswarm"
|
||||
dockerswarm_sd_configs:
|
||||
- host: unix:///var/run/docker.sock # You can also use http/https to connect to the Docker daemon.
|
||||
role: tasks
|
||||
|
@ -51,4 +50,3 @@ scrape_configs:
|
|||
- regex: __meta_dockerswarm_service_label_prometheus_(.+)
|
||||
action: labelmap
|
||||
replacement: $1
|
||||
|
||||
|
|
|
@ -2,14 +2,13 @@
|
|||
# Hetzner.
|
||||
|
||||
scrape_configs:
|
||||
|
||||
# Make Prometheus scrape itself for metrics.
|
||||
- job_name: 'prometheus'
|
||||
- job_name: "prometheus"
|
||||
static_configs:
|
||||
- targets: ['localhost:9090']
|
||||
- targets: ["localhost:9090"]
|
||||
|
||||
# Discover Node Exporter instances to scrape.
|
||||
- job_name: 'node'
|
||||
- job_name: "node"
|
||||
|
||||
hetzner_sd_configs:
|
||||
- authorization:
|
||||
|
@ -19,10 +18,10 @@ scrape_configs:
|
|||
# Use the public IPv4 and port 9100 to scrape the target.
|
||||
- source_labels: [__meta_hetzner_public_ipv4]
|
||||
target_label: __address__
|
||||
replacement: '$1:9100'
|
||||
replacement: "$1:9100"
|
||||
|
||||
# Discover Node Exporter instances to scrape using a Hetzner Cloud Network called mynet.
|
||||
- job_name: 'node_private'
|
||||
- job_name: "node_private"
|
||||
|
||||
hetzner_sd_configs:
|
||||
- authorization:
|
||||
|
@ -32,10 +31,10 @@ scrape_configs:
|
|||
# Use the private IPv4 within the Hetzner Cloud Network and port 9100 to scrape the target.
|
||||
- source_labels: [__meta_hetzner_hcloud_private_ipv4_mynet]
|
||||
target_label: __address__
|
||||
replacement: '$1:9100'
|
||||
replacement: "$1:9100"
|
||||
|
||||
# Discover Node Exporter instances to scrape.
|
||||
- job_name: 'node_robot'
|
||||
- job_name: "node_robot"
|
||||
|
||||
hetzner_sd_configs:
|
||||
- basic_auth:
|
||||
|
@ -46,4 +45,4 @@ scrape_configs:
|
|||
# Use the public IPv4 and port 9100 to scrape the target.
|
||||
- source_labels: [__meta_hetzner_public_ipv4]
|
||||
target_label: __address__
|
||||
replacement: '$1:9100'
|
||||
replacement: "$1:9100"
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
# default named port `https`. This works for single API server deployments as
|
||||
# well as HA API server deployments.
|
||||
scrape_configs:
|
||||
- job_name: 'kubernetes-apiservers'
|
||||
- job_name: "kubernetes-apiservers"
|
||||
|
||||
kubernetes_sd_configs:
|
||||
- role: endpoints
|
||||
|
@ -47,7 +47,12 @@ scrape_configs:
|
|||
# will add targets for each API server which Kubernetes adds an endpoint to
|
||||
# the default/kubernetes service.
|
||||
relabel_configs:
|
||||
- source_labels: [__meta_kubernetes_namespace, __meta_kubernetes_service_name, __meta_kubernetes_endpoint_port_name]
|
||||
- source_labels:
|
||||
[
|
||||
__meta_kubernetes_namespace,
|
||||
__meta_kubernetes_service_name,
|
||||
__meta_kubernetes_endpoint_port_name,
|
||||
]
|
||||
action: keep
|
||||
regex: default;kubernetes;https
|
||||
|
||||
|
@ -57,7 +62,7 @@ scrape_configs:
|
|||
# Kubernetes apiserver. This means it will work if Prometheus is running out of
|
||||
# cluster, or can't connect to nodes for some other reason (e.g. because of
|
||||
# firewalling).
|
||||
- job_name: 'kubernetes-nodes'
|
||||
- job_name: "kubernetes-nodes"
|
||||
|
||||
# Default to scraping over https. If required, just disable this or change to
|
||||
# `http`.
|
||||
|
@ -102,7 +107,7 @@ scrape_configs:
|
|||
#
|
||||
# This job is not necessary and should be removed in Kubernetes 1.6 and
|
||||
# earlier versions, or it will cause the metrics to be scraped twice.
|
||||
- job_name: 'kubernetes-cadvisor'
|
||||
- job_name: "kubernetes-cadvisor"
|
||||
|
||||
# Default to scraping over https. If required, just disable this or change to
|
||||
# `http`.
|
||||
|
@ -143,7 +148,7 @@ scrape_configs:
|
|||
#
|
||||
# The relabeling allows the actual service scrape endpoint to be configured
|
||||
# for all or only some endpoints.
|
||||
- job_name: 'kubernetes-service-endpoints'
|
||||
- job_name: "kubernetes-service-endpoints"
|
||||
|
||||
kubernetes_sd_configs:
|
||||
- role: endpoints
|
||||
|
@ -189,7 +194,7 @@ scrape_configs:
|
|||
#
|
||||
# The relabeling allows the actual service scrape endpoint to be configured
|
||||
# for all or only some services.
|
||||
- job_name: 'kubernetes-services'
|
||||
- job_name: "kubernetes-services"
|
||||
|
||||
metrics_path: /probe
|
||||
params:
|
||||
|
@ -220,7 +225,7 @@ scrape_configs:
|
|||
#
|
||||
# The relabeling allows the actual ingress scrape endpoint to be configured
|
||||
# for all or only some services.
|
||||
- job_name: 'kubernetes-ingresses'
|
||||
- job_name: "kubernetes-ingresses"
|
||||
|
||||
metrics_path: /probe
|
||||
params:
|
||||
|
@ -234,7 +239,12 @@ scrape_configs:
|
|||
# - source_labels: [__meta_kubernetes_ingress_annotation_example_io_should_be_probed]
|
||||
# action: keep
|
||||
# regex: true
|
||||
- source_labels: [__meta_kubernetes_ingress_scheme,__address__,__meta_kubernetes_ingress_path]
|
||||
- source_labels:
|
||||
[
|
||||
__meta_kubernetes_ingress_scheme,
|
||||
__address__,
|
||||
__meta_kubernetes_ingress_path,
|
||||
]
|
||||
regex: (.+);(.+);(.+)
|
||||
replacement: ${1}://${2}${3}
|
||||
target_label: __param_target
|
||||
|
@ -254,7 +264,7 @@ scrape_configs:
|
|||
# The relabeling allows the actual pod scrape to be configured
|
||||
# for all the declared ports (or port-free target if none is declared)
|
||||
# or only some ports.
|
||||
- job_name: 'kubernetes-pods'
|
||||
- job_name: "kubernetes-pods"
|
||||
|
||||
kubernetes_sd_configs:
|
||||
- role: pod
|
||||
|
|
|
@ -3,22 +3,22 @@
|
|||
|
||||
scrape_configs:
|
||||
# Make Prometheus scrape itself for metrics.
|
||||
- job_name: 'prometheus'
|
||||
- job_name: "prometheus"
|
||||
static_configs:
|
||||
- targets: ['localhost:9090']
|
||||
- targets: ["localhost:9090"]
|
||||
|
||||
# Discover Node Exporter instances to scrape.
|
||||
- job_name: 'node'
|
||||
- job_name: "node"
|
||||
linode_sd_configs:
|
||||
- authorization:
|
||||
credentials: "<replace with a Personal Access Token with linodes:read_only + ips:read_only access>"
|
||||
relabel_configs:
|
||||
# Only scrape targets that have a tag 'monitoring'.
|
||||
- source_labels: [__meta_linode_tags]
|
||||
regex: '.*,monitoring,.*'
|
||||
regex: ".*,monitoring,.*"
|
||||
action: keep
|
||||
|
||||
# Use the public IPv6 address and port 9100 to scrape the target.
|
||||
- source_labels: [__meta_linode_public_ipv6]
|
||||
target_label: __address__
|
||||
replacement: '[$1]:9100'
|
||||
replacement: "[$1]:9100"
|
||||
|
|
|
@ -2,14 +2,13 @@
|
|||
# (or DC/OS) cluster.
|
||||
|
||||
scrape_configs:
|
||||
|
||||
# Make Prometheus scrape itself for metrics.
|
||||
- job_name: 'prometheus'
|
||||
- job_name: "prometheus"
|
||||
static_configs:
|
||||
- targets: ['localhost:9090']
|
||||
- targets: ["localhost:9090"]
|
||||
|
||||
# Discover Marathon services to scrape.
|
||||
- job_name: 'marathon'
|
||||
- job_name: "marathon"
|
||||
|
||||
# Scrape Marathon itself to discover new services every minute.
|
||||
marathon_sd_configs:
|
||||
|
@ -18,7 +17,6 @@ scrape_configs:
|
|||
refresh_interval: 60s
|
||||
|
||||
relabel_configs:
|
||||
|
||||
# Only scrape targets that have a port label called 'metrics' specified on a port
|
||||
# in their app definitions. Example using a port mapping (container or bridge networking):
|
||||
#
|
||||
|
@ -45,7 +43,11 @@ scrape_configs:
|
|||
# ]
|
||||
|
||||
# Match a slash-prefixed string either in a portMapping or a portDefinition label.
|
||||
- source_labels: [__meta_marathon_port_mapping_label_metrics,__meta_marathon_port_definition_label_metrics]
|
||||
- source_labels:
|
||||
[
|
||||
__meta_marathon_port_mapping_label_metrics,
|
||||
__meta_marathon_port_definition_label_metrics,
|
||||
]
|
||||
regex: (\/.+;|;\/.+)
|
||||
action: keep
|
||||
|
||||
|
|
|
@ -20,10 +20,10 @@ rule_files:
|
|||
# Here it's Prometheus itself.
|
||||
scrape_configs:
|
||||
# The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
|
||||
- job_name: 'prometheus'
|
||||
- job_name: "prometheus"
|
||||
|
||||
# metrics_path defaults to '/metrics'
|
||||
# scheme defaults to 'http'.
|
||||
|
||||
static_configs:
|
||||
- targets: ['localhost:9090']
|
||||
- targets: ["localhost:9090"]
|
||||
|
|
1
pkg/rulefmt/testdata/bad_field.bad.yaml
vendored
1
pkg/rulefmt/testdata/bad_field.bad.yaml
vendored
|
@ -7,4 +7,3 @@ groups:
|
|||
instance: localhost
|
||||
annotation:
|
||||
summary: annonations is written without s above
|
||||
|
||||
|
|
Loading…
Reference in a new issue