diff --git a/docs/configuration/configuration.md b/docs/configuration/configuration.md index d2c4d08186..097668c238 100644 --- a/docs/configuration/configuration.md +++ b/docs/configuration/configuration.md @@ -41,6 +41,7 @@ Generic placeholders are defined as follows: * ``: a string that can take the values `http` or `https` * ``: a regular string * ``: a regular string that is a secret, such as a password +* ``: a string which is template-expanded before usage The other placeholders are specified separately. diff --git a/docs/configuration/recording_rules.md b/docs/configuration/recording_rules.md index 58f9fd91a7..f51bb9cccc 100644 --- a/docs/configuration/recording_rules.md +++ b/docs/configuration/recording_rules.md @@ -12,6 +12,7 @@ evaluated at regular intervals: recording rules and [alerting rules](alerting_rules.md). To include rules in Prometheus, create a file containing the necessary rule statements and have Prometheus load the file via the `rule_files` field in the [Prometheus configuration](configuration.md). +Rule files use YAML. The rule files can be reloaded at runtime by sending `SIGHUP` to the Prometheus process. The changes are only applied if all rule files are well-formatted. @@ -24,7 +25,7 @@ utility tool: ```bash go get github.com/prometheus/prometheus/cmd/promtool -promtool check-rules /path/to/example.rules +promtool check rules /path/to/example.rules.yml ``` When the file is syntactically valid, the checker prints a textual @@ -44,22 +45,74 @@ the original expression every time it is needed. This is especially useful for dashboards, which need to query the same expression repeatedly every time they refresh. -To add a new recording rule, add a line of the following syntax to your rule -file: +Recording and alerting rules exist in a rule group. Rules within a group are +run sequentially at a regular interval. - [{