semaphore-exporter
Docker app from louij2's Repository
Prometheus exporter for Semaphore (semaphoreui.com), which has no native /metrics endpoint.
Requirements
Overview
Readme
View on GitHubsemaphore-exporter
Prometheus exporter for Semaphore,
which has no native /metrics endpoint. Polls Semaphore's REST API
(cached briefly so a scrape storm can't hammer it) and serves Prometheus
text format. Read-only — only ever GETs, never starts/stops/modifies a
task or template. Stdlib-only Python, no third-party dependencies.
Notably exports semaphore_task_running_seconds for every non-terminal
task, so a task stuck running for hours (not just failed/succeeded ones)
shows up — see the module docstring in exporter.py for the incident that
motivated it.
Build
docker build -t semaphore-exporter:latest .
Run
docker run -d --name semaphore-exporter --restart unless-stopped \
-p 9825:9825 \
-e SEMAPHORE_URL=http://semaphore:3000 \
-e SEMAPHORE_API_TOKEN=<token> \
semaphore-exporter:latest
Scrape :9825/metrics with Prometheus.
Categories
Download Statistics
Related apps
Explore more like this
Explore allLinks
Details
louij2/semaphore-exporter:latestRuntime arguments
- Web UI
http://[IP]:[PORT:9819]/metrics- Network
bridge- Shell
sh- Privileged
- false
- Extra Params
--restart=unless-stopped --memory=256m --cpus=0.5
Template configuration
Container Port: 9819
- Target
- 9819
- Default
- 9819
- Value
- 9819
Read-only bind mount to a file containing your Semaphore API token.
- Target
- /run/secrets/semaphore-token
- Value
- /mnt/user/appdata/semaphore-exporter/semaphore-token
e.g. http://10.0.0.24:3000