Skip to content
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

nixos/prometheus2: replace alertmanagerURL with new alertmanagers option #66476

Merged
merged 2 commits into from Aug 12, 2019

Conversation

WilliButz
Copy link
Member

Motivation for this change

Prometheus2 does no longer support the command-line flag to specify
an alertmanager. Instead it now supports both service discovery and
configuration of alertmanagers in the alerting config section.

Simply mapping the previous option to an entry in the new alertmanagers
section is not enough to allow for complete configurations of an
alertmanager.

For example in a setup where an alertmanager runs under the same subdomain as prometheus but under a seperate path, this needs to be configured in the alerting section of the prometheus config and currently the module does not provide this functionality.

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)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

cc @basvandijk @andir @fpletz

@WilliButz
Copy link
Member Author

@GrahamcOfBorg test prometheus2

Copy link
Member

@Ma27 Ma27 left a comment

Choose a reason for hiding this comment

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

As prometheus2 doesn't seem to support the old option, I guess the removal and change here is perfectly fine.

However I'd wait for another reviewer to merge as my stuff is mostly on NixOS 19.03 where I (admittedly) still use prometheus v1, so I don't have an environment where I can quickly test this 😅

Prometheus2 does no longer support the command-line flag to specify
an alertmanager. Instead it now supports both service discovery and
configuration of alertmanagers in the alerting config section.

Simply mapping the previous option to an entry in the new alertmanagers
section is not enough to allow for complete configurations of an
alertmanager.

Therefore the option alertmanagerURL is no longer used and instead
a full alertmanager configuration is expected.
@WilliButz WilliButz force-pushed the fix-prometheus-alertmanager-option branch from 43e7cc5 to a8847c8 Compare August 12, 2019 08:43
@fpletz fpletz merged commit f3160a2 into NixOS:master Aug 12, 2019
@WilliButz WilliButz deleted the fix-prometheus-alertmanager-option branch August 12, 2019 18:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants