Merge branch 'docs'

This commit is contained in:
Alexander Zobnin
2017-09-13 10:48:15 +03:00
2 changed files with 147 additions and 49 deletions

View File

@@ -1,32 +1,91 @@
@import url('https://fonts.googleapis.com/css?family=Roboto|Source+Code+Pro');
.wy-side-nav-search, .wy-nav-top {
background-color: #8e3030
background-color: #8e3030;
}
p {
margin-bottom: 24px;
.wy-side-nav-search input[type=text] {
border-radius: 2px;
width: 100%;
border-color: #e3e3e3;
}
/* Content container */
.wy-nav-content {
max-width: 1200px;
}
.rst-content .section {
color: #404040;
font-family: 'Roboto', 'Lato', 'proxima-nova', 'Helvetica Neue', Arial, sans-serif;
}
.rst-content p {
margin-bottom: 16px;
line-height: 24px;
}
.rst-content li {
margin-top: 6px;
margin-bottom: 6px;
line-height: 24px;
}
.rst-content img {
max-width: 80%;
max-height: 800px;
}
.rst-content blockquote {
margin-left: 0px;
max-width: 80%;
margin-left: 0em;
padding: 0 1em;
color: #777;
border-left: 0.25em solid #ddd;
color: #757575;
border-left: 6px solid #e0e0e0;
}
/* Source code highlighting */
code, .rst-content tt {
font-size: 85%;
font-family: 'Source Code Pro', monospace;
font-size: 90%;
color: #404040;
background-color: #f4f4f4;
padding: 1px 5px;
border-radius: 2px;
border-width: 0;
}
.hljs {
font-size: 100%;
max-width: 100%;
/* Colors are from solarized scheme. */
background-color: #fdf6e3;
color: #657b83;
border-width: 0 0 0 4px;
border-color: #eee8d5;
border-left-color: #268bd2;
font-size: 90%;
line-height: 1.5;
padding: 1em 0.5em;
border-radius: 4px;
border-color: #f4f4f4;
padding: 0.5em 1em;
}
.hljs-keyword {
color: #dc322f;
}
.hljs-built_in {
color: #268bd2;
}
.hljs-string {
color: #859900;
}
.hljs-variable {
color: #6c71c4;
}
.btn-neutral:hover {
@@ -36,3 +95,21 @@ code, .rst-content tt {
0px 1px 2px -1px rgba(255,255,255,0.5) inset,
0px -2px 0px 0px rgba(0, 0, 0, 0.2) inset;
}
/* Functions list tweaks */
h3 em {
font-family: 'Source Code Pro', monospace;
line-height: 2;
padding-top: 20px;
font-style: normal;
padding-bottom: 2px;
border-bottom: 2px;
border-bottom-style: solid;
border-bottom-color: #2aa198;
color: #01579b;
}
hr {
margin: 24px 0 48px 0;
}

View File

@@ -1,10 +1,10 @@
Functions reference
===================
Transform
---------
## Transform
### groupBy
### _groupBy_
```
groupBy(interval, function)
@@ -17,8 +17,9 @@ Examples:
groupBy(10m, avg)
groupBy(1h, median)
```
---
### scale
### _scale_
```
scale(factor)
```
@@ -29,22 +30,25 @@ Examples:
scale(100)
scale(0.01)
```
---
### delta
### _delta_
```
delta()
```
Converts absolute values to delta. This function just calculate difference between values. For the per-second
calculation use `rate()`.
---
### rate
### _rate_
```
rate()
```
Calculates the per-second rate of increase of the time series. Resistant to counter reset. Suitable for converting of
growing counters into the per-sercond rate.
---
### movingAverage
### _movingAverage_
```
movingAverage(windowSize)
```
@@ -55,8 +59,9 @@ Examples:
movingAverage(60)
calculates moving average over 60 points (if metric has 1 second resolution it matches 1 minute window)
```
---
### exponentialMovingAverage
### _exponentialMovingAverage_
```
exponentialMovingAverage(windowSize)
```
@@ -79,11 +84,11 @@ Examples:
movingAverage(60)
calculates moving average over 60 points (if metric has 1 second resolution it matches 1 minute window)
```
---
Aggregate
---------
## Aggregate
### aggregateBy
### _aggregateBy_
```
aggregateBy(interval, function)
```
@@ -95,37 +100,44 @@ Examples:
aggregateBy(10m, avg)
aggregateBy(1h, median)
```
---
### sumSeries
### _sumSeries_
```
sumSeries()
```
This will add metrics together and return the sum at each datapoint. This method required interpolation of each timeseries so it may cause high CPU load. Try to combine it with _groupBy()_ function to reduce load.
### average
---
### _average_
```
average(interval)
```
**Deprecated**, use `aggregateBy(interval, avg)` instead.
### min
---
### _min_
```
min(interval)
```
**Deprecated**, use `aggregateBy(interval, min)` instead.
### max
---
### _max_
```
max(interval)
```
**Deprecated**, use `aggregateBy(interval, max)` instead.
---
Filter
---------
## Filter
### top
### _top_
```
top(N, value)
@@ -138,8 +150,9 @@ Examples:
top(10, avg)
top(5, max)
```
---
### bottom
### _bottom_
```
bottom(N, value)
@@ -151,20 +164,22 @@ Examples:
```
bottom(5, avg)
```
---
## Trends
### trendValue
### _trendValue_
```
trendValue(valueType)
```
Specifying type of trend value returned by Zabbix when trends are used (avg, min or max).
---
## Time
### timeShift
### _timeShift_
```
timeShift(interval)
```
@@ -175,10 +190,11 @@ timeShift(24h) - shift metric back in 24h hours
timeShift(-24h) - the same result as for timeShift(24h)
timeShift(+1d) - shift metric forward in 1 day
```
---
## Alias
### setAlias
### _setAlias_
```
setAlias(alias)
```
@@ -189,8 +205,9 @@ Examples:
```
setAlias(load)
```
---
### setAliasByRegex
### _setAliasByRegex_
```
setAliasByRegex(regex)
```
@@ -201,8 +218,9 @@ Examples:
```
setAlias(Zabbix busy [a-zA-Z]+)
```
---
### replaceAlias
### _replaceAlias_
```
replaceAlias(pattern, newAlias)
```
@@ -233,10 +251,11 @@ replaceAlias(/.*CPU (.*) time/, $1) -> system
backend01: CPU system time
replaceAlias(/(.*): CPU (.*) time/, $1 - $2) -> backend01 - system
```
---
## Special
### consolidateBy
### _consolidateBy_
```
consolidateBy(consolidationFunc)
```
@@ -244,3 +263,5 @@ consolidateBy(consolidationFunc)
When a graph is drawn where width of the graph size in pixels is smaller than the number of datapoints to be graphed, plugin consolidates the values to to prevent line overlap. The consolidateBy() function changes the consolidation function from the default of average to one of `sum`, `min`, `max` or `count`.
Valid function names are `sum`, `avg`, `min`, `max` and `count`.
---