Reputation: 500
we have Kafka cluster(v 0.8.1.1) with 6 brokers, how to monitor the disk utilization at cluster level. I want to monitor the total, available disk space at cluster level.
Upvotes: 0
Views: 207
Reputation: 500
Finally we came with below solution.
for x in $(/bin/cat /PATH/TO/Topic_list); do size=$(/bin/find /mnt/data*/kafka -type d -name $x-* -exec du -c {} + | /bin/awk '/total$/ {print $1}') ; [ -n "$size" ] && printf " %-25s:%-30s:%d\n" "$HOSTNAME" "$x" "$size" ; done
NOTE: log.dir =/mnt/data1/kafka ... /mnt/data/kafka
above script was executed in all kafka brokers and consolidated per topic.
Upvotes: 1