mirror of
https://github.com/kemko/keenetic-grafana-monitoring.git
synced 2026-01-01 15:45:43 +03:00
Using admin api, instead open port (#1)
* influxdb2 integration * using python alpine base image * add authorization, refactoring config * logging instead print, keenetic api exception handling when try to collect metrics, a little pep8
This commit is contained in:
committed by
GitHub
parent
7661b5819d
commit
16a37bf0d9
15
Dockerfile
15
Dockerfile
@@ -1,10 +1,11 @@
|
||||
FROM python:3-slim
|
||||
FROM python:3.8-alpine AS dependencies
|
||||
COPY requirements.txt .
|
||||
|
||||
ADD keentic_influxdb_exporter.py /home
|
||||
ADD requirements.txt /home
|
||||
ADD value_normalizer.py /home
|
||||
ADD influxdb_writter.py /home
|
||||
ADD config/metrics.json /home/config/metrics.json
|
||||
RUN pip install --no-cache-dir --user --no-warn-script-location -r requirements.txt
|
||||
|
||||
FROM python:3.8-alpine AS build-image
|
||||
COPY --from=dependencies /root/.local /root/.local
|
||||
|
||||
COPY value_normalizer.py keentic_influxdb_exporter.py influxdb_writter.py keenetic_api.py /home/
|
||||
|
||||
RUN pip install -r /home/requirements.txt
|
||||
CMD [ "python", "-u", "/home/keentic_influxdb_exporter.py" ]
|
||||
Reference in New Issue
Block a user