Skip to content

Using the prometheus database for data collection

The prometheus database is used for many projects for data collection. It is relatively easy to set up and use.

For installation, you can follow a guide provided by the prometheus devs.

Important

The part of the API (/api/prometheus/metrics) is not the database server! The database is always installed on an external host and never on the OpenDTU itself!

Here are some distro-specific guides for linux:

Configuring Prometheus to scrape data from the OpenDTU

# /etc/prometheus/prometheus.yml
scrape_configs:
  - job_name: 'opendtu'
    scrape_interval: 5s # >= Inverter scrape interval
    static_configs:
    - targets: ['<ip of first opendtu>', '<ip of second opendtu>']
    metrics_path: /api/prometheus/metrics

Example Grafana Dashboards