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
2f18fc37
Commit
2f18fc37
authored
Jun 15, 2015
by
Julius Volz
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #57 from prometheus/legend-format-filters
Add format filter documentation.
parents
b1e2425e
ca0cd04d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
0 deletions
+21
-0
promdash.md
content/docs/visualization/promdash.md
+21
-0
No files found.
content/docs/visualization/promdash.md
View file @
2f18fc37
...
...
@@ -129,6 +129,9 @@ interpolated version of the given format string. To reference specific label
values in the format string, use double curly braces:
`{{label-name}}`
. For
example:
`{{host}} - cluster {{cluster}}`
.
Format strings support filters. See the Filters section below for a list of
currently available filters, expected inputs, and outputs.
### Link to graph
The "Link to this graph" menu tab allows you to generate a link to a specific
graph. This link will show the graph in a single-widget fullscreen view as it
...
...
@@ -189,6 +192,24 @@ In the example of the host dashboard, the URL could look like this:
http://promdash.somedomain.int/hoststats#!?var.host=myhost
Template variables support filters. See the Filters section below for a list of
currently available filters, expected inputs, and outputs.
### Filters
Filters can be used in all places where variable interpolation is supported,
e.g. in legend format strings or template variables. The format is
`{{variable
| filter}}`
and the following filters are currently available:
-
`toPercent`
: Input:
`0.5`
; Output:
`50%`
-
`toPercentile`
: Input:
`0.5`
; Output:
`50th`
-
`hostnameFqdn`
: Input:
`http://your-prometheus-endpoint.net:1111/`
; Output:
`your-prometheus-endpoint.net:1111`
-
`hostname`
: Input:
`http://your-prometheus-endpoint.net:1111/`
; Output:
`your-prometheus-endpoint`
-
`regex`
: If
`job`
==
`prometheus`
,
`{{job | regex:"pro":"faux"}}`
=>
`fauxmetheus`
Filters are chainable, so
`{{label | filter1 | filter2}}`
will apply
`filter1`
to
`label`
, and then apply
`filter2`
to that result.
## Annotations
PromDash allows you to load timestamped annotations from an external service
...
...
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