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.
Last updated
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.
Last updated
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.
To use a webhook as a channel for receiving alerts, do the following:
Start the procedure to create a channel.
For Channel Type, choose Webhook and enter the Webhook URL. This URL will receive post requests with the JSON payload you define.
Configure the payload schema as described below and save your settings.
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.
"{{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.
When bundled alerts are enabled in the channel configuration, the following variables can be used in the schema.
"{{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.
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.
You can use preconfigured webhook templates for third-party products. Below are examples for Slack and PagerDuty.
Reach out to Slack to configure your application and receive a unique webhook URL. For more information, see Sending Messages using incoming Webhooks. 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 PagerDuty Services and Integrations.
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.
Learn how to get files from an edge device.