-
-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable multi instances metrics #108
base: main
Are you sure you want to change the base?
Conversation
jansouza
commented
Dec 30, 2021
- Use python:3.10-slim
- Include Packet Loss metric (speedtest_packet_loss)
- Remove speedtest_server_id metric and Add server_id to the metric label
- Use logging for debug/info (SPEEDTEST_LOG_LEVEL)
- Add /health
Hey @jansouza really thanks for your contribution, whenever I can I will take a look on that! Thanks, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey.
@jansouza really thanks for you PR. I have made some comments in things that I think that should be changed. Sorry for the delay.
Thanks,
MiguelNdeCarvalho
Dockerfile
Outdated
@@ -1,29 +1,30 @@ | |||
FROM python:3.10.1-alpine3.15 | |||
FROM python:3.10-slim as build |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need to change the base image?
|
||
WORKDIR /app | ||
RUN python -m venv /app/venv |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a specific way to use a venv inside the container?
#!/bin/bash | ||
set -e | ||
|
||
docker build -t speedtest-img . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need this build.sh
as all builds are done by CI
@@ -0,0 +1,8 @@ | |||
#!/bin/bash |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need this destroy.sh
script too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since hes not using docker-compose. hes building with "build.sh" and destroying with "destroy.sh"
- stop both servers
- remove both containers
- remove the image
@@ -0,0 +1,5 @@ | |||
[flake8] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any specific reason for ignoring this?
@app.route("/") | ||
def mainPage(): | ||
return ("<h1>Welcome to Speedtest-Exporter.</h1>" + | ||
"Click <a href='/metrics'>here</a> to see metrics.") | ||
"Click <a href='/metrics'>here</a> to see metrics.<br>" + | ||
"Click <a href='/health'>here</a> to see healthy.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no need to add the /health
path here in my opinion!