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

use remote_write and scrape_config validations from Prometheus #92

Merged
merged 3 commits into from
May 27, 2020

Conversation

rfratto
Copy link
Member

@rfratto rfratto commented May 22, 2020

Prometheus was doing some validations on the remote_write and scrape_config sections per config that we weren't doing yet. To make this a little easier, ApplyDefaults and Validate have been merged.

The scraping service PutConfiguration endpoint will now apply the defaults to the config before passing it through to the KV store; invalid configs will be prevented from reaching the KV store and errors will be returned to the client.

When migrating to this change, if any invalid configs exist in the KV store, the Agent will refuse to start them and log an error. The configs in the KV store should be updated to fix the invalid settings before the Agent will be able to run it.

Fixes #80.

Prometheus was doing some validations on the remote_write and
scrape_config sections per config that we weren't doing yet. To make
this a little easier, ApplyDefaults and Validate have been merged.

The scraping service PutConfiguration endpoint will now apply the
defaults to the config before passing it through to the KV store;
invalid configs will be prevented from reaching the KV store and errors
will be returned to the client.

When migrating to this change, if any invalid configs exist in the KV
store, the Agent will refuse to start them and log an error. The configs
in the KV store should be updated to fix the invalid settings before the
Agent will be able to run it.

Fixes #80.
@rfratto rfratto requested a review from hoenn May 22, 2020 15:59
@rfratto rfratto mentioned this pull request May 26, 2020
@rfratto rfratto merged commit 2d590fd into grafana:master May 27, 2020
@rfratto rfratto deleted the prometheus-config-validations branch May 27, 2020 12:38
rfratto referenced this pull request in rfratto/agent May 27, 2020
PR #92 accidentally removed unmarshaling the default config values into the
instance configs.
rfratto added a commit that referenced this pull request May 27, 2020
* add back in instance config default values on unmarshal

PR #92 accidentally removed unmarshaling the default config values into the
instance configs.

* add more tests and a new validation

* fix test failures
mattdurham pushed a commit that referenced this pull request Nov 11, 2021
* use remote_write and scrape_config validations from Prometheus

Prometheus was doing some validations on the remote_write and
scrape_config sections per config that we weren't doing yet. To make
this a little easier, ApplyDefaults and Validate have been merged.

The scraping service PutConfiguration endpoint will now apply the
defaults to the config before passing it through to the KV store;
invalid configs will be prevented from reaching the KV store and errors
will be returned to the client.

When migrating to this change, if any invalid configs exist in the KV
store, the Agent will refuse to start them and log an error. The configs
in the KV store should be updated to fix the invalid settings before the
Agent will be able to run it.

Fixes #80.

* add tests for new validations

* s/ok/exists
mattdurham pushed a commit that referenced this pull request Nov 11, 2021
* add back in instance config default values on unmarshal

PR #92 accidentally removed unmarshaling the default config values into the
instance configs.

* add more tests and a new validation

* fix test failures
wildum pushed a commit that referenced this pull request Apr 9, 2024
* internal: migrate to standard Grafana stability definitions

This commit changes the stability levels to align with [Grafana's
standard set][1]:

* Experimental / `experimental` (unchanged)
* Public preview / `public-preview` (previously "beta")
* Generally available / `generally-available` (previously "stable")

[1]: https://grafana.com/docs/release-life-cycle/

* internal/featuregate: explain why Private preview is not included
@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 May 3, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 3, 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.

Instance configs missing Prometheus validation checks
2 participants