Skip to content

nixos/prometheus: check configuration before activating, allow specifying custom prometheus package #49749

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

Merged
merged 2 commits into from
Nov 4, 2018

Conversation

andir
Copy link
Member

@andir andir commented Nov 4, 2018

Motivation for this change

After running into an issue were I deployed a broken prometheus configuration & broken rules I started adding a check in my nixops configuration to verify files before they are being deployed.

It makes sense to me to do this at all times since it provides a nice additional layer of safeguards against breaking your own systems (monitoring).

I also introduced the services.prometheus.package option to allow overriding the default package that is being used without an overlay.

cc @ocharles @fpletz @bjornfor @teh

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)

Sorry, something went wrong.

andir added 2 commits November 4, 2018 14:45
With a package option we can let the user decide what package to use for
prometheus without requiring an overlay.
With `promtool` we can check the validity of a configuration before
deploying it. This avoids situations where you would end up with a
broken monitoring system without noticing it - since the monitoring
broke down. :-)
@GrahamcOfBorg GrahamcOfBorg added 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: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux labels Nov 4, 2018
@globin globin merged commit 6795bdd into NixOS:master Nov 4, 2018
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: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants