Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
docs
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
docs
Commits
d95b8124
Commit
d95b8124
authored
May 08, 2015
by
Fabian Reinartz
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #78 from stapelberg/patch-2
Fix examples: comments start with #, not //
parents
bb53c6b3
0b4e14ee
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
rules.md
content/docs/querying/rules.md
+6
-6
No files found.
content/docs/querying/rules.md
View file @
d95b8124
...
...
@@ -47,10 +47,10 @@ file:
Some examples:
//
Saving the per-job HTTP in-progress request count as a new set of time series:
#
Saving the per-job HTTP in-progress request count as a new set of time series:
job:http_inprogress_requests:sum = sum(http_inprogress_requests) by (job)
//
Drop or rewrite labels in the result time series:
#
Drop or rewrite labels in the result time series:
new_time series{label_to_change="new_value",label_to_drop=""} = old_time series
Recording rules are evaluated at the interval specified by the
...
...
@@ -90,14 +90,14 @@ for e.g. an email subject line), while the `DESCRIPTION` clause should provide
a longer description. Both string fields allow the inclusion of template
variables derived from the firing vector elements of the alert:
//
To insert a firing element's label values:
#
To insert a firing element's label values:
{{$labels.<labelname>}}
//
To insert the numeric expression value of the firing element:
#
To insert the numeric expression value of the firing element:
{{$value}}
Examples:
//
Alert for any instance that is unreachable for >5 minutes.
#
Alert for any instance that is unreachable for >5 minutes.
ALERT InstanceDown
IF up == 0
FOR 5m
...
...
@@ -107,7 +107,7 @@ Examples:
SUMMARY "Instance {{$labels.instance}} down"
DESCRIPTION "{{$labels.instance}} of job {{$labels.job}} has been down for more than 5 minutes."
//
Alert for any instance that have a median request latency >1s.
#
Alert for any instance that have a median request latency >1s.
ALERT ApiHighRequestLatency
IF api_http_request_latencies_ms{quantile="0.5"} > 1000
FOR 1m
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment