Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: blackbox exporter scrape relabeling #179

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
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
2 changes: 1 addition & 1 deletion clusters/dev/flux-system/gotk-sync.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ metadata:
spec:
interval: 1m0s
ref:
branch: main
branch: chore/jr/scrapetimeout
secretRef:
name: flux-system
url: ssh://[email protected]/Informasjonsforvaltning/fdk-infra
Expand Down
43 changes: 43 additions & 0 deletions infrastructure/base/monitoring/helm-release-blackbox-exporter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,54 @@ spec:
upgrade:
crds: CreateReplace
values:
config:
modules:
http_2xx:
prober: http
timeout: 5s
http:
valid_http_versions: ["HTTP/1.1", "HTTP/2.0"]
valid_status_codes:
- 200
- 204
follow_redirects: true
preferred_ip_protocol: "ip4"
scrape_configs:
- job_name: 'kubernetes-ingresses'

metrics_path: /probe
params:
module: [http_2xx]

kubernetes_sd_configs:
- role: ingress

relabel_configs:
- source_labels: [__meta_kubernetes_ingress_annotation_prometheus_io_probe]
action: keep
regex: true
- source_labels: [__address__]
regex: (.+);(.+)
replacement: https://${1}
target_label: __param_target
- source_labels: [__address__]
regex: (catalog-admin\..+)
replacement: https://${1}/api/ping
target_label: __param_target
- source_labels: [__param_target]
target_label: instance
- action: labelmap
regex: __meta_kubernetes_ingress_label_(.+)
- source_labels: [__meta_kubernetes_namespace]
target_label: kubernetes_namespace
- source_labels: [__meta_kubernetes_ingress_name]
target_label: kubernetes_name
serviceMonitor:
enabled: true
targets:
- name: datajegeren
url: https://datafabrikken.norge.no/finn-data/datajegeren

#
# TODO: TEST Probe
#
Expand Down