Webhook Integrations

  1. SixthSense supports multiple webhook integrations for sending notifications.
  2. All webhook integrations use the same authentication mechanism, while the payload/template structure may vary depending on the receiving endpoint/webhook URL.

Viber Webhook Integration

Create a webhook URL in the Viber

  1. Create a Channel – only Channel super admins can get access to API.
  2. Must be using a version of Viber 17.7 or higher.
  3. Obtain Authentication token. In order to implement channels API, super admin need to obtain an authentication token unique for their Channel. You can do this by entering your Channel’s info screen-> scroll down to “Developer Tools” -> copy token -> use the token for posting via API.
webhook Viber

Setting/Creating a webhook URL

Once you have your token you will be able to set your Channel’s webhook. To send messages using this API, it is necessary to set a webhook.

Setting the webhook will be done by calling the set_webhook API with a valid and certified URL. For security reasons only URLs with valid and official SSL certificate from a trusted Certificate Authority will be allowed. This action defines the account’s webhook and the type of events the account wants to be notified about.

Once a set_webhook request is sent Viber will send a callback to the webhook to check its availability. The webhook must reply with status 200 for the request to succeed.

  • Request
curl -X POST "https://chatapi.viber.com/pa/set_webhook" \
-H "Content-Type: application/json" \
-d '{
"url": "https://your_webhook_url.com",
"auth_token": "your_auth_token"
}'
  • You will see Set webhook Response as below
{
"status":0,
"status_message":"ok",
"event_types":[
"delivered",
"seen",
"failed",
"subscribed",
"unsubscribed",
"conversation_started"
]
}
note

event_types are deprecated, please ignore

Get Account Info

The get_account_info request will fetch the account’s details as registered in Viber. The account admin will be able to edit most of these details from his Viber client.

The Sender IDs of the Channel superadmins (role “superadmin”) and admins (role “admin”) can be found under the “members” field of the response. Only the superadmins’ ID should be used as the sender ID with this API.

  • Request
curl -X POST "https://chatapi.viber.com/pa/get_account_info" \
-H "Content-Type: application/json" \
-d '{
"auth_token": "your_auth_token"
}'
  • Response
{
"status":0,
"status_message":"ok",
"Id":"pa:75346594275468546724",
"chat_hostname":"Channel name",
"background":"https://content.cdn.viber.com/backgrounds_v1/Android/800/10000501.jpg",
"members":[
{
"id":"01234567890A=",
"name": "my name",
"avatar" :"https://example.com",
"role":"admin"
}
]
}

Sending a sample message/events using created webhook URL

In order to post to your Channel you will need to send a POST request with the below properties.

  • Request
curl -X POST "https://chatapi.viber.com/pa/post" \
-H "Content-Type: application/json" \
-d '{
"auth_token":"your_auth_token",
"from":"your_user_id",
"type":"text",
"text":"Hello world!"
}'
  • This will sned a sample message/event Hello world! to the created viber channel using user_id & auth_token.

Sixthsense sample template/payload to send alert events to viber

{
"from": "<<viber_channel_super_admin_id>>",
"type": "text",
"text": "ALERT: {{alert_name}}\nService: {{service_name}}\nMetric: {{metric_name}}\nCondition: {{aggregator_operator}} {{threshold_value}}\nCurrent Value: {{current_value}}\nPeriod: {{period}} min(s)\nTool: {{tool_name}}\nURL: {{url}}"
}
note
  • Now we can modify the variables with sixthsense supported webhoook variables in the above template.
  • Auth token is passed in Header via webhook Authentication.
webhook Viber

Pagerduty Webhook Integration

  • We use Events API in pagerduty to push alerts from Sixthsense.
  • Events API: Allows you to add PagerDuty's advanced event and incident management functionality to any system that can make an outbound HTTP connection. This API is specifically designed for sending event data (like alerts from SixthSense) into PagerDuty to trigger incidents. It allows you to add PagerDuty's incident management capabilities to your existing monitoring and alerting systems.

Integration with SixthSense Alert:

{
"event_action": "trigger",
"routing_key": "{{routing_key}}", # This routing key is configured in webhook Body authentication & the variable is passed here.
"payload": {
"summary": "from SixthSense",
"source": "SixthSense",
"severity": "info",
"custom_details": {
"ALERT_NAME": "{{alert_name}}",
"CAPABILITY": "{{capability}}",
"ENTITY_NAME": "{{service_name}}",
"DESC": "{{event_type}}",
"COMP": "{{metric_name}}",
"NOTES": "{{tool_name}} has detected a problem with {{service_name}} application where {{metric_name}} was {{aggregator_operator}} {{threshold_value}} and the current value is around {{current_value}} for the last {{period}} min(s).",
"TIME": "{{timestamp}}",
"TOOL_NAME": "{{tool_name}}",
"URL": "{{url}}"
}
}
}

Please refer

webhook PagerDuty

Zendesk Webhook Integration

