Skip to content

Workflow

Workflow in Alerts

TeskaLabs LogMan.io Alerts reads the following workflows:

  • /Alerts/Workflow/alert.yaml: Workflow used for tickets with the type alert
  • /Alerts/Workflow/incident.yaml: Workflow used for tickets with the type incident

Declaration

This is the most basic possible example of a workflow definition, located in the /Alerts/Workflow folder in the Library:

---
define:
  type: alerts/workflow

workflow:
  open:
    label: "Open"
    transitions:
      triaged:
        resources: lmio:alert:triaged-to-new
      closed: {}

  triaged:
    label: "Triaged"
    transitions:
      closed: {}

  closed:
    label: "Closed"

trigger:
  ...

The workflow specifies the states the given ticket may enter, with the first one being the one the newly created ticket is assigned with.

Each state (here open, triaged, and closed) contains the following attributes:

Label

The label attribute is a string shown to the user in the UI.

Transitions

Defines possible transitions to other states. The states are listed below with either an empty braces {} dictionary as the value, or the name or list of the resource(s) the given user must be assigned to in order to move the ticket to the state specified by the transition.

When a ticket changes its state, a trigger (if specified) section is called.