Sign inSign up

neredera/teslafi-exporter

By neredera

•Updated almost 3 years ago

Image
0

1.9K

neredera/teslafi-exporter repository overview

Source is on github neredera/teslafi_exporter⁠.

⁠teslafis_exporter

This is a Prometheus exporter⁠ for TeslaFi⁠.

It allows to import the current status of your Tesla into Prometheus.

⁠Usage

Get your TeslaFi API token at TeslaFi⁠. No commands are used by this tool, you can disable all when generating the API token.

Command line parameters:

> python3 exporter.py --help

usage: exporter.py [-h] [--port PORT] [--teslafi_api_token TESLAFI_API_TOKEN]

optional arguments:
  -h, --help            show this help message and exit
  --port PORT           The port where to expose the exporter (default:9998)
  --teslafi_api_token TESLAFI_API_TOKEN
                        TeslaFi API Token from https://teslafi.com/api.php
                        

⁠Usage with docker

Example docker-compose.yml:

version: '3.4'

services:
  teslafi-exporter:
    image: neredera/teslafi-exporter:latest
    restart: always
    command: "--teslafi_api_token TESLAFI_API_TOKEN"
    ports:
      - 9998:9998

⁠Prometheus metrics

Example how to add the exporter to the prometheus configuration (prometheus.yml):

  - job_name: teslafi
    scrape_interval: 1m  # Has to be longer than 20s or TeslaFi will block you. By default TeslaFi has every 60s new data.
    static_configs:
    - targets: ['teslafi-exporter-host.local:9998']

Tag summary

Content type

Image

Digest

sha256:f293b7670…

Size

50.8 MB

Last updated

almost 3 years ago

docker pull neredera/teslafi-exporter