Hello ,i can try to send notification but work only whit rbox not whit http post via google webhook but in any case status sent have this simbol:
i try in explorer to see log but status is set in false (but in rbox work):
this is my file in notification rules with google webhook:
import “influxdata/influxdb/monitor”
import “http”
import “json”
import “experimental”
option task = {name: “boh”, every: 5s, offset: 0s}
headers = {“Content-Type”: “application/json”}
endpoint = http"endpoint"
notification = {_notification_rule_id: “0949731987bc7000”, _notification_rule_name: “boh”, _notification_endpoint_id: “0933849e4ceab000”, _notification_endpoint_name: “alertsent”}
statuses = monitor[“from”](start: -10s)
crit = statuses |> filter(fn: (r) => r[“_level”] == “crit”)
all_statuses = crit |> filter(fn: (r) => r[“_time”] >= experimental[“subDuration”](from: now(), d: 5s))
all_statuses |> monitor[“notify”](data: notification, endpoint: endpoint(mapFn: (r) => {
body = {r with _version: 1} return {headers: headers, data: json["encode"](v: body)}
}))
and this is documentation google:
why not work ?
how to receive log?
thank you