I am trying to set up an alert system in which I would get alert if influx does not receive any data for 15 min below is the script we are using.
var data = batch
|query(''' Select last(usage_user) from prod_hosts.autogen.cpu where cpu = 'cpu-total' ''')
.period(15m)
.every(5m)
.groupBy(*)
data
|deadman(1.0, 15m)
.id('{{ index .Tags "node" }}')
.message('Server {{ index .Tags "host" }} is OFFLINE')
.messageField('message')
.email()
.to('amit.singh2@xxxxxxxxx')
.log('/tmp/chronograf/deadman.log')
|httpOut('data')
But even data is not received by influx for a server in prod_hosts tag it does not send any alert, I also checked by running query manually which you get after the kapacitor watch.