LogoLogo
What's New?Connect Agent ReleasesBook a DemoPricing
  • Documentation
  • Developers
  • Administration
  • OVERVIEW
    • JFrog Connect Overview
      • Architecture Overview
        • Connect Agent
        • Connect & JFrog Platform
      • Plan Your Update Strategy
        • Software Update Objectives & Concepts
        • Software Update Process & Procedures
  • Get Started
    • Create JFrog Connect Account
    • Log in to JFrog Connect
    • Network Requirements
    • Register Device
  • Manage your Fleet
    • Register Devices at Scale
      • Freeze Image on Device
      • Build Image with Agent
    • Register & Update Device at Once
    • Organize Your Fleet
      • Create Project
      • Move Device between Projects
      • Create Groups
        • Add Device to Group
        • Add Many Devices to Group
        • Change Group Name
        • Delete Group
      • Tag Devices
        • Remove a Tag
      • Remove Many Devices
  • Devices
    • Fleet Overview
      • Filter Devices
      • Locate Devices
    • Device Details
      • Delete a Device
      • Block Updates with Update Trigger
    • Update Connect Agent
    • Delete Many Devices
  • Deployment
    • Create Update Flow
      • Actions
        • Run Command
        • Run Script
        • Deploy File
        • Deploy Docker
          • Use Docker Image
          • Use Docker Compose
          • Get Artifactory Parameters
        • Clone Git Repository
        • Download Artifact
          • Get Artifactory Path
        • Download Release Bundle
          • Get Artifactory Parameters for Release Bundle
        • Update Image
        • Install Debian Package
          • Get Artifactory Parameters for Debian
      • Use Update Parameters
      • On Failure & Rollback
      • Vulnerability Scans
      • Sample Use Case: Build Update Flow for Reuse
    • Deploy Software
      • Set Application & Version
      • Set Alert upon Failure
      • Set Phased Rollout
      • View Deployment Progress
        • Detailed Deployment Information
        • Abort a Deployment
      • Deploy in Groups
      • Sample Use Case: Deploy Docker Images to Devices
  • Tools
    • Remote Tools
      • Use Terminal
      • Open Port Tunnel Session
        • Access with VNC
        • Connect with SSH
        • Access Device Web Applications
      • Run Commands Remotely
        • Run Command as Non-Root User
      • Get Device Files (Fetch Files)
    • Alerts
      • Create Channel
      • Set Webhook
    • Monitor
      • Resource Monitor
      • Process Monitor
  • Releases
    • What's New?
    • Connect Agent Release Notes
  • Troubleshooting
    • Connect Server Status
    • Troubleshoot Topics
      • Device Registration
      • Terminal Troubleshooting
Powered by GitBook
On this page
  • Set a Webhook
  • Payload Schema
  • Bundled Alerts Schema
  • Custom Headers
  • Preconfigured Webhook Templates
  • Slack
  • PagerDuty
  • What’s Next?

Was this helpful?

Export as PDF
  1. Tools
  2. Alerts

Set Webhook

Webhooks enable you to send JFrog Connect device alerts to a third-party application or to an application of your own. This page describes how to configure a webhook.

PreviousCreate ChannelNextMonitor

Last updated 5 months ago

Was this helpful?

You can use webhooks to post requests to your own application (e.g., your in-house dashboard application) or to a third-party application. The schema consists of a JSON payload that contains the device details along with custom headers you choose.

When your webhook channel is activated, if the channel does not receive any request within three attempts, it will be marked as invalid and will stop further attempts.

Set a Webhook

To use a webhook as a channel for receiving , do the following:

  1. Start the procedure to .

  2. For Channel Type, choose Webhook and enter the Webhook URL. This URL will receive post requests with the JSON payload you define.

  1. Configure the payload schema as described below and save your settings.

Payload Schema

You may use the default schema, or you may create a custom JSON payload by defining your own schema.

The schema can contain custom parameters. You just need to define additional variables using the Connect syntax.

Below is the list of Connect variables that can be used in the schema.

Variable
Value

"{{ALERT_NAME}}"

The name of the alert.

"{{ALERT_TYPE}}"

Alert monitor type: resources, application, or process

"{{ALERT_VALUE}}"

The threshold value that triggers an alert.

"{{STATE}}"

Whether the alert was Triggered or Finished.

"{{DEVICE_IP}}"

The last IP address of the device.

"{{DEVICE_ID}}"

The alphanumeric identifier of the device.

"{{DEVICE_NAME}}"

The name given to the device.

"{{DEVICE_GROUP}}"

The group that the device belongs to.

"{{DEVICE_PROJECT}}"

The project that the device belongs to.

"{{DEVICE_ADDRESS}}"

The physical location (e.g., street address) according to the IP address of the device.

"{{DESTINATION}}"

The Webhook Channel URL.

"{{DASHBOARD_LINK}}"

