Skip to content
bell

GitHub Action

Create OpsGenie Alert

v1.4.0 Latest version

Create OpsGenie Alert

bell

Create OpsGenie Alert

Create an OpsGenie Alert

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Create OpsGenie Alert

uses: rockem/create-opsgenie-alert-action@v1.4.0

Learn more about this action in rockem/create-opsgenie-alert-action

Choose a version

Create OpsGenie alert action

Tests Compile

This GitHub Action allows you to create alerts in OpsGenie as part of your GitHub Actions workflows.

Usage

- name: Create OpsGenie Alert
  uses: rockem/create-opsgenie-alert-action@v1
  with:
    api_key: ${{ secrets.OPSGENIE_API_KEY }}
    message: >
      Activity exceeded timeout: exceeded 60 seconds
    alias: "workflow-failure"
    source: "GitHub Actions"

Inputs

  • `api_key` (Required): Your OpsGenie API key. It is recommended to store this as a secret in your GitHub repository.
  • `message` (Required): The short alert message.
  • `description`: A longer description of the alert.
  • `alias`: A unique identifier for the alert. Can be used for alert de-duplication.
  • `source`: The source of the alert. Defaults to IP address of incoming request.
  • `tags`: Tags of the alert, separated by commas.
  • `priority`: Priority level of the alert. Possible values are P1, P2, P3, P4 and P5. Default value is P3.
  • `using_eu_url`: Set the action to use OpsGenie europe endpoint 'https://api.eu.opsgenie.com'. Defaults to false
  • `responders`: List of comma seperated targets that the alert will be routed to. (each target should be in the format: <id type>:<id>:<responder type>)

Outputs

  • `request_id`: Request id for the create alert request.

Resources

License

This project is licensed under the MIT License. See the LICENSE file for details.


Feel free to contribute by opening issues or pull requests. If you have any questions or need assistance, please don't hesitate to reach out.

Happy coding!