Prometheus Exporter for [updown.io]
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2024-08-14 08:03:52 +02:00
.github fix: correct build tags 2024-08-14 08:03:52 +02:00
collector chore: refactor metrics and fetching slightly 2024-06-27 14:54:47 +02:00
updown feat: add --url-filter flag to limit the set of checks reported 2024-06-28 08:44:24 +02:00
.gitignore Working 2022-07-11 18:58:39 -07:00
.ko.yaml build: build & publish with ko 2024-06-27 08:34:51 +02:00
go.mod chore: fork to kastelo.dev 2024-06-27 08:21:22 +02:00
go.sum chore: fork to kastelo.dev 2024-06-27 08:21:22 +02:00
LICENSE Initial commit 2022-07-11 16:56:55 -07:00
main.go feat: add --url-filter flag to limit the set of checks reported 2024-06-28 08:44:24 +02:00
README.md docs: replace image references 2024-06-27 08:39:20 +02:00

Prometheus Exporter for updown.io

Metrics

Metrics names are prefixed updown_.

Name Type Description
checks_enabled Counter Status of Check (enabled=1)
exporter_build_info Counter Exporter build info
metrics_response_times Histogram Histogram of a Check's response times

Image

ghcr.io/kastelo/updown-exporter:latest

API Key

The Exporter needs access to an updown API Key

export API_KEY="[YOUR-API-KEY]"

Go

export API_KEY="[YOUR-API-KEY]"

go run . \
--endpoint=0.0.0.0:8080 \
--path=/metrics

Container

API_KEY="[YOUR-API-KEY]"

IMAGE="ghcr.io/kastelo/updown-exporter:latest"

podman run \
--interactive --tty --rm \
--publish=8080:8080 \
--env=API_KEY=${API_KEY} \
${IMAGE} \
  --endpoint=0.0.0.0:8080 \
  --path=/metrics

Then browse http://localhost:8080/metrics to view the metrics.

Prometheus

prometheus.yml:

global:
  scrape_interval: 1m
  evaluation_interval: 1m

scrape_configs:
  # updown Exporter
- job_name: "updown-exporter"
  static_configs:
  - targets:
    - "localhost:8080"

Docker

API_KEY="[YOUR-API-KEY]"

IMAGE="ghcr.io/kastelo/updown-exporter:latest"

docker run \
--detach --tty --rm \
--name="updown-exporter" \
--env=API_KEY=${API_KEY} \
--publish=8080:8080/tcp \
${IMAGE} \
  --endpoint=0.0.0.0:8080 \
  --path=/metrics

docker run \
--detach --rm --tty \
--name="prometheus" \
--publish=9090:9090/tcp \
--volume=${PWD}/prometheus.yml:/etc/prometheus/prometheus.yml:ro \
docker.io/prom/prometheus:v2.36.2 \
--config.file=/etc/prometheus/prometheus.yml \
--web.enable-lifecycle

Then browse:

Podman

API_KEY="[YOUR-API-KEY]"

IMAGE="ghcr.io/kastelo/updown-exporter:latest"

POD="updown-exporter"

podman pod create \
--name=${POD} \
--publish=5555:8080/tcp \
--publish=9090:9090/tcp

podman run \
--interactive --tty --rm \
--pod=${POD} \
--name="updown-exporter" \
--env=API_KEY=${API_KEY} \
${IMAGE} \
  --endpoint=0.0.0.0:8080 \
  --path=/metrics

podman run \
--detach --rm --tty \
--pod=${POD} \
--name="prometheus" \
--volume=${PWD}/prometheus.yml:/etc/prometheus/prometheus.yml:ro \
docker.io/prom/prometheus:v2.36.2 \
--config.file=/etc/prometheus/prometheus.yml \
--web.enable-lifecycle

Then browse:



Buy Me A Coffee