
Atlassian Opsgenie OpsgenieExecution
CertifiedSend execution alert via Opsgenie
Atlassian Opsgenie OpsgenieExecution
Send execution alert via Opsgenie
Builds an Opsgenie alert from the current execution using opsgenie-template.peb, including link, IDs, namespace, duration, status, and failed task when applicable. Use inside flows triggered by Flow triggers; for errors sections use OpsgenieAlert instead.
type: io.kestra.plugin.opsgenie.OpsgenieExecutionExamples
Send notification on a failed flow execution via Opsgenie.
id: failure_alert
namespace: company.team
tasks:
- id: send_alert
type: io.kestra.plugin.opsgenie.OpsgenieExecution
url: "{{ secret('OPSGENIE_REQUEST') }}" # format: 'https://api.opsgenie.com/v2/alerts/requests/xxxxxxyx-yyyx-xyxx-yyxx-yyxyyyyyxxxx'
message: "Kestra Opsgenie alert"
alias: ExecutionError
responders:
4513b7ea-3b91-438f-b7e4-e3e54af9147c: team
bb4d9938-c3c2-455d-aaab-727aa701c0d8: user
aee8a0de-c80f-4515-a232-501c0bc9d715: escalation
80564037-1984-4f38-b98e-8a1f662df552: schedule
visibleTo:
4513b7ea-3b91-438f-b7e4-e3e54af9147c: team
bb4d9938-c3c2-455d-aaab-727aa701c0d8: user
priority: P1
tags:
- ExecutionError
- Error
- Fail
- Execution
authorizationToken: "{{ secret('OPSGENIE_GENIEKEY') }}"
options:
headers:
X-Flow-Env: prod
connectTimeout: PT5S
triggers:
- id: failed_prod_workflows
type: io.kestra.plugin.core.trigger.Flow
conditions:
- type: io.kestra.plugin.core.condition.ExecutionStatus
in:
- FAILED
- WARNING
- type: io.kestra.plugin.core.condition.ExecutionNamespace
namespace: prod
prefix: true
Properties
url *string
1Alert request URL
Full Opsgenie alert endpoint (for example https://api.opsgenie.com/v2/alerts/requests/{token}); typically stored as a secret.
alias string
Alert alias
Optional alias override for the alert payload.
assets
Assets this task consumes as inputs or produces as outputs, for lineage tracking and the asset graph (Enterprise Edition). A flow declaring this property on a task is rejected in the open-source edition.
io.kestra.core.models.assets.AssetsDeclaration
IGNOREFAILWARNAsset failure behavior
Behavior applied to the task state when a declared asset fails to render, emit, or be persisted (e.g. a lock conflict): FAIL escalates it to FAILED, WARN (default) warns it if it would otherwise succeed, IGNORE leaves the state untouched.
Whether to auto-register assets referenced dynamically at runtime that are not statically declared in inputs or outputs.
The assets consumed as inputs.
io.kestra.core.models.assets.AssetIdentifier
1The assets produced as outputs.
io.kestra.plugin.ee.assets.Dataset
1150{}1150io.kestra.plugin.ee.assets.File
1150{}1150io.kestra.plugin.ee.assets.Table
1150{}1150io.kestra.plugin.ee.assets.VM
1150{}1150io.kestra.core.models.assets.External
1150{}1150io.kestra.core.models.assets.Custom
11501Custom asset type
{}1150customFields object
Custom fields to be added on notification
customMessage string
Custom message to be added on notification
executionId string
{{ execution.id }}The execution id to use
Default is the current execution, change it to {{ trigger.executionId }} if you use this task with a Flow trigger to use the original execution.
message string
Alert message
Overrides message in the rendered template; supports expressions.
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.
priority string
Alert priority
Priority code such as P1–P5; overrides the template value if present.
responders object
Responders map
Map of responder id to type (team, user, escalation, schedule); converted to the Opsgenie responders list.
templateRenderMap object
Template variables
Key/value map rendered into the Pebble template before building the alert payload.
visibleTo object
Visible-to map
Map of entity id to type granting visibility (team or user); converted to the Opsgenie visibleTo list.