ianunruh / ambient-exporter

Prometheus exporter for Ambient Weather devices

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ambient-exporter

Prometheus exporter that collects device data from the Ambient Weather API.

Build Docker image

Tested with the Ambient Weather WS-8482.

Example metrics

Features

  • Supports multiple base stations and multiple sensors per station
  • Lightweight Docker image (around 15MB)

Usage

Start by getting an API key and application key from Ambient Weather.

export AMBIENT_API_KEY="abc"
export AMBIENT_APP_KEY="xyz"

docker compose up -d --build
docker compose ps
docker compose logs exporter

curl -s http://localhost:9090/metrics | grep ambient

Deployment

Use Kustomize to deploy the exporter to a Kubernetes cluster.

kubectl -n monitoring create secret generic ambient-exporter \
    --from-literal=AMBIENT_API_KEY=${AMBIENT_API_KEY} \
    --from-literal=AMBIENT_APP_KEY=${AMBIENT_APP_KEY}

kubectl kustomize "https://github.com/ianunruh/ambient-exporter.git/deploy/basic?ref=v1.0.1" | \
    kubectl apply -n monitoring -f-

About

Prometheus exporter for Ambient Weather devices

License:Apache License 2.0


Languages

Language:Go 94.8%Language:Dockerfile 5.2%