Skip to content

Commit

Permalink
feat: use official speedtest cli
Browse files Browse the repository at this point in the history
Signed-off-by: Carlos Alexandro Becker <[email protected]>
  • Loading branch information
caarlos0 committed Apr 6, 2021
1 parent c77fb78 commit 5a2ec39
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
1 change: 0 additions & 1 deletion .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ nfpms:
description: Exports Speedtest results to the Prometheus format
formats:
- deb
- apk
- rpm
dependencies:
- speedtest
Expand Down
12 changes: 9 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
FROM alpine
FROM ubuntu
EXPOSE 9876
WORKDIR /
COPY speedtest-exporter*.apk /tmp
RUN apk add --allow-untrusted /tmp/speedtest-exporter*.apk
RUN apt update && \
apt install -y gnupg1 apt-transport-https dirmngr && \
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 379CE192D401AB61 && \
echo "deb https://ookla.bintray.com/debian generic main" | tee /etc/apt/sources.list.d/speedtest.list && \
apt update && \
apt install -y speedtest
COPY speedtest-exporter*.deb /tmp
RUN dpkg -i /tmp/speedtest-exporter*.deb
ENTRYPOINT ["/usr/local/bin/speedtest-exporter"]
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# speedtest-exporter

Exports speedtest-cli metrics in the prometheus format, caching the result to avoid too many speedtests.
Exports [Speedtest CLI](https://www.speedtest.net/apps/cli) metrics in the prometheus format, caching the results.

To install speedtest, follow their instructions [here](https://www.speedtest.net/apps/cli).

## Links

Expand Down

0 comments on commit 5a2ec39

Please sign in to comment.