# Opsgenie

## Overview <a href="#overview" id="overview"></a>

Opsgenie (now acquired by Atlassian) is mainly used for for on-call, alerting, and incident management.

Opsgenie integration is intended for users who have Opsgenie set up as the primary alerting and on-call management system.

## Use Cases <a href="#use-cases" id="use-cases"></a>

The integration between Fylamynt and Opsgenie lets you:

* Trigger a workflow in Fylamynt, when a specific Opsgenie Alert goes into the state of ALERT.

## Configure Opsgenie in Fylamynt

* Navigate to **Settings** > **Integrations** > **Opsgenie**.
* Configure a new integration instance

Details needed to set up **Opsgenie instance** in **Fylamynt**:

| **Parameter**        | Description                                         | **Required** |
| -------------------- | --------------------------------------------------- | ------------ |
| Opsgenie API token   | API Token obtained from Opsgenie                    | True         |
| Webhook API Key Name | Fylamynt API Key name                               | True         |
| Opsgenie Webhook URL | Fylamynt webhook URL to be used by Opsgenie service | True         |

Webhook is used to **fetch alerts** from Opsgenie in real-time. You can also **Enable / Disable** Opsgenie Webhook.

Follow the steps listed below in your **Opsgenie Account** and get the desired parameters to enter in **Fylamynt**.

* In your Opsgenie Account, go to “**Teams”** --> “**Select your team”** --> “**Integrations”** --> “**Add Integration”**.
* Select **API** as an integration option.
* Give **read-only** access, copy API Key and **Save** **Integration.**
* Now need to configure webhook:
  * Select “**Teams”** --> **“Your Team”** --> “**Add Action Channel”**
  * Provide name for the Action Channel
  * Select **Rest Endpoint** as a type for Action Channel
  * Add following details:
    * **URL**: copy Webhook URL from the Opsgenie Webhook URL in the right side panel.
    * **Custom Headers:**
      * Name: x-api-key
      * Value: add "Webhook API Key value" from right side panel
    * Instructions to get Fylamynt " Webhook API Key value":
    * Under Authorize Fylamynt, choose one of the **Webhook API Key Name** from the dropdown, and the corresponding **Webhook API Key Value** should be shown. If no options are available for the **Webhook API Key Name**, first go to **Settings** --> A**PI Keys** --> Manage Keys to Create a New API Key.
* Create **Managed Action:**
  * Select **“Teams” --> “Action” --> “Add Action”**
  * Select “**REST Endpoint”** --> (previously created Action Channel) --> “**Next”** --> “**Create”**
* Create **Policy** for created **Managed action:**
  * Select “**Teams”** --> “**Policies”** --> “**Add Action Policy”**
  * Tick Enable policy when created, add conditions when you want to trigger Webhooks.
  * Then click on **Create and enable policy**

## Integration Actions <a href="#integration-actions" id="integration-actions"></a>

You can add these actions in the Fylamynt workflow builder, as part of your workflow.

1\. [Opsgenie Alert Trigger](#opsgenie-alert-trigger)

### **Opsgenie Alert Trigger**

The integration node triggers the automatic execution of a workflow from a selected **Opsgenie Service**.

When creating a workflow, you are presented with a wizard to select the trigger type to use.

* On the workflow page, select **New Workflow**
* Enter the name of the Workflow.
* Select the **Opsgenie** trigger type.
* Click **Create Workflow**
* ![](/files/ptCuJ0Avh1WuT6m8a5sr)

#### Configure the automatic execution of a workflow <a href="#fylamynt-task-management" id="fylamynt-task-management"></a>

To automatically run workflows with the Opsgenie Alert trigger, the incident type and assignment need to be configured. Follow the step-by-step instructions provided on the[ Incident Management - Automatic workflow execution](https://docs.fylamynt.com/getting-started-1/7.-incident-management-automatic-workflow-execution) page.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.fylamynt.com/integrations/opsgenie.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
