AppNeta Events - Slack Integration (Observer API)
search cancel

AppNeta Events - Slack Integration (Observer API)

book

Article ID: 267276

calendar_today

Updated On:

Products

AppNeta

Issue/Introduction

Want the below Appneta Events to be sent directly to slack from Appneta.

Test events (TestEvents) - These are notifications that a diagnostic test has completed (or was halted).

Sequencer events (SeqEvents) - These are notifications that AppNeta lost or reestablished connectivity with a Monitoring Point.

Service quality events (SqaEvents) - These are notifications that a network path alert condition was violated or cleared.

Web application events (WebPathEvents) - These are notifications that a web path alert condition was violated or cleared .

Resolution

SLACK CONFIGURATION

NOTE: Requires a separate Workflow with unique Webhook URL for each event type. Webhook URL will have to be supplied per Observer API Call.

Create workflow in slack: 

1. Open workflow builder by click your Organization Dropdown (Top Left Typically) > Tools > Workflow Builder

2. Click Create > Webhook (Advanced)

3. Click Add variable based on the below legend for type of event:

TestEvents:

  "type": "Example text",
  "description": "Example text",
  "sequencerName": "Example text",
  "platformType": "Example text",
  "monitoringPointType": "Example text",
  "target": "Example text",
  "name": "Example text",
  "testStatus": "Example text",
  "dataReadiness": "Example text",
  "voiceReadiness": "Example text"

SeqEvents:

  "type": "Example text",
  "description": "Example text",
  "sequencerName": "Example text",
  "platformType": "Example text",
  "monitoringPointType": "Example text",
  "sequencerStatus": "Example text"

SqaEvents:

  "type": "Example text",
  "description": "Example text",
  "sequencerName": "Example text",
  "platformType": "Example text",
  "monitoringPointType": "Example text",
  "deepLink": "Example text",
  "target": "Example text",
  "measuredParam": "Example text",
  "pathName": "Example text",
  "pathStatus": "Example text",
  "orgName": "Example text"

WebPathEvents:

  "type": "Example text",
  "description": "Example text",
  "sequencerName": "Example text",
  "orgName": "Example text",
  "deepLink": "Example text",
  "platformType": "Example text",
  "monitoringPointType": "Example text",
  "target": "Example text",
  "measuredParam": "Example text",
  "workflowName": "Example text",
  "milestoneName": "Example text"

4. Click Next

5. Click Add step to choose what to do with the message. Send a message would be typically be used to send to a slack channel/user

6. Choose the channel and populate message text using the required by inserting variables set above. and click save

7. Click Publish, this will generate your webhook URL. Copy this URL to be pasted into the Appneta Observer API Call

APPNETA CONFIGURATION

1. Access the observer API from the Appneta Portal from Gear > Explore API

2. Expand Observer > Select POST /v3/observer > Click Try it Now

3. Paste the following Syntax based on your Event Type, you will require a separate call for each event type

Example:

[
  {
    "name": "<webhook url>",
    "url": "<webhook url>",
    "testEvents": true,
    "seqEvents": false,
    "sqaEvents": false,
    "webAlertEvents": false,
    "networkChangeEvents": false,
    "headers": null,
    "blacklisted": false,
  },
  {
    "name": "<webhook url>",
    "url": "<webhook url>",
    "testEvents": false,
    "seqEvents": false,
    "sqaEvents": false,
    "webAlertEvents": true,
    "networkChangeEvents": false,
    "headers": null,
    "blacklisted": false,
  },
  {
    "name": "<webhook url>",
    "url": "<webhook url>",
    "testEvents": false,
    "seqEvents": true,
    "sqaEvents": false,
    "webAlertEvents": false,
    "networkChangeEvents": false,
    "headers": null,
    "blacklisted": false,
  },
  {
    "name": "<webhook url>",
    "url": "<webhook url>",
    "testEvents": false,
    "seqEvents": false,
    "sqaEvents": true,
    "webAlertEvents": false,
    "networkChangeEvents": false,
    "headers": null,
    "blacklisted": false,
  }
]

4. Click Execute

5. If Successful, Server response will be 200

Additional Information

Note: The API Call will get blacklisted if the workflow repeatedly fails. Perform a GET /v3/observer to verify that blacklist: true is not set. If so, you will have to reapply the configuration through POST /v3/observer

Please reach out to Broadcom Support if you are having issues, we do have these workflows setup and can send a slack workflow export to easily set this up.