mirror of
https://github.com/prometheus/prometheus.git
synced 2025-01-30 15:12:27 -08:00
Merge pull request #8493 from prometheus/beorn7/doc
Recommend to get promtool from a binary distribution.
This commit is contained in:
commit
6393b48929
|
@ -20,14 +20,16 @@ process. The changes are only applied if all rule files are well-formatted.
|
||||||
## Syntax-checking rules
|
## Syntax-checking rules
|
||||||
|
|
||||||
To quickly check whether a rule file is syntactically correct without starting
|
To quickly check whether a rule file is syntactically correct without starting
|
||||||
a Prometheus server, install and run Prometheus's `promtool` command-line
|
a Prometheus server, you can use Prometheus's `promtool` command-line utility
|
||||||
utility tool:
|
tool:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
go get github.com/prometheus/prometheus/cmd/promtool
|
|
||||||
promtool check rules /path/to/example.rules.yml
|
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
|
When the file is syntactically valid, the checker prints a textual
|
||||||
representation of the parsed rules to standard output and then exits with
|
representation of the parsed rules to standard output and then exits with
|
||||||
a `0` return status.
|
a `0` return status.
|
||||||
|
|
Loading…
Reference in a new issue