Giter Club home page Giter Club logo

prometheus-audi-exporter's Introduction

Prometheus Audi Exporter

This Prometheus exporter exports metrics that it fetches from the MyAudi API.

Usage

  • Checkout submodules
  • Install dependencies from requirements.txt
  • Run ./audi_exporter.py with environment variables AUDI_USER, AUDI_PASSWORD, AUDI_SPIN and AUDI_COUNTRY
  • Get metrics from http://localhost:9086/metrics

Configuration

The following environment variables can be used to configure the exporter:

Variable Required What?
AUDI_USER yes Username of your MyAudi account
AUDI_PASSWORD yes Password of your MyAudi account
AUDI_SPIN yes SPIN of your MyAudi account
AUDI_COUNTRY yes Country you are located in
EXPORTER_PORT no (default: 9086) Port for the exporter to listen on
EXPORTER_INTERVAL no (default: 900) API polling interval in seconds

Available metrics

Name Type Description
audi_mileage Gauge Total mileage
audi_range Gauge Total available range
audi_state_of_charge Gauge Charge percentage
audi_tank_level Gauge Tank level
audi_max_charge_current Gauge Max charge current
audi_oil_change_distance Gauge Recommended distance left before oil change
audi_oil_change_time Gauge Recommended oil change time
audi_oil_level Gauge Oil level
audi_service_inspection_distance Gauge Recommended distance left before service inspection
audi_service_inspection_time Gauge Recommended service inspection time
audi_any_door_open Gauge Are there open doors?
audi_any_door_unlocked Gauge Are there unlocked doors?
audi_any_window_open Gauge Are there any open windows?
audi_hood_open Gauge Is the hood open?
audi_parking_light Gauge Is the parking light on?
audi_trunk_open Gauge Is the trunk open?
audi_trunk_unlocked Gauge Is the trunk unlocked?
audi_last_update_time Gauge Unixtime of the last update
audi_plug_state Enum Is the charging plug connected?
audi_charging_state Enum Is the car currently charging?
audi_remaining_charging_time Gauge Remaining charging time in minutes
audi_climatisation_state Enum Is climatisation currently active?

Acknowledgements

This exporter makes use of the HomeAssistent project https://github.com/arjenvrh/audi_connect_ha.git . All their code does the API talking, we just translate those results to something prometheus can handle. Without arjenvrh's project, this would have been a lot more work, so big thanks to them.

prometheus-audi-exporter's People

Contributors

dmaes avatar robinoph avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.