Quotas

This page describes the commands for mamaging Kafka quotas in Lenses via the CLI.

View quotas

lenses-cli quotas [--output json/table/yaml]

Create and update quotas for users

lenses-cli quota users set [--quota-user="user"] [--quota-client=""] \
    --quota-config="{\"producer_byte_rate\": \"100000\",\"consumer_byte_rate\": \"200000\",\"request_percentage\": \"75\"}"

From a file.

lenses-cli quota users set ./quota.yaml

File example:

user: user
clientID: "*"
config:
  ProducerByteRate: "100000"
  ConsumerByteRate: "200000"
  RequestPercentage: "75"

Create and update quotas for clients

lenses-cli quota clients set [--quota-client=""] \
    --quota-config="{\"producer_byte_rate\": \"100000\",\"consumer_byte_rate\": \"200000\",\"request_percentage\": \"75\""

From a file.

lenses-cli quota clients set ./quota-clients.yaml

Example file.

clientID: "*"
config:
  ProducerByteRate: "100000"
  ConsumerByteRate: "200000"
  RequestPercentage: "75"

Remove user quota config’s specific properties

lenses-cli quota users delete [--quota-client=""] [--quota-user=""] \
    producer_byte_rate consumer_byte_rate request_percentage

Delete the default user quota

lenses-cli quota users delete

Delete for a specific user quota

lenses-cli quota users delete \
    --quota-user="user"

Delete for a specific user and client

lenses-cli quota users delete \
    --quota-user="user" \
    --quota-client="clientID"
lenses-cli quota users delete \
    --quota-user="user" \
    request_percentage

Remove client quota config’s specific properties

If empty then all properties will be passed on automatically and the client quota will be removed entirely.

lenses-cli quota clients delete [--quota-client=""] \
    producer_byte_rate consumer_byte_rate request_percentage

Delete the default client quota

lenses-cli quota clients delete

Delete for a specific client quota

lenses-cli quota clients delete \
    --quota-client="clientID"

Delete for a specific client quota’s property

lenses-cli quota clients delete \
    --quota-client="clientID" \
    request_percentage

Last updated

Logo

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