This repository contains a collection of random Prometheus exporters I use.
You can either run the exporters directly or use the provided Docker image.
services:
http-exporter:
image: ghcr.io/topi314/http-exporter:master
container_name: http-exporter
restart: unless-stopped
volumes:
- ./config.toml:/var/lib/http-exporter/config.toml
ports:
- "2112:2112"
The exporters are configured via a TOML file. The default path is /var/lib/http-exporter/config.toml
but you can change it with the --config
flag.
[global]
scrape_interval = "1m"
scrape_timeout = "10s"
[log]
level = "info"
format = "text"
add_source = false
[server]
listen_addr = ":2112"
endpoint = "/metrics"
# Add your exporter configurations here
# [[configs]]
# name = "Bla"
# type = "http-temp"
# interval = "1m"
# timeout = "10s"
# [configs.options]
This exporter reads temperature data from a HTTP endpoint and exposes it as a Prometheus gauge metric.
[[configs]]
name = "Bla"
type = "http-temp"
interval = "1m"
timeout = "10s"
[configs.options]
# The metric name, help text and labels
metric = { name = "bla_temp", help = "Temperature in celsius", labels = { name = "bla" } }
# The HTTP endpoint to fetch the data from
address = "hostname:port"
insecure = true
username = "user"
password = "password"
Shelly Exporter is licensed under the Apache License 2.0.
Contributions are always welcome! Just open a pull request or discussion and I will take a look at it.