Using the Settings Controller API, you configure VMware Aria Suite Lifecycle to send alerts and notifications for changes in environment health or VMware Aria Suite product updates. As part of the configuration, you can specify the notification triggers and set the notification frequency.

The following example shows how to configure VMware Aria Suite Lifecycle to send a daily notification to two registered email addresses and using a Slack channel webhook. To ensure that you configure the outbound notification settings with the correct webhook, you validate the URL of the webhook first. Then you configure the outbound notification settings so that VMware Aria Suite Lifecycle alerts notification recipients of any product updates, or changes to license, certificate, or environment health.

Prerequisites

Procedure

  1. Validate the Slack channel webhook URL.
    curl -X GET "$url/lcm/lcops/api/v2/validateUrl?webhookType=slack&webhookUrl=<your_webhook_url>"  -H "Authorization: Basic YWRtaW5AbG9jYWw6VGhpc0lzUGFzc3dvcmQ=" -H "accept: application/json" | jq "."
    To validate a Microsoft Teams channel webhhook use webhookType=teams.
  2. Examine the response to verify that the URL is valid.
    Response example for a valid URL:
    { 
      "vmid": "6002e890-459b-42fb-aa15-2ece6575f588",  
      "transactionId": null, 
      "tenant": "default", 
      "message": "Webhook is validated successfully", 
      "identifier": null, 
      "type": "SUCCESS" 
    } 
    Response example for an invalid URL:
    { 
      "vmid": "7ffd4eb8-ae05-4d2f-bddc-99efd8b88b8a", 
      "transactionId": null, 
      "tenant": "default", 
      "message": "Invalid webhook URL", 
      "identifier": null, 
      "type": "ERROR" 
    } 
    If the URL is not valid, verify that the webhook URL used in the query is correct or generate a new webhook URL and try to validate the URL again.
  3. Configure outbound notification settings.
    curl -X POST \
      '$url/lcm/lcops/api/v2/settings/globalSetting' \
      -H 'Authorization: Basic YWRtaW5AbG9jYWw6VGhpc0lzUGFzc3dvcmQ=' \
      -H 'Content-Type: application/json' \
      -d '{
        "integrationName": "Slack Integration Example",
        "emailRecipients": ["[email protected]","[email protected]"],
        "webhookRecipients": [
          "https://hooks.slack.com/services/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"
        ],
        "properties": {
          "notificationTriggers": {
            "productUpdates": {
              "enableAll": true,
              "properties": [
                "updates",
                "patches",
                "supportPacks"
              ]
            },
            "licenses": {
              "enableAll": true,
              "properties": []
            },
            "certificates": {
              "enableAll": true,
              "properties": []
            },
            "environmentHealth": {
              "enableAll": true,
              "properties": []
            },
          }
        },
        "description": "Notifications received through email and Slack",
        "notificationFrequency": "DAILY"
      }' | jq "."
    The response shows the outbound notification settings.
    {
        "integrationName": "Slack Integration Example",
        "emailRecipients": ["[email protected]","[email protected]"],
        "webhookRecipients": [
          "https://hooks.slack.com/services/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"
        ],
        "properties": {
          "notificationTriggers": {
            "productUpdates": {
              "enableAll": true,
              "properties": [
                "updates",
                "patches",
                "supportPacks"
              ]
            },
            "licenses": {
              "enableAll": true,
              "properties": []
            },
            "certificates": {
              "enableAll": true,
              "properties": []
            },
            "environmentHealth": {
              "enableAll": true,
              "properties": []
            },
          }
        },
        "description": "Notifications received through email and Slack",
        "notificationFrequency": "DAILY"
      }