Skip to content

Commit

Permalink
add jmx for cruise control
Browse files Browse the repository at this point in the history
  • Loading branch information
zmraul committed Jul 18, 2024
1 parent c266f9c commit 82cba59
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
5 changes: 5 additions & 0 deletions snap/local/etc/cruise-control/jmx_cruise_control.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
lowercaseOutputName: true
rules:
- pattern: kafka.cruisecontrol<name=(.+)><>(\w+)
name: kafka_cruisecontrol_$1_$2
type: GAUGE
8 changes: 7 additions & 1 deletion snap/local/opt/cruise-control/bin/start-wrapper.bash
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,13 @@

set -e

unset KAFKA_JMX_OPTS
# Cruise control uses the same var for JMX metrics. To allow both to be used on the same machine,
# use a specific var for CC and override during startup.
if [ "x$CC_JMX_OPTS" != "x" ]; then
export KAFKA_JMX_OPTS=${CC_JMX_OPTS}
else
unset KAFKA_JMX_OPTS
fi

if [ "x$KAFKA_LOG4J_OPTS" = "x" ]; then
export KAFKA_LOG4J_OPTS="-Dcruisecontrol.logs.dir=${LOG_DIR} -Dlog4j.configurationFile=${SNAP_DATA}/etc/cruise-control/log4j.properties -Dcruisecontrol.log.level=${KAFKA_CFG_LOGLEVEL:-INFO}"
Expand Down

0 comments on commit 82cba59

Please sign in to comment.