Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add jolokia2 to Kafka container for collecting JMX metrics #531

Merged
merged 1 commit into from
May 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions so-kafka/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Copyright Security Onion Solutions LLC and/or licensed to Security Onion Solutions LLC under one
# or more contributor license agreements. Licensed under the Elastic License 2.0 as shown at
# or more contributor license agreements. Licensed under the Elastic License 2.0 as shown at
# https://securityonion.net/license; you may not use this file except in compliance with the
# Elastic License 2.0.

Expand All @@ -11,6 +11,9 @@ LABEL description="Kafka running in a docker container for use with Security Oni
ARG KAFKA_DOWNLOAD=https://downloads.apache.org/kafka/3.7.0/
ARG KAFKA_TARNAME=kafka_2.13-3.7.0

ARG JOLOKIA_VERSION=2.0.2
ARG JOLOKIA_DOWNLOAD=https://github.com/jolokia/jolokia/releases/download/v${JOLOKIA_VERSION}/jolokia-${JOLOKIA_VERSION}-bin.tar.gz

RUN dnf update -y && \
dnf install -y java-11-openjdk java-11-openjdk-devel curl && \
dnf clean all
Expand All @@ -21,10 +24,14 @@ RUN groupadd --gid 960 kafka && \
adduser --uid 960 --gid 960 kafka

RUN curl -O ${KAFKA_DOWNLOAD}${KAFKA_TARNAME}.tgz && \
tar -xzf ${KAFKA_TARNAME}.tgz
tar -xzf ${KAFKA_TARNAME}.tgz && \
curl -LO ${JOLOKIA_DOWNLOAD} && \
tar -xzf jolokia-${JOLOKIA_VERSION}-bin.tar.gz

RUN rm -f ${KAFKA_TARNAME}.tgz && \
mv ${KAFKA_TARNAME} kafka && \
rm -f jolokia-${JOLOKIA_VERSION}-bin.tar.gz && \
mv jolokia-${JOLOKIA_VERSION} jolokia && \
chown -R 960:960 kafka

ENTRYPOINT ["/kafka/bin/kafka-server-start.sh", "/kafka/config/kraft/server.properties"]
ENTRYPOINT ["/kafka/bin/kafka-server-start.sh", "/kafka/config/kraft/server.properties"]
Loading