docs(prometheus-exporter): add README and sample compose setup

This commit is contained in:
2025-09-19 16:06:18 +02:00
parent 431b73ee2d
commit ac04fa2942
5 changed files with 94 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 122 KiB

View File

@@ -0,0 +1,31 @@
services:
grafana:
image: grafana/grafana-oss
container_name: factorio_grafana
restart: unless-stopped
ports:
- 3000:3000
volumes:
- ./grafana/config:/etc/grafana/provisioning/datasources:ro
- factorio_grafana:/var/lib/grafana:Z
prometheus:
image: prom/prometheus
container_name: factorio_prometheus
restart: unless-stopped
volumes:
- factorio_prometheus:/prometheus:Z
- ./prometheus/config:/etc/prometheus:ro
sidecar:
image: httpd:latest
container_name: factorio_prometheus_sidecar
restart: unless-stopped
volumes:
- ~/.factorio/script-output:/usr/local/apache2/htdocs:ro
volumes:
factorio_grafana:
external: true
factorio_prometheus:
external: true

View File

@@ -0,0 +1,9 @@
apiVersion: 1
datasources:
- name: Prometheus
type: prometheus
url: http://factorio_prometheus:9090
isDefault: true
access: proxy
editable: true

View File

@@ -0,0 +1,21 @@
global:
scrape_interval: 15s
scrape_timeout: 10s
evaluation_interval: 15s
alerting:
alertmanagers:
- static_configs:
- targets: []
scheme: http
timeout: 10s
api_version: v2
scrape_configs:
- job_name: factorio
honor_timestamps: true
scrape_interval: 15s
scrape_timeout: 10s
metrics_path: /metrics.prom
scheme: http
static_configs:
- targets:
- factorio_prometheus_sidecar:9010