@@ -71,28 +71,47 @@ parser {
7171}
7272```
7373
74- - ` schema ` - rule file schema to use, valid values are ` prometheus ` and ` thanos ` .
75- Setting it to ` prometheus ` means that pint will assume that all rules have the schema
74+ - ` schema ` - rule file schema to use when using ` strict ` parser mode, valid values are ` prometheus ` and ` thanos ` .
75+ This option is has no effect when ` relaxed ` mode is enabled, see below.
76+ Setting it to ` prometheus ` means that pint will assume that all rule files have the schema
7677 as defined in [ alerting rules] ( https://prometheus.io/docs/prometheus/latest/configuration/alerting_rules/ )
7778 and [ recording rules] ( https://prometheus.io/docs/prometheus/latest/configuration/recording_rules/ )
7879 Prometheus docs.
7980 Setting it to ` thanos ` will tell pint to use the schema as defined
80- in [ Thanos Rule] ( https://thanos.io/tip/components/rule.md/ ) docs.
81+ in [ Thanos Rule] ( https://thanos.io/tip/components/rule.md/ ) docs, which currently allows for setting
82+ an extra key on the rule group object - ` partial_response_strategy ` .
8183 Default value is ` prometheus ` .
8284- ` include ` - list of file patterns to check when running checks. Only files
8385 matching those regexp rules will be checked, other modified files will be ignored.
8486- ` exclude ` - list of file patterns to ignore when running checks.
8587 This option takes precedence over ` include ` , so if a file path matches both
8688 ` include ` & ` exclude ` patterns, it will be excluded.
8789- ` relaxed ` - by default, pint will parse all files in strict mode, where
88- all rule files must have the exact syntax Prometheus expects:
90+ all rule files must have the exact syntax Prometheus or Thanos expects:
91+
92+ When using ` schema: prometheus ` (default):
93+
94+ ``` yaml
95+ groups :
96+ - name : example
97+ rules :
98+ - record : ...
99+ expr : ...
100+ - alert : ...
101+ expr : ...
102+ ` ` `
103+
104+ When using ` schema: thanos`:
89105
90106 ` ` ` yaml
91107 groups:
92108 - name: example
109+ partial_response_strategy: abort
93110 rules:
94111 - record: ...
95112 expr: ...
113+ - alert: ...
114+ expr: ...
96115 ` ` `
97116
98117 If you're using pint to lint rules that are embedded inside a different structure
0 commit comments