Merge pull request #2460 from influxdata/feature/cast-kapa-value
Update kapacitor alerts to cast to float before sending to influxpull/2467/head^2
commit
3184202696
|
@ -27,6 +27,7 @@
|
|||
1. [#2384](https://github.com/influxdata/chronograf/pull/2384): Add filtering by name to Dashboard index page
|
||||
1. [#2385](https://github.com/influxdata/chronograf/pull/2385): Add time shift feature to DataExplorer and Dashboards
|
||||
1. [#2400](https://github.com/influxdata/chronograf/pull/2400): Allow override of generic oauth2 keys for email
|
||||
1. [#2460](https://github.com/influxdata/chronograf/pull/2460): Update kapacitor alerts to cast to float before sending to influx
|
||||
|
||||
### UI Improvements
|
||||
|
||||
|
|
|
@ -214,6 +214,9 @@ var trigger = data
|
|||
.durationField(durationField)
|
||||
|
||||
trigger
|
||||
|eval(lambda: float("value"))
|
||||
.as('value')
|
||||
.keep()
|
||||
|influxDBOut()
|
||||
.create()
|
||||
.database(outputDB)
|
||||
|
@ -300,6 +303,9 @@ var trigger = data
|
|||
.durationField(durationField)
|
||||
|
||||
trigger
|
||||
|eval(lambda: float("value"))
|
||||
.as('value')
|
||||
.keep()
|
||||
|influxDBOut()
|
||||
.create()
|
||||
.database(outputDB)
|
||||
|
@ -540,6 +546,9 @@ var trigger = data
|
|||
.durationField(durationField)
|
||||
|
||||
trigger
|
||||
|eval(lambda: float("value"))
|
||||
.as('value')
|
||||
.keep()
|
||||
|influxDBOut()
|
||||
.create()
|
||||
.database(outputDB)
|
||||
|
@ -623,6 +632,9 @@ var trigger = data
|
|||
.durationField(durationField)
|
||||
|
||||
trigger
|
||||
|eval(lambda: float("value"))
|
||||
.as('value')
|
||||
.keep()
|
||||
|influxDBOut()
|
||||
.create()
|
||||
.database(outputDB)
|
||||
|
@ -1376,6 +1388,9 @@ trigger
|
|||
|eval(lambda: "emitted")
|
||||
.as('value')
|
||||
.keep('value', messageField, durationField)
|
||||
|eval(lambda: float("value"))
|
||||
.as('value')
|
||||
.keep()
|
||||
|influxDBOut()
|
||||
.create()
|
||||
.database(outputDB)
|
||||
|
|
|
@ -20,11 +20,14 @@ func InfluxOut(rule chronograf.AlertRule) (string, error) {
|
|||
return fmt.Sprintf(`
|
||||
trigger
|
||||
%s
|
||||
|eval(lambda: float("value"))
|
||||
.as('value')
|
||||
.keep()
|
||||
|influxDBOut()
|
||||
.create()
|
||||
.database(outputDB)
|
||||
.retentionPolicy(outputRP)
|
||||
.measurement(outputMeasurement)
|
||||
.create()
|
||||
.database(outputDB)
|
||||
.retentionPolicy(outputRP)
|
||||
.measurement(outputMeasurement)
|
||||
.tag('alertName', name)
|
||||
.tag('triggerType', triggerType)
|
||||
`, rename), nil
|
||||
|
|
|
@ -14,6 +14,9 @@ func TestInfluxOut(t *testing.T) {
|
|||
|eval(lambda: "emitted")
|
||||
.as('value')
|
||||
.keep('value', messageField, durationField)
|
||||
|eval(lambda: float("value"))
|
||||
.as('value')
|
||||
.keep()
|
||||
|influxDBOut()
|
||||
.create()
|
||||
.database(outputDB)
|
||||
|
|
|
@ -181,6 +181,9 @@ var trigger = data
|
|||
.email()
|
||||
|
||||
trigger
|
||||
|eval(lambda: float("value"))
|
||||
.as('value')
|
||||
.keep()
|
||||
|influxDBOut()
|
||||
.create()
|
||||
.database(outputDB)
|
||||
|
@ -323,6 +326,9 @@ var trigger = data
|
|||
.email()
|
||||
|
||||
trigger
|
||||
|eval(lambda: float("value"))
|
||||
.as('value')
|
||||
.keep()
|
||||
|influxDBOut()
|
||||
.create()
|
||||
.database(outputDB)
|
||||
|
@ -467,6 +473,9 @@ var trigger = data
|
|||
.email()
|
||||
|
||||
trigger
|
||||
|eval(lambda: float("value"))
|
||||
.as('value')
|
||||
.keep()
|
||||
|influxDBOut()
|
||||
.create()
|
||||
.database(outputDB)
|
||||
|
@ -620,6 +629,9 @@ var trigger = data
|
|||
.email()
|
||||
|
||||
trigger
|
||||
|eval(lambda: float("value"))
|
||||
.as('value')
|
||||
.keep()
|
||||
|influxDBOut()
|
||||
.create()
|
||||
.database(outputDB)
|
||||
|
@ -772,6 +784,9 @@ var trigger = data
|
|||
.email()
|
||||
|
||||
trigger
|
||||
|eval(lambda: float("value"))
|
||||
.as('value')
|
||||
.keep()
|
||||
|influxDBOut()
|
||||
.create()
|
||||
.database(outputDB)
|
||||
|
@ -924,6 +939,9 @@ var trigger = data
|
|||
.email()
|
||||
|
||||
trigger
|
||||
|eval(lambda: float("value"))
|
||||
.as('value')
|
||||
.keep()
|
||||
|influxDBOut()
|
||||
.create()
|
||||
.database(outputDB)
|
||||
|
@ -1059,6 +1077,9 @@ var trigger = data
|
|||
.email()
|
||||
|
||||
trigger
|
||||
|eval(lambda: float("value"))
|
||||
.as('value')
|
||||
.keep()
|
||||
|influxDBOut()
|
||||
.create()
|
||||
.database(outputDB)
|
||||
|
@ -1222,6 +1243,9 @@ var trigger = past
|
|||
.email()
|
||||
|
||||
trigger
|
||||
|eval(lambda: float("value"))
|
||||
.as('value')
|
||||
.keep()
|
||||
|influxDBOut()
|
||||
.create()
|
||||
.database(outputDB)
|
||||
|
@ -1385,6 +1409,9 @@ var trigger = past
|
|||
.email()
|
||||
|
||||
trigger
|
||||
|eval(lambda: float("value"))
|
||||
.as('value')
|
||||
.keep()
|
||||
|influxDBOut()
|
||||
.create()
|
||||
.database(outputDB)
|
||||
|
@ -1527,6 +1554,9 @@ trigger
|
|||
|eval(lambda: "emitted")
|
||||
.as('value')
|
||||
.keep('value', messageField, durationField)
|
||||
|eval(lambda: float("value"))
|
||||
.as('value')
|
||||
.keep()
|
||||
|influxDBOut()
|
||||
.create()
|
||||
.database(outputDB)
|
||||
|
|
Loading…
Reference in New Issue