mirror of https://github.com/lumapu/ahoy.git
committed by
GitHub
12 changed files with 1926 additions and 2 deletions
@ -0,0 +1,18 @@ |
|||
FROM python:latest |
|||
|
|||
LABEL maintainer Simoliv |
|||
|
|||
USER root |
|||
|
|||
RUN mkdir /hoymiles_exporter |
|||
|
|||
COPY . /hoymiles_exporter |
|||
|
|||
WORKDIR /hoymiles_exporter |
|||
|
|||
RUN pip3 install --upgrade pip |
|||
RUN ls -la |
|||
RUN pip3 install -r requirements.txt |
|||
RUN pip3 install -r optional-requirements.txt |
|||
|
|||
CMD python3 -um hoymiles --verbose --log-transactions --config ahoy.yml |
After Width: | Height: | Size: 152 KiB |
After Width: | Height: | Size: 179 KiB |
File diff suppressed because it is too large
@ -0,0 +1,38 @@ |
|||
version: '3.3' |
|||
|
|||
services: |
|||
prometheus: |
|||
container_name: prometheus |
|||
image: prom/prometheus |
|||
volumes: |
|||
- ./prometheus:/etc/prometheus |
|||
networks: |
|||
hoymiles_net: |
|||
ipv4_address: 172.18.0.3 |
|||
ports: |
|||
- 9090:9090 |
|||
restart: always |
|||
|
|||
grafana: |
|||
container_name: grafana |
|||
image: grafana/grafana |
|||
ports: |
|||
- 3000:3000 |
|||
restart: always |
|||
volumes: |
|||
- grafana-storage:/var/lib/grafana |
|||
networks: |
|||
hoymiles_net: |
|||
ipv4_address: 172.18.0.2 |
|||
|
|||
volumes: |
|||
data: |
|||
grafana-storage: |
|||
|
|||
networks: |
|||
hoymiles_net: |
|||
ipam: |
|||
driver: default |
|||
config: |
|||
- subnet: "172.18.0.0/24" |
|||
|
@ -0,0 +1,30 @@ |
|||
global: |
|||
scrape_interval: 15s |
|||
scrape_timeout: 10s |
|||
evaluation_interval: 15s |
|||
alerting: |
|||
alertmanagers: |
|||
- static_configs: |
|||
- targets: [] |
|||
scheme: http |
|||
timeout: 10s |
|||
api_version: v1 |
|||
scrape_configs: |
|||
- job_name: prometheus |
|||
honor_timestamps: true |
|||
scrape_interval: 15s |
|||
scrape_timeout: 10s |
|||
metrics_path: /metrics |
|||
scheme: http |
|||
static_configs: |
|||
- targets: |
|||
- localhost:9090 |
|||
- job_name: hoymiles |
|||
honor_timestamps: true |
|||
scrape_interval: 15s |
|||
scrape_timeout: 10s |
|||
metrics_path: / |
|||
scheme: http |
|||
static_configs: |
|||
- targets: |
|||
- 172.18.0.1:9233 |
@ -1 +1,2 @@ |
|||
influxdb-client>=1.28.0 |
|||
prometheus_client |
|||
|
@ -0,0 +1,14 @@ |
|||
[Unit] |
|||
Description=Hoymiles Exporter |
|||
After=network.target |
|||
|
|||
[Service] |
|||
WorkingDirectory=/home/rpi/hoymiles_exporter |
|||
ExecStart=/usr/bin/bash -c 'cd /home/rpi/hoymiles_exporter ; /usr/bin/python3 -um hoymiles --config ahoy.yml' |
|||
User=rpi |
|||
KillMode=process |
|||
Restart=on-failure |
|||
|
|||
[Install] |
|||
WantedBy=multi-user.target |
|||
Alias=hoymiles.service |
Loading…
Reference in new issue