Fix ERPNext and Forgejo probes
- ERPNext: custom blackbox module with Host: performancewest.net header (ERPNext multitenancy requires site name in Host for routing) - Forgejo: add extra_hosts to blackbox-exporter so it can resolve host.docker.internal to reach forgejo on port 3000 - Blackbox http_erpnext module: sets Host header, expects 200 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
f856434642
commit
b190bcef92
3 changed files with 15 additions and 2 deletions
|
|
@ -386,6 +386,8 @@ services:
|
||||||
image: prom/blackbox-exporter:latest
|
image: prom/blackbox-exporter:latest
|
||||||
volumes:
|
volumes:
|
||||||
- ./monitoring/blackbox.yml:/etc/blackbox_exporter/config.yml:ro
|
- ./monitoring/blackbox.yml:/etc/blackbox_exporter/config.yml:ro
|
||||||
|
extra_hosts:
|
||||||
|
- "host.docker.internal:host-gateway"
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,17 @@ modules:
|
||||||
follow_redirects: false
|
follow_redirects: false
|
||||||
preferred_ip_protocol: ip4
|
preferred_ip_protocol: ip4
|
||||||
|
|
||||||
|
# ERPNext requires Host header matching the site name
|
||||||
|
http_erpnext:
|
||||||
|
prober: http
|
||||||
|
timeout: 10s
|
||||||
|
http:
|
||||||
|
valid_http_versions: ["HTTP/1.1", "HTTP/2.0"]
|
||||||
|
valid_status_codes: [200]
|
||||||
|
headers:
|
||||||
|
Host: performancewest.net
|
||||||
|
preferred_ip_protocol: ip4
|
||||||
|
|
||||||
tcp_connect:
|
tcp_connect:
|
||||||
prober: tcp
|
prober: tcp
|
||||||
timeout: 5s
|
timeout: 5s
|
||||||
|
|
|
||||||
|
|
@ -125,11 +125,11 @@ scrape_configs:
|
||||||
- target_label: __address__
|
- target_label: __address__
|
||||||
replacement: blackbox-exporter:9115
|
replacement: blackbox-exporter:9115
|
||||||
|
|
||||||
# ── ERPNext CRM (login page returns 200) ───────────────────────────
|
# ── ERPNext CRM (requires Host header for site routing) ─────────────
|
||||||
- job_name: pw_erpnext
|
- job_name: pw_erpnext
|
||||||
metrics_path: /probe
|
metrics_path: /probe
|
||||||
params:
|
params:
|
||||||
module: [http_internal]
|
module: [http_erpnext]
|
||||||
static_configs:
|
static_configs:
|
||||||
- targets:
|
- targets:
|
||||||
- http://erpnext:8000/api/method/ping
|
- http://erpnext:8000/api/method/ping
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue