Skip to content
Closed
Show file tree
Hide file tree
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
20 changes: 20 additions & 0 deletions collector/wildfly/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
FROM curlimages/curl:7.82.0 as curler
ARG JMX_JAR_VERSION=v1.14.0
USER root

RUN curl -L \
--output /opentelemetry-jmx-metrics.jar \
"https://github.com/open-telemetry/opentelemetry-java-contrib/releases/download/${JMX_JAR_VERSION}/opentelemetry-jmx-metrics.jar"

RUN curl -L -s \
"https://github.com/open-telemetry/opentelemetry-collector-releases/releases/download/v0.53.0/otelcol-contrib_0.53.0_linux_amd64.tar.gz" | \
tar -xvz -C /

FROM ibmjava:8-jre
WORKDIR /

COPY --from=curler /opentelemetry-jmx-metrics.jar /opt/opentelemetry-jmx-metrics.jar
COPY --from=curler /otelcol-contrib /otelcol-contrib

ENTRYPOINT [ "/otelcol-contrib" ]
CMD ["--config", "/etc/otel/config.yaml"]
27 changes: 27 additions & 0 deletions collector/wildfly/collector.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
receivers:
jmx/wildfly:
jar_path: /opt/opentelemetry-jmx-metrics.jar
endpoint: wildfly:19990
target_system: jvm,wildfly
collection_interval: 5s

processors:
batch:

exporters:
logging:
loglevel: debug
otlp:
endpoint: ingest.lightstep.com:443
headers:
"lightstep-access-token": "${LS_ACCESS_TOKEN}"

service:
telemetry:
logs:
level: "debug"
pipelines:
metrics:
receivers: [jmx/wildfly]
processors: [batch]
exporters: [logging,otlp]
30 changes: 30 additions & 0 deletions collector/wildfly/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
version: '3.7'
services:
wildfly:
build:
context: ./wildfly
args:
JAVA_OPTS_1: '-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=19990 -Dcom.sun.management.jmxremote.rmi.port=19990 -Djava.rmi.server.hostname=wildfly -Dcom.sun.management.jmxremote.local.only=false -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false '
LOGMANAGER: '-Djboss.modules.system.pkgs=org.jboss.byteman,org.jboss.logmanager -Djava.util.logging.manager=org.jboss.logmanager.LogManager -Dorg.jboss.logging.Logger.pluginClass=org.jboss.logging.logmanager.LoggerPluginImpl -Dsun.util.logging.disableCallerCheck=true '
LOGMANAGER_JAR: '/modules/system/layers/base/org/jboss/logmanager/main/jboss-logmanager-2.1.18.Final.jar:'
WILDLFY_COMMON_JAR: '/modules/system/layers/base/org/wildfly/common/main/wildfly-common-1.5.4.Final.jar'
container_name: wildfly
ports:
- 8080:8080
- 19990:9990
networks:
- integrations
volumes:
- "./ping/deployments:/opt/jboss/wildfly/standalone/deployments"
otel-collector:
container_name: otel-collector
build: .
command: ["--config=/conf/collector.yml"]
environment:
LS_ACCESS_TOKEN: ${LS_ACCESS_TOKEN}
networks:
- integrations
volumes:
- ./collector.yml:/conf/collector.yml:rw
networks:
integrations:
Binary file added collector/wildfly/ping/deployments/helloworld.war
Binary file not shown.
19 changes: 19 additions & 0 deletions collector/wildfly/wildfly/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
FROM jboss/wildfly:23.0.1.Final

ARG BOOTCLASS_PATH="-Xbootclasspath/a:"

RUN /opt/jboss/wildfly/bin/add-user.sh admin admin --silent

ARG JAVA_OPTS_1
ARG LOGMANAGER
ARG LOGMANAGER_JAR
ARG WILDLFY_COMMON_JAR

ENV JAVA_OPTS="${JAVA_OPTS}${JAVA_OPTS_1}${LOGMANAGER}${BOOTCLASS_PATH}${JBOSS_HOME}${LOGMANAGER_JAR}${JBOSS_HOME}${WILDLFY_COMMON_JAR}"


ENTRYPOINT /opt/jboss/wildfly/bin/standalone.sh \
-b=0.0.0.0 \
-bmanagement=0.0.0.0 \
-Djboss.server.default.config=standalone-full-ha.xml \
-Djava.net.preferIPv4Stack=true