-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add prometheus jmx exporter in Dockerfile and upgrade depot
- Loading branch information
1 parent
9a118de
commit 3b48c61
Showing
3 changed files
with
41 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,22 @@ | ||
FROM adoptopenjdk:8-jdk-openj9 AS GRADLE_BUILD | ||
RUN mkdir -p ./build/libs/ | ||
RUN curl -L http://search.maven.org/remotecontent?filepath=org/jolokia/jolokia-jvm/1.6.2/jolokia-jvm-1.6.2-agent.jar -o ./jolokia-jvm-agent.jar | ||
RUN curl -L https://repo1.maven.org/maven2/io/prometheus/jmx/jmx_prometheus_javaagent/1.0.1/jmx_prometheus_javaagent-1.0.1.jar -o ./jmx_prometheus_javaagent.jar | ||
COPY ./ ./ | ||
RUN ./gradlew build | ||
|
||
FROM openjdk:8-jre | ||
COPY --from=GRADLE_BUILD ./build/libs/ /opt/firehose/bin | ||
COPY --from=GRADLE_BUILD ./jolokia-jvm-agent.jar /opt/firehose | ||
COPY --from=GRADLE_BUILD ./jmx_prometheus_javaagent.jar /opt/firehose | ||
COPY --from=GRADLE_BUILD ./src/main/resources/log4j.xml /opt/firehose/etc/log4j.xml | ||
COPY --from=GRADLE_BUILD ./src/main/resources/logback.xml /opt/firehose/etc/logback.xml | ||
COPY ./jmx_exporter_config.yml /opt/firehose/etc/jmx_exporter_config.yml | ||
WORKDIR /opt/firehose | ||
CMD ["java", "-cp", "bin/*:/work-dir/*", "org.raystack.firehose.launch.Main", "-server", "-Dlogback.configurationFile=etc/firehose/logback.xml", "-Xloggc:/var/log/firehose"] | ||
CMD ["java", \ | ||
"-javaagent:/opt/firehose/jmx_prometheus_javaagent.jar=9404:/opt/firehose/etc/jmx_exporter_config.yml", \ | ||
"-cp", "bin/*:/work-dir/*", \ | ||
"org.raystack.firehose.launch.Main", \ | ||
"-server", \ | ||
"-Dlogback.configurationFile=etc/firehose/logback.xml", \ | ||
"-Xloggc:/var/log/firehose"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
rules: | ||
- pattern: "java.lang<type=Memory><HeapMemoryUsage>.*" | ||
- pattern: "java.lang<type=GarbageCollector,name=*>" | ||
- pattern: "java.lang<type=Threading><DaemonThreadCount>" | ||
- pattern: "java.lang<type=OperatingSystem><SystemCpuLoad>" | ||
|
||
- pattern: 'kafka.consumer<type=consumer-fetch-manager-metrics, client-id=(.+), topic=(.+), partition=(.+)><>([a-zA-Z0-9-_]+)' | ||
name: kafka_consumer_fetch_manager_metrics_$4 | ||
type: GAUGE | ||
labels: | ||
client_id: "$1" | ||
topic: "$2" | ||
partition: "$3" | ||
help: "Kafka consumer fetch manager metrics $4 for client_id $1 topic $2 and partition $3" | ||
|
||
- pattern: 'kafka.consumer<type=consumer-coordinator-metrics, client-id=(.+)><>([a-zA-Z0-9-_]+)' | ||
name: kafka_consumer_coordinator_metrics_$2 | ||
type: GAUGE | ||
labels: | ||
client_id: "$1" | ||
help: "Kafka consumer coordinator metrics $2 for client_id $1" | ||
|
||
- pattern: 'kafka.consumer<type=consumer-metrics, client-id=(.+)><>([a-zA-Z0-9-_]+)' | ||
name: kafka_consumer_consumer_metrics_$2 | ||
type: GAUGE | ||
labels: | ||
client_id: "$1" | ||
help: "Kafka consumer consumer metrics $2 for client_id $1" |