Skip to content

Commit

Permalink
Bring json- and blackbox-exporter back for metanull's dashbaord (#1465)
Browse files Browse the repository at this point in the history
  • Loading branch information
yorickdowne authored Aug 3, 2023
1 parent 3ffb1bf commit 28daf1e
Show file tree
Hide file tree
Showing 4 changed files with 89 additions and 38 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/test-grafana.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ jobs:
- name: Test cryptowat exporter
run: |
./.github/check-service.sh cryptowat-exporter
- name: Test blackbox exporter
run: |
./.github/check-service.sh blackbox-exporter
- name: Test json exporter
run: |
./.github/check-service.sh json-exporter
- name: Test cadvisor
run: |
./.github/check-service.sh cadvisor
Expand Down
38 changes: 19 additions & 19 deletions grafana-cloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,26 +63,26 @@ services:
- /etc/localtime:/etc/localtime:ro
<<: *logging

# blackbox-exporter:
# restart: "unless-stopped"
# image: prom/blackbox-exporter:master
# volumes:
# - ./prometheus/blackbox.yml:/config/blackbox.yml
# - /etc/localtime:/etc/localtime:ro
# <<: *logging
# command:
# - --config.file=/config/blackbox.yml
blackbox-exporter:
restart: "unless-stopped"
image: prom/blackbox-exporter:master
volumes:
- ./prometheus/blackbox.yml:/config/blackbox.yml
- /etc/localtime:/etc/localtime:ro
<<: *logging
command:
- --config.file=/config/blackbox.yml

# json-exporter:
# restart: "unless-stopped"
# image: prometheuscommunity/json-exporter:latest
# volumes:
# - ./prometheus/json.yml:/config/json.yml
# - /etc/localtime:/etc/localtime:ro
# <<: *logging
# command:
# - --config.file
# - /config/json.yml
json-exporter:
restart: "unless-stopped"
image: prometheuscommunity/json-exporter:latest
volumes:
- ./prometheus/json.yml:/config/json.yml
- /etc/localtime:/etc/localtime:ro
<<: *logging
command:
- --config.file
- /config/json.yml

cryptowat-exporter:
restart: "unless-stopped"
Expand Down
38 changes: 19 additions & 19 deletions grafana.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,26 +53,26 @@ services:
- /etc/localtime:/etc/localtime:ro
<<: *logging

# blackbox-exporter:
# restart: "unless-stopped"
# image: prom/blackbox-exporter:master
# volumes:
# - ./prometheus/blackbox.yml:/config/blackbox.yml
# - /etc/localtime:/etc/localtime:ro
# <<: *logging
# command:
# - --config.file=/config/blackbox.yml
blackbox-exporter:
restart: "unless-stopped"
image: prom/blackbox-exporter:master
volumes:
- ./prometheus/blackbox.yml:/config/blackbox.yml
- /etc/localtime:/etc/localtime:ro
<<: *logging
command:
- --config.file=/config/blackbox.yml

# json-exporter:
# restart: "unless-stopped"
# image: prometheuscommunity/json-exporter:latest
# volumes:
# - ./prometheus/json.yml:/config/json.yml
# - /etc/localtime:/etc/localtime:ro
# <<: *logging
# command:
# - --config.file
# - /config/json.yml
json-exporter:
restart: "unless-stopped"
image: prometheuscommunity/json-exporter:latest
volumes:
- ./prometheus/json.yml:/config/json.yml
- /etc/localtime:/etc/localtime:ro
<<: *logging
command:
- --config.file
- /config/json.yml

cryptowat-exporter:
restart: "unless-stopped"
Expand Down
45 changes: 45 additions & 0 deletions prometheus/global.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,48 @@ scrape_configs:
scrape_interval: 300s
static_configs:
- targets: ['cryptowat-exporter:9745']
- job_name: 'ping_google'
metrics_path: /probe
params:
module: [icmp]
static_configs:
- targets:
- 8.8.8.8
relabel_configs:
- source_labels: [__address__]
target_label: __param_target
- source_labels: [__param_target]
target_label: instance
- target_label: __address__
replacement: blackbox-exporter:9115
- job_name: 'ping_cloudflare'
metrics_path: /probe
params:
module: [icmp]
static_configs:
- targets:
- 1.1.1.1
relabel_configs:
- source_labels: [__address__]
target_label: __param_target
- source_labels: [__param_target]
target_label: instance
- target_label: __address__
replacement: blackbox-exporter:9115
- job_name: 'json_exporter'
static_configs:
- targets: ['json-exporter:7979']
- job_name: 'json'
metrics_path: /probe
params:
module: [default]
static_configs:
- targets:
- https://api.coingecko.com/api/v3/simple/price?ids=ethereum&vs_currencies=usd
relabel_configs:
- source_labels: [__address__]
target_label: __param_target
- source_labels: [__param_target]
target_label: instance
- target_label: __address__
replacement: json-exporter:7979

0 comments on commit 28daf1e

Please sign in to comment.