Skip to content

Commit

Permalink
add params section
Browse files Browse the repository at this point in the history
  • Loading branch information
hoorayimhelping committed Sep 11, 2020
1 parent 5ceda8c commit 30bdb4e
Showing 1 changed file with 56 additions and 0 deletions.
56 changes: 56 additions & 0 deletions linux_system/linux_system.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,10 @@ spec:
}
import "influxdata/influxdb/v1"
v1.measurementTagValues(bucket: params.bucket, measurement: "cpu", tag: "host")
params:
- key: bucket
default: "v.bucket"
type: string
type: query
---
apiVersion: influxdata.com/v2alpha1
Expand Down Expand Up @@ -436,6 +440,10 @@ spec:
|> filter(fn: (r) => r.host == v.linux_host)
|> last()
|> map(fn: (r) => ({ _value: float(v: r._value) / 86400.00 }))
params:
- key: bucket
default: "v.bucket"
type: string
suffix: ' days'
width: 3
yPos: 1
Expand Down Expand Up @@ -466,6 +474,10 @@ spec:
|> filter(fn: (r) => r._field == "used_percent")
|> filter(fn: (r) => r.host == v.linux_host)
|> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)
params:
- key: bucket
default: "v.bucket"
type: string
width: 3
yPos: 2
- axes:
Expand Down Expand Up @@ -495,6 +507,10 @@ spec:
|> filter(fn: (r) => r._field == "read_bytes" or r._field == "write_bytes")
|> filter(fn: (r) => r.host == v.linux_host)
|> derivative(unit: v.windowPeriod, nonNegative: false)
params:
- key: bucket
default: "v.bucket"
type: string
width: 3
yPos: 5
- colors:
Expand All @@ -517,6 +533,10 @@ spec:
|> filter(fn: (r) => r._field == "n_cpus")
|> filter(fn: (r) => r.host == v.linux_host)
|> last()
params:
- key: bucket
default: "v.bucket"
type: string
suffix: ' cpus'
width: 2
xPos: 3
Expand Down Expand Up @@ -549,6 +569,10 @@ spec:
|> filter(fn: (r) => r.cpu == "cpu-total")
|> filter(fn: (r) => r.host == v.linux_host)
|> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)
params:
- key: bucket
default: "v.bucket"
type: string
width: 3
xPos: 3
yPos: 2
Expand Down Expand Up @@ -579,6 +603,10 @@ spec:
|> filter(fn: (r) => r._field == "bytes_recv" or r._field == "bytes_sent")
|> filter(fn: (r) => r.host == v.linux_host)
|> derivative(unit: v.windowPeriod, nonNegative: false)
params:
- key: bucket
default: "v.bucket"
type: string
width: 3
xCol: _time
xPos: 3
Expand All @@ -604,6 +632,10 @@ spec:
|> filter(fn: (r) => r._field == "load1")
|> filter(fn: (r) => r.host == v.linux_host)
|> last()
params:
- key: bucket
default: "v.bucket"
type: string
width: 2
xPos: 5
yPos: 1
Expand Down Expand Up @@ -634,6 +666,10 @@ spec:
|> filter(fn: (r) => r._field == "load1" or r._field == "load5" or r._field == "load15")
|> filter(fn: (r) => r.host == v.linux_host)
|> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)
params:
- key: bucket
default: "v.bucket"
type: string
width: 3
xPos: 6
yPos: 2
Expand Down Expand Up @@ -663,6 +699,10 @@ spec:
|> filter(fn: (r) => r._field == "running" or r._field == "blocked" or r._field == "idle" or r._field == "unknown")
|> filter(fn: (r) => r.host == v.linux_host)
|> aggregateWindow(every: v.windowPeriod, fn: max)
params:
- key: bucket
default: "v.bucket"
type: string
width: 3
xPos: 6
yPos: 5
Expand All @@ -687,6 +727,10 @@ spec:
|> filter(fn: (r) => r.host == v.linux_host)
|> last()
|> map(fn: (r) => ({r with _value: float(v: r._value) / 1024.0 / 1024.0 / 1024.0}))
params:
- key: bucket
default: "v.bucket"
type: string
suffix: ' GB'
width: 2
xPos: 7
Expand Down Expand Up @@ -731,6 +775,10 @@ spec:
|> filter(fn: (r) => r._field == "used_percent")
|> filter(fn: (r) => r.host == v.linux_host)
|> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)
params:
- key: bucket
default: "v.bucket"
type: string
suffix: '%'
width: 3
xPos: 9
Expand Down Expand Up @@ -761,6 +809,14 @@ spec:
|> filter(fn: (r) => r._field == "total" or r._field == "used")
|> filter(fn: (r) => r.host == v.linux_host)
|> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)
params:
- key: bucket
default: "v.bucket"
type: string
params:
- key: bucket
default: "v.bucket"
type: string
width: 3
xPos: 9
yPos: 5
Expand Down

0 comments on commit 30bdb4e

Please sign in to comment.