
Atlassian Opsgenie OpsgenieAlert
CertifiedPost a custom alert to Opsgenie
Atlassian Opsgenie OpsgenieAlert
Post a custom alert to Opsgenie
Sends a raw alert payload to Opsgenie using the Alert API. Use in errors sections for flow failure notifications; pair with GenieKey auth and the url from Opsgenie alert requests.
type: io.kestra.plugin.opsgenie.OpsgenieAlertExamples
Send a failed flow alert to Opsgenie.
id: unreliable_flow
namespace: company.team
tasks:
- id: fail
type: io.kestra.plugin.scripts.shell.Commands
runner: PROCESS
commands:
- exit 1
errors:
- id: alert_on_failure
type: io.kestra.plugin.opsgenie.OpsgenieAlert
url: "{{ secret('OPSGENIE_REQUEST') }}" # https://api.opsgenie.com/v2/alerts/requests/xxx000xxxxx
payload: |
{
"message":"Kestra Opsgenie alert",
"alias":"ExecutionError",
"responders":[
{"id":"4513b7ea-3b91-438f-b7e4-e3e54af9147c","type":"team"},
{"id":"bb4d9938-c3c2-455d-aaab-727aa701c0d8","type":"user"},
{"id":"aee8a0de-c80f-4515-a232-501c0bc9d715","type":"escalation"},
{"id":"80564037-1984-4f38-b98e-8a1f662df552","type":"schedule"}
],
"visibleTo":[
{"id":"4513b7ea-3b91-438f-b7e4-e3e54af9147c","type":"team"},
{"id":"bb4d9938-c3c2-455d-aaab-727aa701c0d8","type":"user"}
],
"tags":["ExecutionFail","Error","Execution"],
"priority":"P1"
}
authorizationToken: "{{ secret('OPSGENIE_GENIEKEY') }}"
Send a Opsgenie alert.
id: opsgenie_incoming_webhook
namespace: company.team
tasks:
- id: send_opsgenie_message
type: io.kestra.plugin.opsgenie.OpsgenieAlert
url: "{{ secret('OPSGENIE_REQUEST') }}"
payload: |
{
"message":"Kestra Opsgenie alert",
"alias":"Some Execution",
"responders":[
{"id":"4513b7ea-3b91-438f-b7e4-e3e54af9147c","type":"team"},
{"id":"bb4d9938-c3c2-455d-aaab-727aa701c0d8","type":"user"}
],
"visibleTo":[
{"id":"4513b7ea-3b91-438f-b7e4-e3e54af9147c","type":"team"},
{"id":"bb4d9938-c3c2-455d-aaab-727aa701c0d8","type":"user"}
],
"tags":["Execution"],
"priority":"P2"
}
authorizationToken: "{{ secret('OPSGENIE_GENIEKEY') }}"
options:
headers:
X-Custom-Source: kestra-flow
connectTimeout: PT5S
Properties
url *Requiredstring
1Alert request URL
Full Opsgenie alert endpoint (for example https://api.opsgenie.com/v2/alerts/requests/{token}); typically stored as a secret.
options
Tune Opsgenie HTTP client
Optional HTTP client settings for Opsgenie calls. Connect timeout, read idle timeout, default charset, and headers are applied; other fields are currently ignored by the client builder.
io.kestra.plugin.opsgenie.AbstractOpsgenieConnection-RequestOptions
Connect timeout
Maximum time to open the connection before failing; uses the HTTP client default when unset.
PT0SConnection pool idle timeout
Idle lifetime for pooled connections before close; currently not applied by the client builder.
UTF-8Default request charset
Charset used for request bodies; defaults to UTF-8.
java.nio.charset.Charset
HTTP headers
Additional headers rendered and added to each request.
10485760Max content length
Maximum response size in bytes; currently not applied by the client builder.
PT5MRead idle timeout
Closes idle read connections after inactivity; defaults to PT5M.
PT10SRead timeout
Maximum time allowed for reading the response body; kept for compatibility, not applied to the current client builder.
payload string
Alert payload
JSON body sent to Opsgenie; render expressions before sending. Must follow the Opsgenie Alert API schema.
pluginDefaultsRef Non-dynamicstring
Reference (ref) of the pluginDefaults to apply to this task.