Skip to content

Latest commit

 

History

History
57 lines (42 loc) · 1.29 KB

README.md

File metadata and controls

57 lines (42 loc) · 1.29 KB

api_exporter

API Exporter for Prometheus. Read temperatures and set gauges every minute.

  1. Local development
git clone --single-branch https://github.com/diegogslomp/api_exporter
cd api_exporter

# Create and activate a virtual environment (optional)
python -m pipenv install
python -m pipenv shell

# Copy and edit enviroment variables file
cp .example.env .env

# Install dependencies
pip install -r requirements

# Run script
python exporter/exporter.py
  1. Docker image
docker run \
  -e API_HOST="10.0.0.10" \
  -e API_PORT="8002" \
  -e API_USER="admin" \
  -e API_PASSWORD="SecretTempP4ss!" \
  -p 8083:8083 \
  --name exporter diegogslomp/api_exporter
  1. Docker compose (Ctrl+c to exit logs)
git clone --single-branch https://github.com/diegogslomp/api_exporter
cd api_exporter

# Copy and edit enviroment variables file
cp .example.env .env

docker compose up -d
docker compose logs -f