4.3
You are viewing documentation for an older version of Lenses.io View latest documentation here
Kafka quotas
View, create, modify and delete quotas.
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 for 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"
Delete for a specific user quota’s property
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 for 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