diff --git a/linux_system/linux_system.yml b/linux_system/linux_system.yml index da0e0fb7..84b4fbbc 100644 --- a/linux_system/linux_system.yml +++ b/linux_system/linux_system.yml @@ -430,14 +430,13 @@ spec: queries: - query: |- option params = { - bucket: "v.bucket" + bucket: "telegraf" } from(bucket: params.bucket) |> range(start: v.timeRangeStart, stop: v.timeRangeStop) |> filter(fn: (r) => r._measurement == "system") |> filter(fn: (r) => r._field == "uptime") - |> filter(fn: (r) => r.host == v.linux_host) |> last() |> map(fn: (r) => ({ _value: float(v: r._value) / 86400.00 })) params: @@ -465,14 +464,13 @@ spec: queries: - query: |- option params = { - bucket: "v.bucket" + bucket: "telegraf" } from(bucket: params.bucket) |> range(start: v.timeRangeStart, stop: v.timeRangeStop) |> filter(fn: (r) => r._measurement == "disk") |> 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 @@ -498,14 +496,13 @@ spec: queries: - query: |- option params = { - bucket: "v.bucket" + bucket: "telegraf" } from(bucket: params.bucket) |> range(start: v.timeRangeStart, stop: v.timeRangeStop) |> filter(fn: (r) => r._measurement == "diskio") |> 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 @@ -524,14 +521,13 @@ spec: queries: - query: |- option params = { - bucket: "v.bucket" + bucket: "telegraf" } from(bucket: params.bucket) |> range(start: v.timeRangeStart, stop: v.timeRangeStop) |> filter(fn: (r) => r._measurement == "system") |> filter(fn: (r) => r._field == "n_cpus") - |> filter(fn: (r) => r.host == v.linux_host) |> last() params: - key: bucket @@ -559,7 +555,7 @@ spec: queries: - query: |- option params = { - bucket: "v.bucket" + bucket: "telegraf" } from(bucket: params.bucket) @@ -567,7 +563,6 @@ spec: |> filter(fn: (r) => r._measurement == "cpu") |> filter(fn: (r) => r._field == "usage_user" or r._field == "usage_system" or r._field == "usage_idle") |> 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 @@ -594,14 +589,13 @@ spec: queries: - query: |- option params = { - bucket: "v.bucket" + bucket: "telegraf" } from(bucket: params.bucket) |> range(start: v.timeRangeStart, stop: v.timeRangeStop) |> filter(fn: (r) => r._measurement == "net") |> 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 @@ -623,14 +617,13 @@ spec: queries: - query: |- option params = { - bucket: "v.bucket" + bucket: "telegraf" } from(bucket: params.bucket) |> range(start: v.timeRangeStart, stop: v.timeRangeStop) |> filter(fn: (r) => r._measurement == "system") |> filter(fn: (r) => r._field == "load1") - |> filter(fn: (r) => r.host == v.linux_host) |> last() params: - key: bucket @@ -657,14 +650,13 @@ spec: queries: - query: |- option params = { - bucket: "v.bucket" + bucket: "telegraf" } from(bucket: params.bucket) |> range(start: v.timeRangeStart, stop: v.timeRangeStop) |> filter(fn: (r) => r._measurement == "system") |> 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 @@ -690,14 +682,13 @@ spec: queries: - query: |- option params = { - bucket: "v.bucket" + bucket: "telegraf" } from(bucket: params.bucket) |> range(start: v.timeRangeStart, stop: v.timeRangeStop) |> filter(fn: (r) => r._measurement == "processes") |> 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 @@ -717,14 +708,13 @@ spec: queries: - query: |- option params = { - bucket: "v.bucket" + bucket: "telegraf" } from(bucket: params.bucket) |> range(start: v.timeRangeStart, stop: v.timeRangeStop) |> filter(fn: (r) => r._measurement == "mem") |> filter(fn: (r) => r._field == "total") - |> 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: @@ -766,14 +756,13 @@ spec: queries: - query: |- option params = { - bucket: "v.bucket" + bucket: "telegraf" } from(bucket: params.bucket) |> range(start: v.timeRangeStart, stop: v.timeRangeStop) |> filter(fn: (r) => r._measurement == "mem") |> 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 @@ -800,23 +789,18 @@ spec: queries: - query: |- option params = { - bucket: "v.bucket" + bucket: "telegraf" } from(bucket: params.bucket) |> range(start: v.timeRangeStart, stop: v.timeRangeStop) |> filter(fn: (r) => r._measurement == "swap") |> 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