emc-modify-alert

command module
v0.0.0-...-8835833 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 4, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

README


{ "image": "direktiv/emc-modify-alert", "desc": "Acknowledges an alert." }

EMC Modify Alert

Acknowledges an alert.

Direktiv

An example workflow that acknowledges an alert on EMC.

id: acknowledge-alert
functions:
- id: acknowledge
  image: direktiv/emc-modify-alert:v1
description: "Acknowledge the alert."
states:
  - id: acknowledge-alert-test
    type: action
    action: 
      secrets: ["PASSWORD"]
      function: acknowledge
      input: 
        url: "https://unity.direktiv.io"
        username: "admin"
        password: jq(.secrets.PASSWORD)
        message: "This is a test message to be sent in an SNMP trap."

Input

input:
  url: "https://unity.direktiv.io"
  username: "admin"
  password: jq(.secrets.PASSWORD)
  message: "This is a test message to be sent in an SNMP trap."

Output

Upon success the following output is the ID of the alert so we can delete it later on in the workflow.

{
    "return": {
        "id": "alert_50"
    }
}

Error

In the case that an error is encountered, it will present in the following format:

{
    "errorCode": "com.emc.modify-alert.%s.error",
    "errorMsg": "Something went wrong"
}

NOTE: '%s' will be replaced contextually with what error has been received.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL