Skip to content

Latest commit

 

History

History
54 lines (44 loc) · 2 KB

README.md

File metadata and controls

54 lines (44 loc) · 2 KB

JVM observability lib

This lib can be used to generate dashboards, rows, panels, and alerts for JVM monitoring.

Supports the following sources:

lowercaseOutputName: true
lowercaseOutputLabelNames: true
rules:
  - pattern: java.lang<type=(.+), name=(.+)><(.+)>(\w+)
    name: java_lang_$1_$4_$3_$2
  - pattern: java.lang<type=(.+), name=(.+)><>(\w+)
    name: java_lang_$1_$3_$2
  - pattern : java.lang<type=(.*)>

Import

jb init
jb install https://github.com/grafana/jsonnet-libs/jvm-observ-lib

Example: Generate monitoring-mixin

local config = import './config.libsonnet';
local jvmlib = import 'jvm-observ-lib/main.libsonnet';
local jvm =
  jvmlib.new()
  + jvmlib.withConfigMixin(
    {
        filteringSelector: 'job!=""',
        groupLabels: ['job'],
        instanceLabels: ['instance'],
        uid: 'jvm-sample',
        dashboardNamePrefix: 'JVM',
        dashboardTags: ['java', 'jvm'],
        metricsSource: 'java_micrometer', // or java_otel, prometheus,
    }
  );
jvm.asMonitoringMixin()

image