cloudflare/pint
Publicmirrored fromhttps://github.com/cloudflare/pintAvailable
docs/checks/promql/syntax.md
54lines · modecode
| 1 | --- |
| 2 | layout: default |
| 3 | parent: Checks |
| 4 | grand_parent: Documentation |
| 5 | --- |
| 6 | |
| 7 | # promql/syntax |
| 8 | |
| 9 | This is the most basic check that will report any syntax errors in a PromQL |
| 10 | query on any rule. |
| 11 | |
| 12 | ## Configuration |
| 13 | |
| 14 | This check doesn't have any configuration options. |
| 15 | |
| 16 | ## How to enable it |
| 17 | |
| 18 | This check is enabled by default. |
| 19 | |
| 20 | ## How to disable it |
| 21 | |
| 22 | You can disable this check globally by adding this config block: |
| 23 | |
| 24 | ```js |
| 25 | checks { |
| 26 | disabled = ["promql/syntax"] |
| 27 | } |
| 28 | ``` |
| 29 | |
| 30 | You can also disable it for all rules inside given file by adding |
| 31 | a comment anywhere in that file. Example: |
| 32 | |
| 33 | ```yaml |
| 34 | # pint file/disable promql/syntax |
| 35 | ``` |
| 36 | |
| 37 | Or you can disable it per rule by adding a comment to it. Example: |
| 38 | |
| 39 | ```yaml |
| 40 | # pint disable promql/syntax |
| 41 | ``` |
| 42 | |
| 43 | ## How to snooze it |
| 44 | |
| 45 | You can disable this check until given time by adding a comment to it. Example: |
| 46 | |
| 47 | ```yaml |
| 48 | # pint snooze $TIMESTAMP promql/syntax |
| 49 | ``` |
| 50 | |
| 51 | Where `$TIMESTAMP` is either use [RFC3339](https://www.rfc-editor.org/rfc/rfc3339) |
| 52 | formatted or `YYYY-MM-DD`. |
| 53 | Adding this comment will disable `promql/syntax` *until* `$TIMESTAMP`, after that |
| 54 | check will be re-enabled. |
| 55 | |