opsgenie.respondersToJSON() function
The opsgenie.respondersToJSON()
function is a user-contributed function maintained by
the package author and can
be updated or removed at any time.
The opsgenie.respondersToJSON()
function converts an array of
Opsgenie responder
strings to a string-encoded JSON array that can be embedded in an alert message.
import "contrib/sranka/opsgenie"
import "contrib/sranka/opsgenie"
opsgenie.respondersToJSON(
v: ["user:example-user", "team:example-team", "escalation:example-escalation", "schedule:example-schedule"],
)
// Returns "[
// {"type":"user","username":"example-user"},
// {"type":"team","name":"example-team"},
// {"type":"escalation","name":"example-escalation"},
// {"type":"schedule","name":"example-schedule"}
// ]"
Parameters
v
(Required) Array of Opsgenie responder strings.
Responder strings must begin with user:
, team:
, escalation:
, or schedule:
.
Was this page helpful?
Thank you for your feedback!
Support and feedback
Thank you for being part of our community! We welcome and encourage your feedback and bug reports for Flux and this documentation. To find support, use the following resources:
InfluxDB Cloud customers can contact InfluxData Support.