~tomleb/borgbase-exporter

Prometheus exporter for borgbase
Revert 940c783206b8
Add link to Docker build status
Fix BorgBase's name

clone

read-only
https://git.sr.ht/~tomleb/borgbase-exporter
read/write
git@git.sr.ht:~tomleb/borgbase-exporter

You can also use your local clone with git send-email.

#borgbase-exporter

borgbase-exporter is a Prometheus exporter that exposes information about BorgBase repositories.

It polls BorgBase's GraphQL API at a specified interval (default: 2 minutes).

This app uses gqlclient to generate GraphQL code for BorgBase's API.

#Metrics

The following metrics are exposed by this custom exporter.

borgbase_error_total

Number of errors trying to reach the borgbase API

borgbase_repo_encrypted

Whether the repository is encrypted (1=encrypted,0=none)

borgbase_repo_info

Shows some information about a repository from labels. Value is always 1.

borgbase_repo_last_modified_seconds

Last time the repository was modified

borgbase_repo_quota_bytes

Repository quota in bytes

borgbase_repo_current_usage_bytes

Repository current usage in bytes

borgbase_repo_events_last_seen_seconds

Timestamp of the last seen event keyed by (repo id, ip, slug, ssh key name)

#Usage

You must configure the BorgBase API token with the environment variable BORGBASE_API_TOKEN.

Usage of ./borgbase-exporter:
  -endpoint string
    	The BorgBase API address (default "https://api.borgbase.com/graphql")
  -listen-address string
    	The address to bind to (default ":9908")
  -polling-interval int
    	Interval in seconds before fetching data again from BorgBase's API (default 120)

#License

See LICENSE.

#Contribution

Patches welcomed at the following mailing list: https://lists.sr.ht/~tomleb/public-inbox.