Create Webhook URL in Zendesk via UI

  1. Log in to your Zendesk Admin Center
  2. Admin Center → Apps and integrations → Webhooks
  3. Click “Create Webhook”
  4. Name: Alert System Webhook (or something descriptive)
  5. Endpoint URL:(Use a real endpoint like your external system or a mock one like https://business.com/)
  6. Request Method: POST
  7. Request Format: JSON
  8. "Connect webhook to a trigger or automation" ☑️ This is important if you're creating the webhook to react to ticket events
  9. Authentication: Choose API key, Basic Auth, or Bearer Token
  10. Click “Create Webhook”. You’ll now see it listed in your Webhooks section.

Integration with SixthSense Alert:

Sample template:

{
"ticket": {
"subject": "ALERT: {{alert_name}} detected in {{service_name}}",
"comment": {
"body": "ALERT_NAME: {{alert_name}}\nCAPABILITY: {{capability}}\nENTITY_NAME: {{service_name}}\nDESC: {{event_type}}\nCOMP: {{metric_name}}\nNOTES: {{tool_name}} has detected a problem with {{service_name}} application where {{metric_name}} was {{aggregator_operator}} {{threshold_value}} and the current value is around {{current_value}} for the last {{period}} min(s).\nTIME: {{timestamp}}\nTOOL_NAME: {{tool_name}}\nURL: {{url}}"
},
"priority": 3,
"status": 2,
"requester": {
"name": "SixthSense System",
"email": "kolla.rekha@rakuten.com"
}
}
}
webhook Zendesk

Please refer zendesk docs

Jira Integration

Jira is a popular project management and issue tracking tool developed by Atlassian. It's widely used by software development teams, IT support teams, and other business teams to plan, track, and manage their work.

Creating an API Token (Jira Cloud):
  1. Log in to your Atlassian account: Go to id.atlassian.com(opens in a new tab) and log in with the account you use to access Jira. This is the Atlassian account, not necessarily your Jira-specific username/password if you're using SSO.
  2. In the left-hand navigation, click on "Security." Then, click on "API tokens." If you don't see "API tokens" under Security, you might need to contact your Jira administrator, as they might have disabled this feature.
  3. Click the "Create API token" button.
  4. Label Your Token: Give your token a descriptive label (e.g., "My Webhook Token," "Postman Test Token"). This helps you remember what the token is used for.
  5. Click the "Create" button.
  6. Immediately copy the generated API token to a safe place. You will not be able to see it again after you close the dialog. If you lose it, you'll need to create a new one.
  7. Authentication with the API Token (Jira Cloud):The most common way to authenticate with the Jira API using an API token is with Basic Authentication. You'll combine your Atlassian account email address with the API token and then Base64 encode the result. See Jira API Tokens
    1. Username: Your Atlassian account email address (the one you used to log in to id.atlassian.com).
    2. Password/API Token: The API token you just created.
    3. Combine: Create a string username:api_token.
    4. Base64 Encode: Base64 encode the string using UTF-8 encoding.
"project": {
"key": "RSAO" //project key
},
"summary": "My webhook-created issue",
"description": {
"type": "doc",
"version": 1,
"content": [
{
"type": "paragraph",
"content": [
{
"text": "test",
"type": "text"
}
]
}
]
},
"issuetype": {
"name": "Task"
}

} }

Integration with SixthSense Alert:

Sample template:

{
"fields": {
"project": {
"key": "RSAO"
},
"summary": "ALERT: {{alert_name}} detected in {{service_name}}",
"description": {
"type": "doc",
"version": 1,
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Alert Details:\nService: {{service_name}}\nMetric: {{metric_name}}\nCondition: {{aggregator_operator}} {{threshold_value}}\nCurrent Value: {{current_value}}\nPeriod: {{period}} min(s)\nSeverity: {{severity}}\nTool: {{tool_name}}\nURL: {{url}}"
}
]
}
]
},
"issuetype": {
"name": "Task"
}
}
}
webhook Jira

MS Teams webhook Integration

  1. Open Microsoft Teams.
  2. Click Add channel to create a channel for your team.
  3. Click Manage channel.
  4. Click Edit under the Connectors.

Provide the necessary permissions for the user.

  1. Search for Incoming Webhook under the list of connectors for your team.
  2. Click Add if it is not added or click Configure.
  3. Provide the Name where the notifications will be received.
  4. Click Create.
  5. Copy the given URL which will be the webhook URL to create the Notification channel.
  6. Click Done once the URL is copied.
  7. Close the form.

The webhook notification channel is created. Add notification channel using the following procedure.

  1. Login to the Observability portal.
  2. Navigate to the Notification channels on the left pane.
  3. Click Add channel.
  4. Select Webhook from the Channel type drop-down list.
  5. Use the Teams Webhook variable as per the SixthSense webhook variables and change the json file in the editor as follows:
{
"@type": "MessageCard",
"@context": "http://schema.org/extensions",
"themeColor": "FF0000",
"summary": "{{alert_name}}",
"sections": [
{
"activityTitle": "{{alert_name}}",
"activitySubtitle": "{{tool_name}} detected a problem",
"activityImage": "https://example.com/path/to/icon.png",
"facts": [
{
"name": "Capability",
"value": "{{capability}}"
},
{
"name": "Severity",
"value": "{{severity}}"
},
{
"name": "Entity Name",
"value": "{{service_name}}"
},
{
"name": "Description",
"value": "{{event_type}}"
},
{
"name": "Component",
"value": "{{metric_name}}"
},
{
"name": "Notes",
"value": "{{tool_name}} has detected a problem with {{service_name}} application where {{metric_name}} was {{aggregator_operator}} {{threshold_value}} and the current value is around {{current_value}} for the last {{period}} min(s)."
},
{
"name": "Time",
"value": "{{timestamp}}"
},
{
"name": "Tool Name",
"value": "{{tool_name}}"
}
],
"markdown": true
}
],
"potentialAction": [
{
"@type": "OpenUri",
"name": "View Details",
"targets": [
{
"os": "default",
"uri": "{{url}}"
}
]
}
]
}

“name”: Microsoft teams variables is mapped with “value”: the SixthSense variables.

The Notification received will appear similar to the following screen.
  1. Click View Details to navigate to the SixthSense dashboard.
webhook - ms team