mirror of
https://github.com/OpenBankProject/OBP-API.git
synced 2026-02-06 11:47:18 +00:00
add jmx exporter to container image
This commit is contained in:
parent
8c422752e2
commit
1b55e99aab
5
.github/Dockerfile_PreBuild
vendored
5
.github/Dockerfile_PreBuild
vendored
@ -1,5 +1,10 @@
|
||||
FROM jetty:9.4-jdk11-alpine
|
||||
|
||||
ENV JMX_EXPORTER_VERSION=1.2.0
|
||||
|
||||
# To enable add "-javaagent:$JETTY_BASE/jmx-exporter.jar=8090:$JETTY_BASE/prometheus_config.yml" to the JAVA_OPTIONS
|
||||
RUN wget https://repo1.maven.org/maven2/io/prometheus/jmx/jmx_prometheus_javaagent/$JMX_EXPORTER_VERSION/jmx_prometheus_javaagent-$JMX_EXPORTER_VERSION.jar -o /var/lib/jetty/jmx-exporter.jar
|
||||
COPY .github/jmx_exporter.config /var/lib/jetty/prometheus_config.yml
|
||||
# Copy OBP source code
|
||||
# Copy build artifact (.war file) into jetty from 'maven' stage.
|
||||
COPY /obp-api/target/obp-api-1.*.war /var/lib/jetty/webapps/ROOT.war
|
||||
|
||||
15
.github/jmx_exporter.config
vendored
Normal file
15
.github/jmx_exporter.config
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
---
|
||||
lowercaseOutputLabelNames: true
|
||||
lowercaseOutputName: true
|
||||
whitelistObjectNames: ["java.lang:type=OperatingSystem"]
|
||||
blacklistObjectNames: []
|
||||
rules:
|
||||
- pattern: 'java.lang<type=OperatingSystem><>(committed_virtual_memory|free_physical_memory|free_swap_space|total_physical_memory|total_swap_space)_size:'
|
||||
name: os_$1_bytes
|
||||
type: GAUGE
|
||||
attrNameSnakeCase: true
|
||||
- pattern: 'java.lang<type=OperatingSystem><>((?!process_cpu_time)\w+):'
|
||||
name: os_$1
|
||||
type: GAUGE
|
||||
attrNameSnakeCase: true
|
||||
- pattern: ".*"
|
||||
Loading…
Reference in New Issue
Block a user