solax-cloud-prometheus-exporter

command module
v0.0.0-...-cdbc116 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 12, 2023 License: MIT Imports: 9 Imported by: 0

README

solax-cloud-prometheus-exporer

Prometheus exporter for inverter data readouts from public solax cloud api. (currently only exports data i need, will maybe add support for selecting wanted data later)

Using Go 1.19 or newer

go install github.com/davidprokopec/solax-cloud-prometheus-exporter@latest

Usage

Metrics prefix is solaxcloud_

Run from shell

If you downloaded the source code and built it, you can run it from shell:

./solax-cloud-prometheus-exporter -address "<your_api_address>" -listen 0.0.0.0:8886
Run from docker

The docker image is built for amd64 and arm64 platforms, since I myself use arm64 on my server.

docker run ghcr.io/davidprokopec/solax-cloud-prometheus-exporter:latest -address "<your_api_address>"
Deployment

Configuration for scraping from Prometheus

metrics:
  configs:
    - name: default
      scrape_configs:
        - job_name: 'solaxcloud_exporter'
          scrape_interval: 120s
          static_configs:
            - targets: ['solaxcloud-exporter:8886']

Example docker-compose configuration

version: '3.3'
services:
  solaxcloud-exporter:
    container_name: monitoring-solaxcloud_exporter
    image: ghcr.io/davidprokopec/solax-cloud-prometheus-exporter
    command:
      - '-address=https://www.solaxcloud.com/proxyApp/proxy/api/getRealtimeInfo.do?tokenId=<your_token>&sn=<your_sn>'
    restart: unless-stopped
    networks:
      - monitoring

Acknowledgement

Original project taken from loafoe: https://github.com/loafoe/prometheus-solaxrt-exporter (Would not be able to make this in Go without it!)

License

License is MIT

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL