https://github.com/pdok/betterstack-exporter
https://github.com/pdok/betterstack-exporter
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/pdok/betterstack-exporter
- Owner: PDOK
- License: mit
- Created: 2025-05-23T07:33:34.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2025-05-23T08:51:37.000Z (about 1 year ago)
- Last Synced: 2025-05-23T10:10:26.493Z (about 1 year ago)
- Language: Go
- Size: 8.38 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Better Stack exporter
[](https://github.com/PDOK/betterstack-exporter/actions/workflows/build-and-publish-image.yaml)
[](https://github.com/PDOK/betterstack-exporter/actions/workflows/lint-go.yml)
[](https://goreportcard.com/report/github.com/PDOK/betterstack-exporter)
[](https://raw.githack.com/wiki/PDOK/betterstack-exporter/coverage.html)
[](https://github.com/PDOK/betterstack-exporter/blob/master/LICENSE)
[](https://hub.docker.com/r/pdok/betterstack-exporter)
This Prometheus exporter exposes statistics about [Better Stack uptime monitoring](https://betterstack.com/uptime).
This data is collected and exposed as a Prometheus metrics endpoint. The goal is to expose stats regarding the status of each configured uptime monitor.
## Example metrics output
```text
# HELP betterstack_monitor_status The current status of the check (0: down, 1: maintenance, 2: up, 3: paused, 4: pending, 5: validating)
# TYPE betterstack_monitor_status gauge
betterstack_monitor_status{id="1",pronounceable_name="Homepage",url="https://example.com/"} 2
betterstack_monitor_status{id="2",pronounceable_name="API v2",url="https://example.com/api/v2"} 2
# ...
```
## Build
```shell
docker build .
```
## Run
```text
USAGE:
betterstack-exporter [global options] command [command options]
COMMANDS:
help, h Shows a list of commands or help for one command
GLOBAL OPTIONS:
--api-token value The API token to authenticate with Better Stack. [$API_TOKEN]
--bind-address value The TCP network address addr that is listened on. (default: ":8080") [$BIND_ADDRESS]
--page-size value The number of monitors to request per page (max 250). (default: 50) [$PAGE_SIZE]
--help, -h show help
```
### Linting
Install [golangci-lint](https://golangci-lint.run/usage/install/) and run `golangci-lint run`
from the root.