Hi, so I'm using the query below to send a critical alert for disk usage.
As I understand it,

With a period of 10s, and every 10s, My understanding is , grab 10 seconds 
worth of data, and do this every 10 seconds.

This will allow me to check the average disk usage for every 10 seconds, with 
10 seconds worth of data.

How would I go about adding, only send this critical alert every 10/20 minutes?

// Parameters
var crit = 92
var period = 10s
var every = 10s

// Dataframe
var data = stream
    |from()
        .database('telegraf')
        .retentionPolicy('autogen')
        .measurement('disk')
        .groupBy('host')
    |window()
        .period(period)
        .every(every)
    |mean('used_percent')
        .as('stat')

// Thresholds
var alert = data
    |alert()
        .id('{{ index .Tags "host"}}/disk_used')
        .message('{{ .ID }}:{{ index .Fields "stat" }}')
        .crit(lambda: "stat" > crit)

// Alert
alert
        .log('/tmp/disk_alert_log.txt')

-- 
Remember to include the version number!
--- 
You received this message because you are subscribed to the Google Groups 
"InfluxData" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/influxdb.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/influxdb/ba346879-9d6c-4e3b-b471-1d14346e81f5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to