prometheus/cmd/promtool
Giedrius Statkevičius 92218ecb9b promtool: add --ignore-unknown-fields
Add --ignore-unknown-fields that ignores unknown fields in rule group
files. There are lots of tools in the ecosystem that "like" to extend
the rule group file structure but they are currently unreadable by
promtool if there's anything extra. The purpose of this flag is so that
we could use the "vanilla" promtool instead of rolling our own.

Some examples of tools/code:

https://github.com/grafana/mimir/blob/main/pkg/mimirtool/rules/rwrulefmt/rulefmt.go
8898eb3cc5/pkg/rules/rules.go (L18-L25)

Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@vinted.com>
2025-01-15 11:34:28 +02:00
..
testdata promtool: add --ignore-unknown-fields 2025-01-15 11:34:28 +02:00
analyze.go enable errorf rule from perfsprint linter 2024-11-06 16:50:36 +01:00
analyze_test.go Parallelize tests in cmd/promtool/ 2024-11-08 21:54:08 +05:30
archive.go Use github.com/klauspost/compress for gzip and zlib 2024-02-22 17:08:15 +00:00
backfill.go enable errorf rule from perfsprint linter 2024-11-06 16:50:36 +01:00
backfill_test.go Parallelize tests in cmd/promtool/ 2024-11-08 21:54:08 +05:30
debug.go refactor (package cmd): move from github.com/pkg/errors to 'errors' and 'fmt' packages (#10733) 2022-05-24 16:58:59 +10:00
main.go promtool: add --ignore-unknown-fields 2025-01-15 11:34:28 +02:00
main_test.go promtool: add --ignore-unknown-fields 2025-01-15 11:34:28 +02:00
metrics.go lint: Revamp our linting rules, mostly around doc comments 2024-08-22 17:36:11 +02:00
query.go Add analyze histograms command to promtool (#12331) 2024-01-10 17:32:36 +01:00
rules.go promtool: add --ignore-unknown-fields 2025-01-15 11:34:28 +02:00
rules_test.go Parallelize tests in cmd/promtool/ 2024-11-08 21:54:08 +05:30
sd.go Scraping: stop storing discovered labels (#15261) 2024-12-21 13:33:08 +00:00
sd_test.go Parallelize tests in cmd/promtool/ 2024-11-08 21:54:08 +05:30
tsdb.go fix promtool analyze block shows metric name with 0 cardinality (#15438) 2024-11-24 17:30:20 +01:00
tsdb_test.go Parallelize tests in cmd/promtool/ 2024-11-08 21:54:08 +05:30
unittest.go promtool: add --ignore-unknown-fields 2025-01-15 11:34:28 +02:00
unittest_test.go promtool: add --ignore-unknown-fields 2025-01-15 11:34:28 +02:00