Skip to content

Commit

Permalink
feat: prometheus fallback_scrape_protocol support (#4373)
Browse files Browse the repository at this point in the history
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
KetchupBomb and pre-commit-ci[bot] authored Jan 21, 2025
1 parent f2ebca8 commit db84bf0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/schemas/json/prometheus.json
Original file line number Diff line number Diff line change
Expand Up @@ -1152,6 +1152,17 @@
"$ref": "#/definitions/duration",
"description": "Per-scrape timeout when scraping this job. Defaults to `global.scrape_timeout`."
},
"fallback_scrape_protocol": {
"description": "Fallback protocol to use if a scrape returns blank, unparsable, or otherwise invalid Content-Type.",
"type": ["string", "null"],
"enum": [
"OpenMetricsText0.0.1",
"OpenMetricsText1.0.0",
"PrometheusProto",
"PrometheusText0.0.4",
"PrometheusText1.0.0"
]
},
"metrics_path": {
"description": "The HTTP resource path on which to fetch metrics from targets.",
"type": ["string", "null"],
Expand Down
1 change: 1 addition & 0 deletions src/test/prometheus/prometheus.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@
"scrape_configs": [
{
"bearer_token_file": "valid_token_file",
"fallback_scrape_protocol": "PrometheusText0.0.4",
"file_sd_configs": [
{
"files": ["foo/*.slow.json", "foo/*.slow.yml", "single/file.yml"],
Expand Down

0 comments on commit db84bf0

Please sign in to comment.