Webhook


Setup Webhooks to receive audits.

Set up 

1. Visit Admin → Connections and click New connection

Lenses.io Connection

2. Select Webhook

Webhook Connection

3. Provide a name and configuration

You can also optionally add tags (i.e. dev). Then add the Webhook configuration information.

Webhook Connection

Add channel 

Next add one or multiple target Webhook channels.

1. Visit Admin → (Audits) Channels and click Webhook

Webhook audit channel

2. Setup the configuration options

Webhook audit details

For example the above will create the DevOps Audit Webhook, that is using the Webhook connection to POST audit information to the Webhook endpoint.

You can optionally add a specific request path for the POST, custom HTTP headers and body payload. Moreover, you can optionally disable SSL certificate verification.

Template variables 

In Request path, HTTP Headers and Body payload fields there is a possibility of using template variables, which will be translated to audit specific fields. In order to use template variables you have to use this format: {{VARIABLE}}, i.e. {{TYPE}}.

Supported template variables:

  • TYPE - high level source of the audit (i.e. USER in case of action related to user management - like user creation).
  • ACTION - name of the action audit refers to (i.e. UPDATE in case of editing group).
  • USER
  • TIMESTAMP
  • RESOURCE_ID - low level source id of the audit (i.e. alert id group in case of creating new alert rule). Can be empty for some audits.
  • RESOURCE_NAME - low level source name of the audit (i.e. connection name in case of creating new connection). Can be empty for some audits.
  • CREDS - CREDS[0] etc. - variables specified in connection’s Credentials as a list of values separated by comma.

An example 

If for example you create a rule to send audits to Webhook, then the moment a new audit entry is added, an HTTP POST will be made to the Webhook endpoint.

--
Last modified: September 26, 2024