MiguelNdeCarvalho/speedtest-exporter

Keep Exporter running ? Manual installation method

Opened this issue · 1 comments

Sorry - since i have issues with Docker on my Debian12 - (whenever the docker container for speedtest-exporter is running it takes 10s and the network goes down (like no route to host and such)) i decided to go the "manual" installation way. Which works so far.

The only question left is:

Execute the exporter - python src/exporter.py

how to keep it running?
i also changed my Prometheus.yml
since as soon as i ctrl+c it will stop the script and i doubt its not python that will start the script every 1hr by the changes in the prometheus.yml

but i wonder how the exporter python script keeps up and running in the background and restarts !?

Yeah, basically a noob here. :)

Thanks for any tips!

Here is an example of how I keep the python script running as a service.
`sudo nano /etc/systemd/system/speedtest_exporter.service

[Unit]
Description=Speedtest-Exporter service
After=multi-user.target
[Service]
User=prometheus
Type=simple
Environment=PYTHONUNBUFFERED=1
WorkingDirectory=/etc/prometheus/speedtest-exporter
ExecStart=/usr/bin/python3 /etc/prometheus/speedtest-exporter/src/exporter.py
ExecReload=/bin/kill -HUP $MAINPID
KillMode=process
Restart=on-failure
RestartSec=42s
[Install]
WantedBy=multi-user.target

`