This article will serve as the how-to guide for installing the Wyebot Prometheus exporter, and contain some example Grafana dashboards as a starting point for integrating Wyebot data into your existing Grafana system.
The Prometheus exporter queries the Wyebot API and generates metrics, which will be saved in the Prometheus database, and can nicely integrate with Grafana.
Please note that this article will describe how to install and configure the Wyebot exporter only. We will not be describing how to set up a Prometheus and Grafana server from scratch.
The Wyebot Prometheus exporter is hosted on Docker Hub - see this link for additional documentation https://hub.docker.com/r/wyebotexporter/prometheus
Here is a webinar which can serve as an introduction to utilizing Prometheus/Grafana with Wyebot: https://youtu.be/hHK1PEy6B-s?si=qnjiYGn2-_VnlpKg
In order to make use of the Wyebot Prometheus exporter, you will need to have access to a server (or servers) with the following software installed and running. There are many resources online with guides to install the following. We will link to official documentation.
All servers involved should have their time synchronized with NTP or similar.
Login to your Docker host. Paste the following into the shell to pull and start the container.
Replace "cloud" with your cloud name. To find this, log in to your Wyebot sensor dashboard. After log in you are redirected to your actual cloud instance. Note the text after https:// and before .wyebot.com. For example https://wip.wyebot.com/index.html.
Replace "your-api-key" with the API key you generated in the previous step.
docker run -d \
--name wyebot-exporter \
-p 8014:8014 \
-e CLOUD_NAME="cloud" \
-e API_KEY="your-api-key" \
wyebotexporter/prometheus:latest
If needed, here is a Docker Compose example:
services:
wyebot-exporter:
image: wyebotexporter/prometheus:latest
container_name: wyebot-exporter
restart: unless-stopped
ports:
- "8014:8014"
environment:
- CLOUD_NAME=cloud
- API_KEY=your-api-key
Add the following to your prometheus.yml
configuration file. Restart your Prometheus server so it accepts the new configuration.
Change the targets value
wyebot-exporter:8014
to the IP address/hostname and port where you are hosting the Docker container for the Wyebot exporter.
scrape_configs:
- job_name: 'wyebot'
scrape_interval: 5m
scrape_timeout: 5m
static_configs:
- targets: ['wyebot-exporter:8014']
Here is an example docker compose file to get the minimum exporter up and running.
This is intended to be used as a basic, working example to start using the Wyebot exporter. More cutomization is recommended for production.
docker-compose.yml
prometheus.yml
configuration in the same directory.docker compose up
or docker compose up -d
to run in the background.# docker-compose.yml
services:
# Wyebot exporter for collecting the data
wyebot-exporter:
image: wyebotexporter/prometheus:latest
container_name: wyebot-exporter
environment:
- API_KEY=your_api_key_here # Replace with your actual API key
- CLOUD_NAME=your_cloud_name_here # Replace with your cloud name (e.g., CLOUD_NAME=wip4)
ports:
- "8014:8014"
# Prometheus for storing the data
prometheus:
image: prom/prometheus:latest
container_name: prometheus
restart: unless-stopped
ports:
- "9090:9090"
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml
- prometheus-data:/prometheus
# Grafana for graphing the data
grafana:
image: grafana/grafana:latest
container_name: grafana
restart: unless-stopped
ports:
- "3000:3000"
volumes:
- grafana-data:/var/lib/grafana
volumes:
grafana-data:
prometheus-data:
The webpage may take a while to load, since it does all the API calls at the time the webpage is accessed. Please be patient and do not refresh while it is loading.
For instructions on importing Grafana dashboards, see this guide: https://grafana.com/docs/grafana/latest/dashboards/build-dashboards/import-dashboards/