bin/kafka-topics.sh --zookeeper localhost:2181 --list
bin/kafka-topics.sh --zookeeper localhost:2181 --describe --topic mytopic
bin/kafka-topics.sh --zookeeper localhost:2181 --alter --topic mytopic --config retention.ms=1000
... wait a minute ...
bin/kafka-topics.sh --zookeeper localhost:2181 --list
bin/kafka-topics.sh --zookeeper localhost:2181 --describe --topic mytopic
bin/kafka-topics.sh --zookeeper localhost:2181 --alter --topic mytopic --config retention.ms=1000
... wait a minute ...
| KEY=XXXXXXXXXXXX | |
| HOST="https://metrics.crisidev.org" | |
| mkdir -p dashboards && for dash in $(curl -k -H "Authorization: Bearer $KEY" $HOST/api/search | jq -r '.[].uri|ltrimstr("db/")'); do | |
| curl -k -H "Authorization: Bearer $KEY" $HOST/api/dashboards/db/$dash | jq '.dashboard' > dashboards/$dash.json | |
| done |
| #!/usr/bin/env bash | |
| # Kafka utilises JMX to provide an access to some useful data | |
| # This script uses command line JMX client to retrieve those metrics from a Kafka broker | |
| # and publish them to AWS Cloudwatch | |
| # JMX Client: http://crawler.archive.org/cmdline-jmxclient/downloads.html | |
| # Runtime dependencies: Java, AWS CLI, IAM role attached to the instance with permissions | |
| # to put Cloudwatch metrics |