Skip to content

Commit

Permalink
alert on individual path usage
Browse files Browse the repository at this point in the history
  • Loading branch information
Crapworks committed Mar 30, 2017
1 parent ea0bf7c commit acb5f99
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions examples/telegraf/disk/disk_alert_batch.tick
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ var data = batch
|query('''SELECT mean(used_percent) AS stat FROM "telegraf"."autogen"."disk" WHERE path = '/' ''')
.period(period)
.every(every)
.groupBy('host')
.groupBy('host', 'path')

// Thresholds
var alert = data
|alert()
.id('{{ index .Tags "host"}}/disk_used')
.id('{{ index .Tags "host"}}/disk_used/{{ index .Tags "path" }}')
.message('{{ .ID }}:{{ index .Fields "stat" }}')
.info(lambda: "stat" > info)
.warn(lambda: "stat" > warn)
Expand Down
4 changes: 2 additions & 2 deletions examples/telegraf/disk/disk_alert_stream.tick
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ var data = stream
.database('telegraf')
.retentionPolicy('autogen')
.measurement('disk')
.groupBy('host')
.groupBy('host', 'path')
|window()
.period(period)
.every(every)
Expand All @@ -37,7 +37,7 @@ var data = stream
// Thresholds
var alert = data
|alert()
.id('{{ index .Tags "host"}}/disk_used')
.id('{{ index .Tags "host"}}/disk_used/{{ index .Tags "path" }}')
.message('{{ .ID }}:{{ index .Fields "stat" }}')
.info(lambda: "stat" > info)
.warn(lambda: "stat" > warn)
Expand Down

0 comments on commit acb5f99

Please sign in to comment.