Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
24ae9cef
Commit
24ae9cef
authored
Apr 17, 2018
by
Daniel Lee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
docs: describes new variable formatting syntax
Fixes #11388 Ref #11141
parent
4ddd15d9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
0 deletions
+21
-0
docs/sources/reference/templating.md
+21
-0
No files found.
docs/sources/reference/templating.md
View file @
24ae9cef
...
@@ -36,6 +36,27 @@ interpolation the variable value might be **escaped** in order to conform to the
...
@@ -36,6 +36,27 @@ interpolation the variable value might be **escaped** in order to conform to the
For example, a variable used in a regex expression in an InfluxDB or Prometheus query will be regex escaped. Read the data source specific
For example, a variable used in a regex expression in an InfluxDB or Prometheus query will be regex escaped. Read the data source specific
documentation article for details on value escaping during interpolation.
documentation article for details on value escaping during interpolation.
### Advanced Formatting Options
In Grafana 5.0, an additional option was added to control the formatting of the interpolation.
Syntax:
`${var_name:option}`
Filter Option | Example | Raw | Interpolated | Description
------------ | ------------- | ------------- | ------------- | -------------
`glob`
| ${servers:glob} |
`'test1', 'test2'`
|
`{test1,test2}`
| (Default) Formats multi-value variable into a glob (for Graphite queries)
`regex`
| ${servers:regex} |
`'test.', 'test2'`
|
`(test\\.|test2)`
| Formats multi-value variable into a regex string
`pipe`
| ${servers:pipe} |
`'test.', 'test2'`
|
`test.|test2`
| Formats multi-value variable into a pipe-separated string
`csv`
| ${servers:csv} |
`'test1', 'test2'`
|
`test1,test2`
| Formats multi-value variable as a comma-separated string (requires Grafana 5.1)
`distributed`
| ${servers:distributed} |
`'test1', 'test2'`
|
`test1,servers=test2`
| Formats multi-value variable in custom format for OpenTSDB.
`lucene`
| ${servers:lucene} |
`'test', 'test2'`
|
`("test" OR "test2")`
| Formats multi-value variable as a lucene expression.
Test the formatting options on the
[
Grafana Play site
](
http://play.grafana.org/d/cJtIfcWiz/template-variable-formatting-options?orgId=1
)
.
If any invalid formatting option is specified, then
`glob`
is the default/fallback option.
An alternative syntax is
`[[var_name:option]]`
.
### Variable options
### Variable options
A variable is presented as a dropdown select box at the top of the dashboard. It has a current value and a set of
**options**
. The
**options**
A variable is presented as a dropdown select box at the top of the dashboard. It has a current value and a set of
**options**
. The
**options**
...
...
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