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

Feature request: A command line mode be made to validate alertmanager configuration #3437

Closed
dannystaple opened this issue Nov 11, 2022 · 2 comments · Fixed by #3440
Closed

Comments

@dannystaple
Copy link
Contributor

Is your feature request related to a problem? Please describe.

Our mimir configuration is done through a CI system, and is deployed out to multiple instances in multiple environments. We have validations for many items before a new change can go into that.

Performing alertmanager load clearly validates before the configuration is uploaded to a server, however it can break if an incorrect config has been merged into the main branch. We do not have a way to validate this config before this is merged.

Describe the solution you'd like

It would useful for validation of changes into our deployable main, to have something like mimirtool alertmanager verify <config> that would perform the validation, but without requiring to upload to a server afterwards.

Describe alternatives you've considered

Building a bash script around alertmanager load that will filter out an error due to ERRO[0000] error during request to Grafana Mimir API and give it dummy URI's and credentials.

Additional context

N/A

@dannystaple dannystaple changed the title Could a command line mode be made to validate alertmanager configuration Feature request: A command line mode be made to validate alertmanager configuration Nov 11, 2022
@dannystaple
Copy link
Contributor Author

Potentially a flag for load config, that stopped around

might do this.

@dannystaple
Copy link
Contributor Author

I have created a PR for this - however, I was not able to find any tests around the mimirtool alertmanager load command handler.

pracucci added a commit that referenced this issue Nov 17, 2022
* Alertmanager configuration validate-only mode #3437

* Documentation update for alertmanager config validation

* Update changelog

* Update docs/sources/operators-guide/architecture/components/alertmanager.md

Co-authored-by: Ursula Kallio <[email protected]>

* Swap a command line flag for a verify subcommand.

* Update pkg/mimirtool/commands/alerts.go

Co-authored-by: Marco Pracucci <[email protected]>

* For loop to reduce repetition

* Use review suggestion.

* Make alertmanager verification docs more consistent.
Bump from enhancement to feature.

* fmt

* Fix the golint issue.

* Fix typo

* Make doc result (as specified by lint process)

Co-authored-by: Ursula Kallio <[email protected]>
Co-authored-by: Marco Pracucci <[email protected]>
manohar-koukuntla added a commit to manohar-koukuntla/mimir that referenced this issue Nov 17, 2022
Co-authored-by: Marco Pracucci <[email protected]>

