forked from influxdata/kapacitor
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request influxdata#1619 from influxdata/md-all-nodes
Add example of all nodes in load tasks style dir
- Loading branch information
Showing
24 changed files
with
219 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
dbrp "telegraf"."autogen" | ||
|
||
stream | ||
|from() | ||
.measurement('cpu') | ||
.groupBy(*) | ||
|alert() | ||
.crit(lambda: "usage_user" > 80) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
dbrp "telegraf"."autogen" | ||
|
||
batch | ||
|query('SELECT mean("usage_user") FROM "telegraf"."autogen"."cpu"') | ||
.period(1m) | ||
.every(10s) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
dbrp "telegraf"."autogen" | ||
|
||
stream | ||
|from() | ||
.measurement('cpu') | ||
.groupBy(*) | ||
|combine(lambda: "cpu" == 'cpu-total', lambda: TRUE) | ||
.as('total', 'cpu') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
dbrp "telegraf"."autogen" | ||
|
||
stream | ||
|from() | ||
.measurement('cpu') | ||
.groupBy(*) | ||
|default() | ||
.tag('sweet_new_tag', 'this_is') | ||
.field('value', 10.9) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
dbrp "telegraf"."autogen" | ||
|
||
stream | ||
|from() | ||
.measurement('cpu') | ||
.groupBy(*) | ||
|delete() | ||
.tag('cpu') | ||
.field('usuage_idle') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
dbrp "telegraf"."autogen" | ||
|
||
stream | ||
|from() | ||
.measurement('cpu') | ||
|eval(lambda: 100.0 - "usage_idle") | ||
.as('usage_not_idle') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
dbrp "telegraf"."autogen" | ||
|
||
stream | ||
|from() | ||
.measurement('cpu') | ||
|flatten() | ||
.on('cpu') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
dbrp "telegraf"."autogen" | ||
|
||
stream | ||
|from() | ||
.measurement('system') | ||
|groupBy(*) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
dbrp "loopback"."autogen" | ||
|
||
stream | ||
|from() | ||
.measurement('system') | ||
.groupBy(*) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
dbrp "telegraf"."autogen" | ||
|
||
stream | ||
|from() | ||
.measurement('system') | ||
|window() | ||
.period(1m) | ||
.every(10s) | ||
|httpOut('data') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
dbrp "telegraf"."autogen" | ||
|
||
stream | ||
|from() | ||
.measurement('system') | ||
|window() | ||
.period(1m) | ||
.every(10s) | ||
|httpPost('http://localhost:8080/example') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
dbrp "telegraf"."autogen" | ||
|
||
stream | ||
|from() | ||
.measurement('system') | ||
|window() | ||
.period(1m) | ||
.every(10s) | ||
|mean('load1') | ||
.as('load1') | ||
|influxDBOut() | ||
.database('mydb') | ||
.measurement('derived_system') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
dbrp "telegraf"."autogen" | ||
|
||
var cpu = stream | ||
|from() | ||
.measurement('cpu') | ||
.groupBy(*) | ||
|window() | ||
.period(30s) | ||
.every(10s) | ||
.align() | ||
|mean('usage_user') | ||
.as('value') | ||
|
||
var mem = stream | ||
|from() | ||
.measurement('mem') | ||
.groupBy(*) | ||
|window() | ||
.period(30s) | ||
.every(10s) | ||
.align() | ||
|mean('free') | ||
.as('value') | ||
|
||
cpu | ||
|join(mem) | ||
.as('cpu', 'mem') | ||
|eval(lambda: "cpu.value" / "mem.value") | ||
.as('cpu_mem_free_ratio') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
dbrp "telegraf"."autogen" | ||
|
||
stream | ||
|from() | ||
.measurement('system') | ||
.groupBy(*) | ||
|log() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
dbrp "telegraf"."autogen" | ||
|
||
stream | ||
|from() | ||
.measurement('system') | ||
.groupBy(*) | ||
|kapacitorLoopback() | ||
.database('loopback') | ||
.retentionPolicy('autogen') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
dbrp "telegraf"."autogen" | ||
|
||
stream | ||
|from() | ||
.measurement('cpu') | ||
.groupBy('host') | ||
|sample(3) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
dbrp "telegraf"."autogen" | ||
|
||
stream | ||
|from() | ||
.measurement('cpu') | ||
.groupBy('host') | ||
|shift(1m) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
dbrp "telegraf"."autogen" | ||
|
||
stream | ||
|from() | ||
.measurement('cpu') | ||
|where(lambda: "cpu" == 'cpu-total') | ||
|groupBy('host') | ||
|stateCount(lambda: "usage_idle" <= 10) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
dbrp "telegraf"."autogen" | ||
|
||
stream | ||
|from() | ||
.measurement('cpu') | ||
|where(lambda: "cpu" == 'cpu-total') | ||
|groupBy('host') | ||
|stateDuration(lambda: "usage_idle" <= 10) | ||
.unit(1m) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
dbrp "telegraf"."autogen" | ||
|
||
stream | ||
|from() | ||
.measurement('cpu') | ||
.groupBy('host') | ||
|stats(30s) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
dbrp "telegraf"."autogen" | ||
|
||
stream | ||
|from() | ||
.measurement('cpu') | ||
.groupBy('host') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
dbrp "telegraf"."autogen" | ||
|
||
var cpu = stream | ||
|from() | ||
.measurement('cpu') | ||
|
||
var mem = stream | ||
|from() | ||
.measurement('mem') | ||
|
||
var system = stream | ||
|from() | ||
.measurement('system') | ||
|
||
cpu | ||
|union(mem, system) | ||
.rename('stats') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
dbrp "telegraf"."autogen" | ||
|
||
stream | ||
|from() | ||
.measurement('cpu') | ||
.groupBy('host') | ||
|where(lambda: "cpu" == 'cpu-total') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
dbrp "telegraf"."autogen" | ||
|
||
stream | ||
|from() | ||
.measurement('cpu') | ||
.groupBy('host') | ||
|window() | ||
.period(1m) | ||
.every(1m) |