betterstack-exporter

module
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 26, 2025 License: MIT

README

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.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL