From 08b76cb26fc05a918c55ea4eb41b3e01706406f5 Mon Sep 17 00:00:00 2001 From: Roman Khavronenko Date: Thu, 20 Aug 2020 22:36:38 +0100 Subject: [PATCH] vmalert: update `-rule` flag description to enforce quotes using (#709) Description for `-rule` flag uses as example specific chars like asterisks which could be interpreted wrong by different shells. To avoid this, description now contains quoted flag values. See also #708 --- app/vmalert/README.md | 4 ++-- app/vmalert/main.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/vmalert/README.md b/app/vmalert/README.md index 05adef0581..051905c5b8 100644 --- a/app/vmalert/README.md +++ b/app/vmalert/README.md @@ -293,8 +293,8 @@ The shortlist of configuration flags is the following: Path to the file with alert rules. Supports patterns. Flag can be specified multiple times. Examples: - -rule /path/to/file. Path to a single file with alerting rules - -rule dir/*.yaml -rule /*.yaml. Relative path to all .yaml files in "dir" folder, + -rule="/path/to/file". Path to a single file with alerting rules + -rule="dir/*.yaml" -rule="/*.yaml". Relative path to all .yaml files in "dir" folder, absolute path to all .yaml files in root. Rule files may contain %{ENV_VAR} placeholders, which are substituted by the corresponding env vars. Supports array of values separated by comma or specified via multiple flags. diff --git a/app/vmalert/main.go b/app/vmalert/main.go index 44edc2ef42..a2252b5532 100644 --- a/app/vmalert/main.go +++ b/app/vmalert/main.go @@ -29,8 +29,8 @@ var ( rulePath = flagutil.NewArray("rule", `Path to the file with alert rules. Supports patterns. Flag can be specified multiple times. Examples: - -rule /path/to/file. Path to a single file with alerting rules - -rule dir/*.yaml -rule /*.yaml. Relative path to all .yaml files in "dir" folder, + -rule="/path/to/file". Path to a single file with alerting rules + -rule="dir/*.yaml" -rule="/*.yaml". Relative path to all .yaml files in "dir" folder, absolute path to all .yaml files in root. Rule files may contain %{ENV_VAR} placeholders, which are substituted by the corresponding env vars.`)