-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: blackbox exporter scrape relabeling
- Loading branch information
1 parent
1b6c99c
commit d755f02
Showing
2 changed files
with
89 additions
and
1 deletion.
There are no files selected for viewing
87 changes: 87 additions & 0 deletions
87
infrastructure/dev/monitoring/helm-release-blackbox-exporter.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
--- | ||
apiVersion: helm.toolkit.fluxcd.io/v2beta1 | ||
kind: HelmRelease | ||
metadata: | ||
name: blackbox-exporter | ||
namespace: flux-system | ||
spec: | ||
interval: 5m | ||
targetNamespace: monitoring | ||
chart: | ||
spec: | ||
version: 8.x | ||
chart: prometheus-blackbox-exporter | ||
sourceRef: | ||
kind: HelmRepository | ||
name: prometheus-community | ||
interval: 60m | ||
install: | ||
crds: Create | ||
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 | ||
# | ||
# kind: Probe | ||
# apiVersion: monitoring.coreos.com/v1 | ||
# metadata: | ||
# name: probes | ||
# namespace: monitoring | ||
# spec: | ||
# interval: 60s | ||
# module: http_2xx | ||
# prober: | ||
# url: monitoring-blackbox-exporter-prometheus-blackbox-exporter.monitoring.svc.cluster.local:9115 | ||
# targets: | ||
# staticConfig: | ||
# static: | ||
# - https://google.com/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters