Sysdig · Arazzo Workflow

Sysdig Create Alert With Notification Channel

Version 1.0.0

Create a notification channel, then create an alert that routes to it.

1 workflow 1 source API 1 provider
View Spec View on GitHub Cloud SecurityContainersKubernetesRuntime SecuritySecurityVulnerability ManagementMonitoringObservabilityCSPMComplianceArazzoWorkflows

Provider

sysdig

Workflows

create-alert-with-channel
Provision a notification channel and an alert wired to it.
Creates a notification channel, then creates an alert referencing the channel id, and verifies the alert by reading it back.
3 steps inputs: alertName, bearerToken, channelName, channelOptions, channelType, condition outputs: alertId, channelId
1
createChannel
createNotificationChannel
Create the notification channel used for alert routing.
2
createAlert
createAlert
Create the alert and route it to the new channel.
3
verifyAlert
getAlert
Read the alert back by id to confirm it persisted.

Source API Descriptions

Arazzo Workflow Specification

sysdig-create-alert-with-channel-workflow.yml Raw ↑
arazzo: 1.0.1
info:
  title: Sysdig Create Alert With Notification Channel
  summary: Create a notification channel, then create an alert that routes to it.
  description: >-
    An alert provisioning flow for Sysdig Monitor. It creates a notification
    channel for alert routing, captures the generated channel id, and creates a
    monitoring alert whose notificationChannelIds reference that channel so
    firings are delivered. The alert is then read back to confirm it persisted.
    Every step spells out its request inline so the flow can be read and
    executed without opening the underlying OpenAPI description.
  version: 1.0.0
sourceDescriptions:
- name: sysdigMonitor
  url: ../openapi/sysdig-monitor-openapi.yml
  type: openapi
workflows:
- workflowId: create-alert-with-channel
  summary: Provision a notification channel and an alert wired to it.
  description: >-
    Creates a notification channel, then creates an alert referencing the
    channel id, and verifies the alert by reading it back.
  inputs:
    type: object
    required:
    - bearerToken
    - channelName
    - channelType
    - alertName
    - condition
    properties:
      bearerToken:
        type: string
        description: Sysdig API bearer token used for Authorization.
      channelName:
        type: string
        description: Name of the notification channel.
      channelType:
        type: string
        description: Channel type (EMAIL, SLACK, WEBHOOK, PAGERDUTY, etc.).
      channelOptions:
        type: object
        description: Channel-specific options (e.g. emailRecipients, url).
      alertName:
        type: string
        description: Name of the monitoring alert.
      condition:
        type: string
        description: Alert condition expression.
  steps:
  - stepId: createChannel
    description: Create the notification channel used for alert routing.
    operationId: createNotificationChannel
    parameters:
    - name: Authorization
      in: header
      value: Bearer $inputs.bearerToken
    requestBody:
      contentType: application/json
      payload:
        notificationChannel:
          name: $inputs.channelName
          type: $inputs.channelType
          options: $inputs.channelOptions
          enabled: true
    successCriteria:
    - condition: $statusCode == 201
    outputs:
      channelId: $response.body#/notificationChannel/id
  - stepId: createAlert
    description: Create the alert and route it to the new channel.
    operationId: createAlert
    parameters:
    - name: Authorization
      in: header
      value: Bearer $inputs.bearerToken
    requestBody:
      contentType: application/json
      payload:
        alert:
          name: $inputs.alertName
          condition: $inputs.condition
          severity: 4
          enabled: true
          type: MANUAL
          notificationChannelIds:
          - $steps.createChannel.outputs.channelId
    successCriteria:
    - condition: $statusCode == 201
    outputs:
      alertId: $response.body#/alert/id
  - stepId: verifyAlert
    description: Read the alert back by id to confirm it persisted.
    operationId: getAlert
    parameters:
    - name: Authorization
      in: header
      value: Bearer $inputs.bearerToken
    - name: alertId
      in: path
      value: $steps.createAlert.outputs.alertId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      alertId: $response.body#/alert/id
      enabled: $response.body#/alert/enabled
  outputs:
    channelId: $steps.createChannel.outputs.channelId
    alertId: $steps.verifyAlert.outputs.alertId