Hello,
I made an notification using a http-Endpoint… Its working fine, but all information from the table row are send although only few should be send. I want to drop not necessary information and used the drop function. A check in the raw data show that the drop function works well, but I guess that this is only functioning for the data send to the bucket _monitoring, while some lines before in the code the information was already send to the http-Endpoint.
My question would be: How I can control the information that are send over the http-Endpoint?
Greetings
Ehninchr
import "influxdata/influxdb/monitor"
import "influxdata/influxdb/v1"
data = from(bucket: "HeatMetering")
|> range(start: -30m)
|> filter(fn: (r) => r["_measurement"] == "Netz")
|> filter(fn: (r) => r["_field"] == "TempFlow_C")
|> aggregateWindow(every: 30m, fn: mean, createEmpty: false)
option task = {name: "Flow Temp monitoring", every: 30m, offset: 0s}
check = {_check_id: "0871667070d13000", _check_name: "Flow Temp monitoring", _type: "threshold", tags: {}}
warn = (r) => r["TempFlow_C"] < 74.0
messageFn = (r) => "${r._check_name} hat Status: ${r._level}"
data |> v1["fieldsAsCols"]() |> monitor["check"](data: check, messageFn: messageFn, warn: warn)
|> drop(
columns: [
"_measurement",
"_check_id",
"_level",
"_source_measurement",
"_source_timestamp",
"_start",
"_stop",
"_time",
"_type",
"DeviceId",
"User",
],
)
