Clone current repository and
cd syncthing_exporter
go build .
./syncthing_exporter --version
For pre-built binaries please take a look at the releases.
Basic prometheus configuration:
- job_name: 'syncting_server'
metrics_path: /metrics
static_configs:
- targets: ['127.0.0.1:9093']
labels:
service: syncthing_server
Name | Evironment variable | Required | Description |
---|---|---|---|
web.listen-address | WEB_LISTEN_ADDRESS | - | Address ot listen on for web interface and telemetry |
web.metrics-path | WEB_METRIC_PATH | - | Path under which to expose metrics |
st.uri | ST_URI | + | HTTP API address of Syncthing node |
st.token | ST_TOKEN | + | Token for authentification Syncthing HTTP API |
st.timeout | ST_TIMEOUT | - | Timeout for trying to get stats from Syncthing |
Example of all metrics related to syncthing
here.
For data obtaining is using two endpoints:
GET /rest/svc/report
GET /rest/system/connections
Example of grafana dashboard:
The following environment variables are supported
Env Variable | Default | Description |
---|---|---|
ENV WEB_LISTEN_PORT= | "9112" | Port to expose telemetry |
ENV WEB_LISTEN_ADDRESS= | ":${PORT}" | Address & port to expose telemetry |
ENV WEB_METRIC_PATH | "/metrics" | HTTP Path under which to expose telemetry |
ENV ST_URI= | http://127.0.0.1:8384 | HTTP API address of Syncthing node |
ENV ST_TOKEN | "123" | !Change this! Token for authentification Syncthing HTTP API |
ENV ST_TIMEOUT | "5s" | Timeout for trying to get stats from Syncthing |
To run, simply
docker run adenau/syncthing-exporter
Any ideas and pull requests are appreciated.