Here is an example script from another thread,
var data = stream
|from()
.database('telegraf')
.retentionPolicy('autogen')
.measurement('system')
.groupBy(*)
|deadman(1.0, 10s)
.id('{{ index .Tags "node" }}')
.message('Server {{ .ID }} is OFFLINE')
.slack()
.stateChangesOnly()