From 646e33242e2de9045346cd507b16026e12f98463 Mon Sep 17 00:00:00 2001 From: Goutham Veeramachaneni Date: Wed, 1 Nov 2017 21:05:50 +0530 Subject: [PATCH] docs: Fix minor issues with the docs. (#3389) Signed-off-by: Goutham Veeramachaneni --- docs/configuration/configuration.md | 6 +++--- docs/configuration/recording_rules.md | 5 ++--- docs/configuration/template_examples.md | 21 +++++++++++---------- docs/getting_started.md | 6 +++--- 4 files changed, 19 insertions(+), 19 deletions(-) diff --git a/docs/configuration/configuration.md b/docs/configuration/configuration.md index 097668c238..abfd3f79c4 100644 --- a/docs/configuration/configuration.md +++ b/docs/configuration/configuration.md @@ -12,17 +12,17 @@ configuration file defines everything related to scraping [jobs and their instances](https://prometheus.io/docs/concepts/jobs_instances/), as well as which [rule files to load](recording_rules.md#configuring-rules). -To view all available command-line flags, run `prometheus -h`. +To view all available command-line flags, run `./prometheus -h`. Prometheus can reload its configuration at runtime. If the new configuration is not well-formed, the changes will not be applied. A configuration reload is triggered by sending a `SIGHUP` to the Prometheus process or -sending a HTTP POST request to the `/-/reload` endpoint. +sending a HTTP POST request to the `/-/reload` endpoint (when the `--web.enable-lifecycle` flag is enabled). This will also reload any configured rule files. ## Configuration file -To specify which configuration file to load, use the `-config.file` flag. +To specify which configuration file to load, use the `--config.file` flag. The file is written in [YAML format](http://en.wikipedia.org/wiki/YAML), defined by the scheme described below. diff --git a/docs/configuration/recording_rules.md b/docs/configuration/recording_rules.md index f51bb9cccc..7c29f1dbfc 100644 --- a/docs/configuration/recording_rules.md +++ b/docs/configuration/recording_rules.md @@ -32,9 +32,8 @@ 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. -If there are any syntax errors, it prints an error message to standard error -and exits with a `1` return status. On invalid input arguments the exit status -is `2`. +If there are any syntax errors or invalid input arguments, it prints an error +message to standard error and exits with a `1` return status. ## Recording rules diff --git a/docs/configuration/template_examples.md b/docs/configuration/template_examples.md index 1710c99f89..5737c43288 100644 --- a/docs/configuration/template_examples.md +++ b/docs/configuration/template_examples.md @@ -13,16 +13,17 @@ data, etc. The Prometheus templating language is based on the ## Simple alert field templates - ALERT InstanceDown - IF up == 0 - FOR 5m - LABELS { - severity="page" - } - ANNOTATIONS { - summary = "Instance {{$labels.instance}} down", - description = "{{$labels.instance}} of job {{$labels.job}} has been down for more than 5 minutes.", - } +``` +alert: InstanceDown +expr: up == 0 +for: 5m +labels: + - severity: page + +annotations: + - summary: "Instance {{$labels.instance}} down" + - description: "{{$labels.instance}} of job {{$labels.job}} has been down for more than 5 minutes." +``` Alert field templates will be executed during every rule iteration for each alert that fires, so keep any queries and templates lightweight. If you have a diff --git a/docs/getting_started.md b/docs/getting_started.md index 028c5695ee..5414c47808 100644 --- a/docs/getting_started.md +++ b/docs/getting_started.md @@ -119,11 +119,11 @@ For more about the expression language, see the To graph expressions, navigate to http://localhost:9090/graph and use the "Graph" tab. -For example, enter the following expression to graph the per-second rate of all -storage chunk operations happening in the self-scraped Prometheus: +For example, enter the following expression to graph the per-second rate of chunks +being created in the self-scraped Prometheus: ``` -rate(prometheus_local_storage_chunk_ops_total[1m]) +rate(prometheus_tsdb_head_chunks_created_total[1m]) ``` Experiment with the graph range parameters and other settings.