Skip to content

Commit

Permalink
chore: Add scrape.yaml for blackbox HTTP monitoring
Browse files Browse the repository at this point in the history
  • Loading branch information
incubator4 committed Aug 1, 2024
1 parent 75091ea commit 3b46f58
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
/target
.idea
.vscode
3 changes: 2 additions & 1 deletion deploy/prod/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ kind: Kustomization
resources:
- deploy.yaml
- svc.yaml
- scrape.yaml
configMapGenerator:
- name: blackbox-http-discovery
files:
- config.yaml
- config.yaml
29 changes: 29 additions & 0 deletions deploy/prod/scrape.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
apiVersion: monitoring.coreos.com/v1alpha1
kind: ScrapeConfig
metadata:
name: blackbox-http-sd
spec:
jobName: blackbox
scrapeInterval: 15s
scrapeTimeout: 15s
httpSDConfigs:
- url: http://blackbox-http-discovery
refreshInterval: 15s
metricsPath: /blackbox_exporter
relabelings:
- sourceLabels: [__address__]
targetLabel: __param_target
- sourceLabels: [__param_target]
targetLabel: instance
- targetLabel: __address__
replacement: blackbox_exporter:9115
- sourceLabels: [__endpoint__url]
targetLabel: __address__
- sourceLabels: [__endpoint__name]
targetLabel: job
- sourceLabels: [__endpoint__geohash]
targetLabel: geohash
- sourceLabels: [__endpoint__latitude]
targetLabel: latitude
- sourceLabels: [__endpoint__longitude]
targetLabel: longitude

0 comments on commit 3b46f58

Please sign in to comment.