Skip to content

Contains Dockerfile and usage examples to use the prometheus jmx exporter as initContainer in kubernetes

Notifications You must be signed in to change notification settings

fino-digital/jmx-exporter-prometheus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

Introduction

This container packages the prometheus jmx-exporter java agent that can be used to monitor JVM applications.

Usage

This container is best used as initContainer. Copy the agent over to the shared volume

spec:
  initContainers:
  - name: prometheus-jmx-exporter
    image: finodigital/jmx-exporter-prometheus:0.19.0
    env:
    - name: shared-volume
      emptyDir: {}
    volumeMounts:
    - mountPath: /jmx-agent
      name: shared-volume
    args:
      - -c
      - mkdir -p /jmx-agent && cp -r /agent/jmx_prometheus_javaagent.jar /jmx-agent/agent.jar
    command:
      - sh

Then attach the agent to your java application, for example with JAVA_TOOL_OPTIONS

spec:
  containers:
    - name: your-application
      image: your-image
      env:
        - name: JAVA_TOOL_OPTIONS
          value: -javaagent:/jmx-agent/agent.jar=1234:/path/to/config

// TODO: // - Describe/open port // - configuration (as config map)

About

Contains Dockerfile and usage examples to use the prometheus jmx exporter as initContainer in kubernetes

Resources

Stars

Watchers

Forks

Packages