mirror of
https://gitlab.com/fabinfra/fabaccess/prometheus-exporter.git
synced 2025-01-22 01:55:10 +01:00
Fixed: Python Bug
This commit is contained in:
parent
7469a62eff
commit
bdf4c56f0b
@ -1,13 +1,15 @@
|
|||||||
FROM python:3.10.4-bullseye
|
FROM python:3.10.4-bullseye
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY . .
|
COPY requirements.txt requirements.txt
|
||||||
|
|
||||||
RUN apt-get update -y
|
RUN apt-get update -y
|
||||||
RUN apt-get upgrade -y
|
RUN apt-get upgrade -y
|
||||||
RUN apt-get install -y cmake capnproto clang gcc build-essential
|
RUN apt-get install -y cmake capnproto clang gcc build-essential
|
||||||
|
|
||||||
|
COPY . .
|
||||||
RUN pip3 install -r requirements.txt
|
RUN pip3 install -r requirements.txt
|
||||||
|
|
||||||
|
EXPOSE 9877
|
||||||
VOLUME /app/config
|
VOLUME /app/config
|
||||||
CMD [ "python3", "main.py"]
|
CMD [ "python3", "main.py"]
|
||||||
EXPOSE 9877
|
|
2
main.py
2
main.py
@ -29,7 +29,7 @@ async def main():
|
|||||||
bffh_user = str(os.getenv("BFFH_USER", "Admin1"))
|
bffh_user = str(os.getenv("BFFH_USER", "Admin1"))
|
||||||
bffh_password = str(os.getenv("BFFH_PASSWORD", "secret"))
|
bffh_password = str(os.getenv("BFFH_PASSWORD", "secret"))
|
||||||
|
|
||||||
await aio.web.start_http_server(addr="localhost", port=exporter_port)
|
await aio.web.start_http_server(addr="0.0.0.0", port=exporter_port)
|
||||||
|
|
||||||
metriclist = {}
|
metriclist = {}
|
||||||
session = await pyfabapi.fabapi.connect(bffh_host, bffh_port, bffh_user, bffh_password)
|
session = await pyfabapi.fabapi.connect(bffh_host, bffh_port, bffh_user, bffh_password)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user