Audit Channels

This page describes the commands to manage audit channels in Lenses via the CLI.

List audit channels

Basic list

lenses-cli auditchannels

Detailed view

lenses-cli auditchannels --details

List audit channels with possible flags

lenses-cli auditchannels \
--page=1 \
--pageSize=10 \
--sortField="name" \
--sortOrder="asc" \
--templateName="test" \
--channelName="slack"

List audit channel templates

When creating audit channels, one of the existing predefined channel templates needs to be used.

Such a command lists all available audit channel templates:

lenses-cli auditchannel-templates

To get all the details, use JSON format:

lenses-cli auditchannel-templates --output JSON

Create a new audit channel

lenses-cli auditchannels create \
  --name "my-audit-channel-1" \
  --connectionName="w1" \
  --templateName="Webhook" \
  --properties="[{\"key\":\"body\",\"value\":\"payload1-created\"},{\"key\":\"insecure\",\"value\":true},{\"key\":\"method\",\"value\":\"GET\"}]"

Create a new audit channel using a YAML file:

name: "my-audit-channel-2"
templateName: "Webhook"
connectionName: "w1"
properties:
  - key: "body"
    value: "body-payload"
  - key: "insecure"
    value: true
  - key: "method"
    value: "GET"

Save the file as audit_chann.yml and execute it like this:Copy

lenses-cli auditchannels create audit_chann.yml

Update an audit channel

lenses-cli auditchannels update \
  --id "ID_OF_THE_CHANNEL_TO_BE_UPDATED" \
  --name "my-audit-channel-2-updated" \
  --connectionName="w1" \
  --templateName="Webhook" \
  --properties="[{\"key\":\"body\",\"value\":\"payload1-created\"},{\"key\":\"insecure\",\"value\":true},{\"key\":\"method\",\"value\":\"GET\"}]"

Delete an audit channel

lenses-cli auditchannels delete \
    --channelID="701ff62c-8d14-4ef9-8dd0-fe2cd3c73779"

Last updated

Logo

2024 © Lenses.io Ltd. Apache, Apache Kafka, Kafka and associated open source project names are trademarks of the Apache Software Foundation.