semaphore-exporter
Docker app from louij2's Repository
Overview
Prometheus exporter for Semaphore (semaphoreui.com), which has no native /metrics endpoint. Read-only: only GETs from Semaphore's API. Exports semaphore_task_running_seconds for every non-terminal task, so a task stuck running for hours shows up, not just failed/succeeded ones.
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.
Requirements
A Semaphore API token.
Categories
Download Statistics
40
Total Downloads
Related apps
Explore more like this
Explore allDetails
Repository
louij2/semaphore-exporter:latestLast Updated2026-09-16
First Seen2026-09-18
Runtime 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
Host Port 9819Porttcp
Container Port: 9819
- Target
- 9819
- Default
- 9819
- Value
- 9819
semaphore-tokenPathro
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
SEMAPHORE_URLVariable
e.g. http://10.0.0.24:3000