Add scheme to DNS service discovery docs (grafana#3450)

* Add schema to DNS service discovery docs

The missing schema leads to errors like `improperly formatted alertmanager URL "alertmanager.mimir.svc.cluster.local:8080/alertmanager" (maybe the scheme is missing?)`.

* Update docs/sources/operators-guide/configure/about-dns-service-discovery.md

Co-authored-by: Ursula Kallio <[email protected]>

Co-authored-by: Marco Pracucci <[email protected]>
Co-authored-by: Ursula Kallio <[email protected]>

Alertmanager configuration validate-only mode grafana#3437 (grafana#3440)

* Alertmanager configuration validate-only mode grafana#3437

* Documentation update for alertmanager config validation

* Update changelog

* Update docs/sources/operators-guide/architecture/components/alertmanager.md

Co-authored-by: Ursula Kallio <[email protected]>

* Swap a command line flag for a verify subcommand.

* Update pkg/mimirtool/commands/alerts.go

Co-authored-by: Marco Pracucci <[email protected]>

* For loop to reduce repetition

* Use review suggestion.

* Make alertmanager verification docs more consistent.
Bump from enhancement to feature.

* fmt

* Fix the golint issue.

* Fix typo

* Make doc result (as specified by lint process)

Co-authored-by: Ursula Kallio <[email protected]>
Co-authored-by: Marco Pracucci <[email protected]>

lint fix
pracucci pushed a commit that referenced this issue Nov 17, 2022
* add runbook urls for alerts

Co-authored-by: Joshua Hesketh <[email protected]>

Update CHANGELOG.md

Co-authored-by: Joshua Hesketh <[email protected]>

* Update CHANGELOG.md

Co-authored-by: Marco Pracucci <[email protected]>

Add scheme to DNS service discovery docs (#3450)

* Add schema to DNS service discovery docs

The missing schema leads to errors like `improperly formatted alertmanager URL "alertmanager.mimir.svc.cluster.local:8080/alertmanager" (maybe the scheme is missing?)`.

* Update docs/sources/operators-guide/configure/about-dns-service-discovery.md

Co-authored-by: Ursula Kallio <[email protected]>

Co-authored-by: Marco Pracucci <[email protected]>
Co-authored-by: Ursula Kallio <[email protected]>

Alertmanager configuration validate-only mode #3437 (#3440)

* Alertmanager configuration validate-only mode #3437

* Documentation update for alertmanager config validation

* Update changelog

* Update docs/sources/operators-guide/architecture/components/alertmanager.md

Co-authored-by: Ursula Kallio <[email protected]>

* Swap a command line flag for a verify subcommand.

* Update pkg/mimirtool/commands/alerts.go

Co-authored-by: Marco Pracucci <[email protected]>

* For loop to reduce repetition

* Use review suggestion.

* Make alertmanager verification docs more consistent.
Bump from enhancement to feature.

* fmt

* Fix the golint issue.

* Fix typo

* Make doc result (as specified by lint process)

Co-authored-by: Ursula Kallio <[email protected]>
Co-authored-by: Marco Pracucci <[email protected]>

lint fix

Co-authored-by: Joshua Hesketh <[email protected]>
masonmei pushed a commit to udmire/mimir that referenced this issue Dec 16, 2022
)

* Alertmanager configuration validate-only mode grafana#3437

* Documentation update for alertmanager config validation

* Update changelog

* Update docs/sources/operators-guide/architecture/components/alertmanager.md

Co-authored-by: Ursula Kallio <[email protected]>

* Swap a command line flag for a verify subcommand.

* Update pkg/mimirtool/commands/alerts.go

Co-authored-by: Marco Pracucci <[email protected]>

* For loop to reduce repetition

* Use review suggestion.

* Make alertmanager verification docs more consistent.
Bump from enhancement to feature.

* fmt

* Fix the golint issue.

* Fix typo

* Make doc result (as specified by lint process)

Co-authored-by: Ursula Kallio <[email protected]>
Co-authored-by: Marco Pracucci <[email protected]>
masonmei pushed a commit to udmire/mimir that referenced this issue Dec 16, 2022
* add runbook urls for alerts

Co-authored-by: Joshua Hesketh <[email protected]>

Update CHANGELOG.md

Co-authored-by: Joshua Hesketh <[email protected]>

* Update CHANGELOG.md

Co-authored-by: Marco Pracucci <[email protected]>

Add scheme to DNS service discovery docs (grafana#3450)

* Add schema to DNS service discovery docs

The missing schema leads to errors like `improperly formatted alertmanager URL "alertmanager.mimir.svc.cluster.local:8080/alertmanager" (maybe the scheme is missing?)`.

* Update docs/sources/operators-guide/configure/about-dns-service-discovery.md

Co-authored-by: Ursula Kallio <[email protected]>

Co-authored-by: Marco Pracucci <[email protected]>
Co-authored-by: Ursula Kallio <[email protected]>

Alertmanager configuration validate-only mode grafana#3437 (grafana#3440)

* Alertmanager configuration validate-only mode grafana#3437

* Documentation update for alertmanager config validation

* Update changelog

* Update docs/sources/operators-guide/architecture/components/alertmanager.md

Co-authored-by: Ursula Kallio <[email protected]>

* Swap a command line flag for a verify subcommand.

* Update pkg/mimirtool/commands/alerts.go

Co-authored-by: Marco Pracucci <[email protected]>

* For loop to reduce repetition

* Use review suggestion.

* Make alertmanager verification docs more consistent.
Bump from enhancement to feature.

* fmt

* Fix the golint issue.

* Fix typo

* Make doc result (as specified by lint process)

Co-authored-by: Ursula Kallio <[email protected]>
Co-authored-by: Marco Pracucci <[email protected]>

lint fix

Co-authored-by: Joshua Hesketh <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant