Opsgenie
Retired since
- v4.1.67 and later
- v5.1.10 and later
The Opsgenie task is used to send alerts to the alerting system Opsgenie.
Opsgenie utilizes metadata to populate alert details and notify the appropriate responders. The task parameters allow for customization of the alert, including the message, priority, and the users who can view and respond to the alert.
Task parameters
Configure these parameters for the Opsgenie task.
| Parameter | Description | Required/ Optional |
|---|---|---|
| inputParameters.alias | A custom identifier for the alert in Opsgenie. Can support up to 512 characters. | Optional. |
| inputParameters.description | Description of the alert, limited to 15,000 characters in Opsgenie. | Optional. |
| inputParameters.visibleTo | The teams or users in Opsgenie who can view the alert, as an array of objects. Each object contains an id and a type, such as team. |
Optional. |
| inputParameters.responders | The users in Opsgenie to be notified of the alert, as an array of objects. Each object contains a type, such as user, and a username. |
Optional. |
| inputParameters.details | Additional details for the alert, as an object of key-value pairs. Values must be strings or numbers. The details appear as extra properties on the alert. | Optional. |
| inputParameters.message | The message displayed in Opsgenie, providing a quick overview of the alert. | Required. |
| inputParameters.actions | Custom actions to add to the alert, as an array of strings. | Optional. |
| inputParameters.priority | The priority of the alert. Supported values: P1, P2, P3, P4, P5. If not set, P3 is used. |
Optional. |
| inputParameters.entity | Domain the alert is related to, such as the server's name or application. | Optional. |
| inputParameters.token | The API key of an Opsgenie API integration. Refer to the official Opsgenie documentation to create an API integration. Keys created under API key management in Opsgenie are not supported. Tip: Save the token as a secret in Conductor for enhanced security. |
Required. |
| inputParameters.tags | Tags to add to the alert, as an array of strings. | Optional. |
If a parameter has the wrong type, such as a string instead of an array, the task fails.
The following are generic configuration parameters that can be applied to the task and are not specific to the Opsgenie task.
Caching parameters
You can cache the task outputs using the following parameters. Refer to Caching Task Outputs for a full guide.
| Parameter | Description | Required/ Optional |
|---|---|---|
| cacheConfig.ttlInSecond | The time to live in seconds, which is the duration for the output to be cached. | Required if using cacheConfig. |
| cacheConfig.key | The cache key is a unique identifier for the cached output and must be constructed exclusively from the task’s input parameters. It can be a string concatenation that contains the task’s input keys, such as ${uri}-${method} or re_${uri}_${method}. |
Required if using cacheConfig. |
Task configuration
This is the task configuration for an Opsgenie task.
{
"name": "ops_genie_task",
"taskReferenceName": "ops_genie_task_ref",
"inputParameters": {
"alias": "${workflow.input.opsGenieAlias}",
"description": "${query_processor_ref.output.result.workflowsUrl}",
"visibleTo": "${workflow.input.opsGenieVisibleTo}",
"message": "Failed Workflows detected",
"responders": "${workflow.input.opsGenieResponders}",
"details": {
"key": "value"
},
"priority": "${workflow.input.opsGeniePriority}",
"entity": "${workflow.input.opsGenieEntity}",
"tags": "${workflow.input.opsGenieTags}",
"actions": "${workflow.input.opsGenieActions}",
"token": "${workflow.secrets.OPS_GENIE_TOKEN}"
},
"type": "OPS_GENIE"
}
Task output
The task returns the Opsgenie API response in response:
- statusCode: The HTTP status code.
202means Opsgenie accepted the request. - headers: The response headers.
- body: The response body. When the request is accepted, it contains
result,took, andrequestId. It does not include the alert ID.
If Opsgenie rejects the request, for example because of an invalid API key or a missing message, the task still completes. The error is returned in the response and in the task's reason for incompletion.