Platform link to see further information about the alert.

"{{ALERT_TIMESTAMP}}"

The triggered or finished time of the alert.

"{{TRIGGERED_VALUE}}"

The value of the parameter (e.g. CPU or disk space) that triggered the alert.

Bundled Alerts Schema

When bundled alerts are enabled in the channel configuration, the following variables can be used in the schema.

Variable
Value

"{{ALERT_NAME}}"

List of alert names in the alert bundle.

"{{ALERT_TYPE}}"

List of alert monitor types (resources, application, process).

"{{ALERT_VALUE}}"

List of values of the parameter (e.g. CPU or disk space) that triggered the alert.

"{{STATE}}"

List of states (Triggered or Finished) for the devices.

"{{DEVICE_NAME}}"

List of IP addresses of the devices.

"{{DEVICE_ID}}"

List of device identifiers.

Custom Headers

You can add custom request headers for use in your schema. The default request header (i.e., if you don’t add any custom headers) in Connect is:

Content-type: application/json.

Preconfigured Webhook Templates

You can use preconfigured webhook templates for third-party products. Below are examples for Slack and PagerDuty.

Slack

Example Slack Payload

{ 
    "attachments":[{
        "ts": "{{ALERT_TIMESTAMP}}",
         "color": "#cc0000",
         "title": ":frog:  {{ALERT_NAME}}",
         "fields":
         [{
            "short": false,
            "title": "Alert Type",
            "value": "{{ALERT_TYPE}}"
           },
           {
              "short": true,
              "title": "Configuration value",
              "value": "{{ALERT_VALUE}}"
           },
           {
              "short": true,
              "title": "Actual value",
               "value": "{{TRIGGERED_VALUE}}"
           },
           {
               "short": true,
               "title": "Device name",
                "value": "{{DEVICE_NAME}}"
           },
           {
               "short": true,
                "title": "Device id",
                "value": "{{DEVICE_ID}}"
           },
           { 
               "short": true,
               "title": "Project",
               "value": "{{DEVICE_PROJECT}}"
           },
           { 
               "short": true,
               "title": "Group",
               "value": "{{DEVICE_GROUP}}"
           },
           {
               "short": true,
                "title": "Device location",
                 "value": "{{DEVICE_ADDRESS}}"
            },
            { 
                "short": true,
                 "title": "IP Address",
                  "value": "{{DEVICE_IP}}"
          }], 
          "pretext": "You have a {{STATE}} alert",
          "mrkdwn_in": ["text"], 
          "title_icon": "https://findicons.com/files/icons/624/zoom_eyed_creatures/128/frog.png",
          "title_link": "{{DASHBOARD_LINK}}"
          }]
}

PagerDuty

When the service is created, you will receive a service key. Use the service key as the value for routing_key, as shown in the example below.

Example PagerDuty Payload

{
   "payload": { 
      "summary": "You have a {{STATE}} alert - {{ALERT_NAME}} for device {{DEVICE_NAME}}",
      "timestamp": "2015-07-17T08:42:58.315+0000",
      "source": "monitoringtool:cloudvendor:central-region-dc-01:852559987:cluster/api-stats-prod-003",
      "severity": "info",
      "component": "postgres",
      "group": "{{DEVICE_GROUP}}",
      "class": "{{ALERT_TYPE}}",
      "custom_details":
         {
            "Device name": "{{DEVICE_NAME}}",
            "Device ID": "{{DEVICE_ID}}",
            "Device project": "{{DEVICE_PROJECT}}",
            "Device group": "{{DEVICE_GROUP}}",
            "Device location": "{{DEVICE_ADDRESS}}",
            "Device IP Address": "{{DEVICE_IP}}",
            "Alert name": "{{ALERT_NAME}}",
            "Alert type": "{{ALERT_TYPE}}",
            "Configuration value": "{{DEVICE_PROJECT}}",
            "Actual value": "{{DEVICE_GROUP}}"
         }
      },
      "routing_key": Your SERVICE_KEY,
      "dedup_key": "{{DEVICE_ID}}_{{ALERT_ID}}",
      "images": [{
         "src": "https://uploads-ssl.webflow.com/611ba30e0c70a64ebb003853/628a41f9136f611aa0a1ab6a_jfrog-logo.png",
         "href": "https://example.com/",
         "alt": "Dashboard"
       }],
       "links": [{
            "href": "https://example.com/",
            "text": "Dashboard"
       }],  
      "event_action": "trigger"
      }

What’s Next?

Reach out to Slack to configure your application and receive a unique webhook URL. For more information, see .When Slack is configured, you can use the URL provided as the webhook URL.

To set up a webhook to PagerDuty, you need to create a service with event API integration. For more information, see .

Learn how to from an edge device.

Sending Messages using incoming Webhooks
PagerDuty Services and Integrations
get files
alerts
create a channel