influxdb/kapacitor/influxout.go

18 lines
459 B
Go
Raw Normal View History

2016-11-03 00:59:25 +00:00
package kapacitor
import "github.com/influxdata/chronograf"
2016-11-03 00:59:25 +00:00
// InfluxOut creates a kapacitor influxDBOut node to write alert data to Database, RP, Measurement.
func InfluxOut(rule chronograf.AlertRule) string {
return `
2016-11-03 00:59:25 +00:00
trigger
|influxDBOut()
.create()
.database(output_db)
.retentionPolicy(output_rp)
.measurement(output_mt)
.tag('alertName', name)
.tag('triggerType', triggerType)
`
2016-11-03 00:59:25 +00:00
}