Hi,
Trying to return a single row/column called globalFlg with a boolean value from an InfluxDB table alert_output_flg.
But this tickscript below returns nothing.
Tried without eval but nothing is getting dumped to httpOut at http://localhost:9092/kapacitor/v1/tasks/threshold_alert/globalFlg1
It shows {series: null} as the response.
var globalFlg1 =
stream
|from()
.measurement(‘alert_output_flg’)
.where(lambda: “__agg_group_by” == ‘deployment_id__game_id__subsystem_name__component_name’)
|eval(lambda: “globalFlg” == ‘true’ OR “globalFlg” == ‘false’)
.as(‘globalFlg’)
.keep()
|httpOut(‘globalFlg1’)
I have other code working fine in the same script. Below shows the badStateData at the REST endpoint http://localhost:9092/kapacitor/v1/tasks/threshold_alert/badStateData
var windowedData =
stream
|from()
.measurement(‘stream_perio’)
.where(lambda: “__agg_period” == ‘5s’)
|window()
.period(1m)
.every(1m)
.align()
var badStateData = windowedData
|eval(lambda: “output_fps__count” < 29)
.as(‘badState’)
.keep()
|httpOut(‘badStateData’)
TIA