Skip to content

PDOK/betterstack-exporter

Repository files navigation

Better Stack exporter

Build Lint (go) Go Report Card Coverage (go) GitHub license Docker Pulls

This Prometheus exporter exposes statistics about Better Stack uptime monitoring. 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

# 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

docker build .

Run

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 and run golangci-lint run from the root.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •