Hello, I recently installed JMX exporter and I’m using exactly this dashboard JMX Dashboard(Basic) | Grafana Labs
The problem is Dashboard shows only some of the data concerning memory, no CPU data at all.
(missing data is visible in the first screenshot)
What lines are needed to be in the jmx exporter configuration file for CPU data to be also shown?
This is mine wildfly-10.yaml configuration file:
---
lowercaseOutputName: true
lowercaseOutputLabelNames: true
whitelistObjectNames:
# Whitelist objects to be collected, for performance reason
# see https://github.com/prometheus/jmx_exporter/issues/246#issuecomment-367573931
# Each object in the rules below has to be added to whitelistObjectNames too !
# note that rules use regex (like "foo.*", whereas the whitelist use globbing expressions (like "foo*")
- "jboss.as:subsystem=messaging-activemq,server=*,jms-queue=*"
- "jboss.as:subsystem=messaging-activemq,server=*,jms-topic=*"
- "jboss.as:subsystem=datasources,data-source=*,statistics=*"
- "jboss.as:subsystem=datasources,xa-data-source=*,statistics=*"
- "jboss.as:subsystem=transactions*"
- "jboss.as:subsystem=undertow,server=*,http-listener=*"
- "jboss.as:subsystem=undertow,server=*,https-listener=*"
# ADDED
- "java.lang:type=OperatingSystem"
rules:
- pattern: "^jboss.as<subsystem=messaging-activemq, server=.+, jms-(queue|topic)=(.+)><>(.+):"
attrNameSnakeCase: true
name: wildfly_messaging_$3
labels:
$1: $2
- pattern: "^jboss.as<subsystem=datasources, (?:xa-)*data-source=(.+), statistics=(.+)><>(.+):"
attrNameSnakeCase: true
name: wildfly_datasource_$2_$3
labels:
name: $1
- pattern: "^jboss.as<subsystem=transactions><>number_of_(.+):"
attrNameSnakeCase: true
name: wildfly_transaction_$1
- pattern: "^jboss.as<subsystem=undertow, server=(.+), (http[s]?-listener)=(.+)><>(bytes_.+|error_count|processing_time|request_count):"
attrNameSnakeCase: true
name: wildfly_undertow_$4
labels:
server: $1
listener: $3
# ADDED JVM-level CPU metrics
- pattern: "^java.lang<type=OperatingSystem><>SystemCpuLoad"
name: jvm_system_cpu_load
- pattern: "^java.lang<type=OperatingSystem><>ProcessCpuLoad"
name: jvm_process_cpu_load
- pattern: "^java.lang<type=OperatingSystem><>ProcessCpuTime"
name: jvm_process_cpu_time
This is a standard wildfly-10.yaml example config which came along with jmx exporter, I tried adding following lines but it didn’t solve the problem:
# ADDED
- "java.lang:type=OperatingSystem"
# ADDED JVM-level CPU metrics
- pattern: "^java.lang<type=OperatingSystem><>SystemCpuLoad"
name: jvm_system_cpu_load
- pattern: "^java.lang<type=OperatingSystem><>ProcessCpuLoad"
name: jvm_process_cpu_load
- pattern: "^java.lang<type=OperatingSystem><>ProcessCpuTime"
name: jvm_process_cpu_time
Does somebody have an idea what configuration file for wildfly should look like for CPU metrcis to show up?