Skip to content

Instantly share code, notes, and snippets.

@DazWilkin
Created July 1, 2019 01:06
Show Gist options
  • Save DazWilkin/7d617132a880d3b36388d3cff946212f to your computer and use it in GitHub Desktop.
Save DazWilkin/7d617132a880d3b36388d3cff946212f to your computer and use it in GitHub Desktop.
Prometheus Exporter for Particle
version: "3"
# Requires expose TOKEN=[[PARTICLE-TOKEN]]
services:
prometheus:
image: prom/prometheus
volumes:
- "${PWD}/prometheus.yml:/etc/prometheus/prometheus.yml"
expose:
- "9090" # Default HTTP Endpoint
ports:
- 9090:9090
healthcheck:
test:
- CMD
- curl
- --fail
- "http://prometheus:9090/-/healthy"
particle-exporter:
image: dazwilkin/particle-exporter@sha256:582d7f5f009830cbb89ccfae0590ada60930e848af42a401e288029b747c8f70
command:
- --token=${TOKEN}
expose:
- "9999"
ports:
- 9999:9999
global:
# Once per minute
scrape_interval: 60s
external_labels:
monitor: "local-monitor"
scrape_configs:
- job_name: "particle-exporter"
honor_labels: true
static_configs:
- targets: ["particle-exporter:9999"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment