-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix prometheusreceiver TA/scrape_config validation logic
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
- Loading branch information
Showing
4 changed files
with
65 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
change_type: 'bug_fix' | ||
component: 'prometheusreceiver' | ||
note: Fix configuration validation to allow specification of Target Allocator configuration without providing scrape configurations | ||
issues: [30135] | ||
subtext: | ||
change_logs: [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
...ver/prometheusreceiver/testdata/invalid-config-prometheus-non-existent-scrape-config.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
prometheus: | ||
prometheus/withConfigAndTA: | ||
target_allocator: | ||
endpoint: http://localhost:8080 | ||
interval: 30s | ||
collector_id: collector-1 | ||
config: | ||
global: | ||
scrape_interval: 30s | ||
prometheus/withOnlyTA: | ||
target_allocator: | ||
endpoint: http://localhost:8080 | ||
interval: 30s | ||
collector_id: collector-1 | ||
prometheus/withOnlyScrape: | ||
config: | ||
scrape_configs: | ||
- job_name: 'demo' | ||
scrape_interval: 5s |