Skip to content

Conversation

@emaiax
Copy link
Contributor

@emaiax emaiax commented Dec 5, 2025

This PR reintroduces the prometheus-speedtest-exporter package and nixos module for configuring the prometheus speedtest-exporter. This enables monitoring of network speed metrics via Prometheus using the Ookla Speedtest CLI.

speedtest-exporter timeline:

The caarlos0/speedtest-exporter has been working for years without issues, so I think it's a solid option to bring this exporter back. This exporter requires pkgs/by-name/oo/ookla-speedtest to be available in runtime; however, speedtest-cli is proprietary software.

Things done

  • Built on platform:
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • Tested, as applicable:
  • Ran nixpkgs-review on this PR. See nixpkgs-review usage.
  • Tested basic functionality of all binary files, usually in ./result/bin/.
  • Nixpkgs Release Notes
    • Package update: when the change is major or breaking.
  • NixOS Release Notes
    • Module addition: when adding a new NixOS module.
    • Module update: when the change is significant.
  • Fits CONTRIBUTING.md, pkgs/README.md, maintainers/README.md and other READMEs.

Add a 👍 reaction to pull requests you find important.

@emaiax emaiax marked this pull request as ready for review December 5, 2025 03:03
@nixpkgs-ci nixpkgs-ci bot added 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 9.needs: reviewer This PR currently has no reviewers requested and needs attention. 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` labels Dec 5, 2025
@emaiax

This comment was marked as outdated.

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/prs-ready-for-review/3032/6134

@acid-bong
Copy link
Contributor

the correct title should be nixos/PROGRAM: https://github.com/NixOS/nixpkgs/blob/master/nixos/README.md#commit-conventions

Copy link
Contributor

@acid-bong acid-bong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually no: split your PR into three commits:

  1. new package (without test in passthru)
  2. new module
  3. new test (and add it to the package's passthru)

See common conventions (one commit per logical unit), individual title conventions + follow dependency order. The final title format should be PROGRAM: init at VERSION + nixos module

@nixpkgs-ci nixpkgs-ci bot removed the 9.needs: reviewer This PR currently has no reviewers requested and needs attention. label Dec 5, 2025
@emaiax emaiax force-pushed the prometheus-speedtest-exporter branch from 2f32986 to b87e4cc Compare December 5, 2025 09:32
@emaiax

This comment was marked as outdated.

@emaiax emaiax changed the title prometheus-speedtest-exporter: init module speedtest-exporter: init at 1.1.4 + nixos/prometheus-exporters: init speedtest-exporter Dec 5, 2025
@emaiax emaiax requested a review from acid-bong December 5, 2025 09:46
Comment on lines +23 to +24
"-X main.builtBy=nixpkgs"
"-X main.commit=unknown"
"-X main.date=unknown"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where did you get these from? i can only see version

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@emaiax emaiax force-pushed the prometheus-speedtest-exporter branch from aea4b7d to abaabd3 Compare December 5, 2025 10:36
Reintroduces `speedtest-exporter` enabling Prometheus metrics export for Ookla speedtests (runtime dependency).
Introduces a new NixOS module for the Prometheus speedtest exporter, allowing configuration of debug mode and refresh interval.
Add tests for the prometheus-speedtest-exporter, enabling service, debug mode, and refresh interval configuration. Also links the test in the package's passthru.tests for integration with NixOS test infrastructure.
@emaiax emaiax force-pushed the prometheus-speedtest-exporter branch from abaabd3 to c358fb2 Compare December 5, 2025 10:47
@emaiax emaiax requested a review from acid-bong December 5, 2025 10:51
@emaiax
Copy link
Contributor Author

emaiax commented Dec 5, 2025

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 467982
Commit: c358fb23c709d9e46c319b779a7c27f18140a8ab


x86_64-linux

⏩ 2 packages blacklisted:
  • nixos-install-tools
  • tests.nixos-functions.nixos-test
✅ 1 package built:
  • prometheus-speedtest-exporter

aarch64-linux

⏩ 2 packages blacklisted:
  • nixos-install-tools
  • tests.nixos-functions.nixos-test
✅ 1 package built:
  • prometheus-speedtest-exporter

x86_64-darwin

✅ 1 package built:
  • prometheus-speedtest-exporter

aarch64-darwin

✅ 1 package built:
  • prometheus-speedtest-exporter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants