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

Stop unnecessary config duplication #431

Merged

Conversation

mattdurham
Copy link
Collaborator

@mattdurham mattdurham commented Feb 25, 2021

PR Description

This adds a top level remote write block to prometheus that is used as a default to all subsequent blocks. If any of the subsequent blocks are defined then nothing happens. This ensures that it is backward compatible and allows the child to override the parent.

Tested under normal usage and also in scraping service mode with hot reloading the configuration.

Which issue(s) this PR fixes

Closes #378

Notes to the Reviewer

Tested under both the normal modes of operation and scraping service.

PR Checklist

  • CHANGELOG updated
  • Documentation added
  • Tests updated

Copy link
Member

@rfratto rfratto left a comment

Choose a reason for hiding this comment

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

Some tiny nits, looks good though :)

pkg/prom/instance/instance.go Outdated Show resolved Hide resolved
pkg/prom/instance/instance.go Outdated Show resolved Hide resolved
pkg/prom/instance/instance.go Outdated Show resolved Hide resolved
pkg/prom/ha/server.go Outdated Show resolved Hide resolved
pkg/config/config.go Outdated Show resolved Hide resolved
@mattdurham mattdurham changed the title WIP: Stop unnecessary config duplication Stop unnecessary config duplication Mar 1, 2021
Copy link
Member

@rfratto rfratto left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for working on this!

pkg/prom/ha/server.go Outdated Show resolved Hide resolved
@mattdurham mattdurham merged commit f9f9ff1 into grafana:main Mar 1, 2021
@mattdurham mattdurham mentioned this pull request Sep 7, 2021
3 tasks
mattdurham added a commit that referenced this pull request Nov 11, 2021
* Changes to allow config to follow hierarchy

* Follow config hierCarchy

* Align yaml

* Remove unnecessary check for nil

* Fix for arguments in tests.

* Clean up based on feedback and fixed lint issue.

* Go fmt

* Documentation updated and changelog

* fmt of Yaml

* Make defaultRemoteWrite name consistent

* Make defaultRemoteWrite name consistent
@github-actions github-actions bot added the frozen-due-to-age Locked due to a period of inactivity. Please open new issues or PRs if more discussion is needed. label Apr 17, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
frozen-due-to-age Locked due to a period of inactivity. Please open new issues or PRs if more discussion is needed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add global remote_write to reduce reptitition
2 participants