Recommend to get promtool from a binary distribution.
Rather than compile it yourself, which doesn't work as shown anymore because of Go Modules. Signed-off-by: beorn7 <beorn@grafana.com>
This commit is contained in:
parent
adcc5b50f7
commit
ae900a117f
|
@ -20,14 +20,16 @@ process. The changes are only applied if all rule files are well-formatted.
|
|||
## Syntax-checking rules
|
||||
|
||||
To quickly check whether a rule file is syntactically correct without starting
|
||||
a Prometheus server, install and run Prometheus's `promtool` command-line
|
||||
utility tool:
|
||||
a Prometheus server, you can use Prometheus's `promtool` command-line utility
|
||||
tool:
|
||||
|
||||
```bash
|
||||
go get github.com/prometheus/prometheus/cmd/promtool
|
||||
promtool check rules /path/to/example.rules.yml
|
||||
```
|
||||
|
||||
The `promtool` binary is part of the `prometheus` archive offered on the
|
||||
project's [download page](https://prometheus.io/download/).
|
||||
|
||||
When the file is syntactically valid, the checker prints a textual
|
||||
representation of the parsed rules to standard output and then exits with
|
||||
a `0` return status.
|
||||
|
|
Loading…
Reference in New Issue