Skip to main content
Skip table of contents

Operation: ListMetrics

The ListMetrics operation returns all metrics data of the system.

For this operation, the following parameters have to be set:

  • protocol

  • host

  • port

  • path

Input

No input is required for this operation.

Output with wildfly as endpoint

With wildfly as endpoint, the adapter generates an XML file in the following format:

CODE
<?xml version="1.0" encoding="UTF-8"?>
<metrics>
   <metric>
      <name>base_classloader_loadedClasses_total</name>
      <help>Displays the total number of classes that have been loaded since the Java virtual machine has started execution.</help>
      <type>counter</type>
      <value>35672.0</value>
   </metric>
   <metric>
      <name>base_classloader_loadedClasses_count</name>
      <help>Displays the number of classes that are currently loaded in the Java virtual machine.</help>
      <type>gauge</type>
      <value>35023.0</value>
   </metric>
   <metric>
      <name>base_classloader_unloadedClasses_total</name>
      <help>Displays the total number of classes unloaded since the Java virtual machine has started execution.</help>
      <type>counter</type>
      <value>649.0</value>
   </metric>
   <metric>
      <name>base_cpu_availableProcessors</name>
      <help>Displays the number of processors available to the Java virtual machine. This value may change during a particular invocation of the virtual machine.</help>
      <type>gauge</type>
      <value>16.0</value>
   </metric>
   <metric>
      <name>base_cpu_processCpuLoad</name>
      <help>Displays the "recent cpu usage" for the Java Virtual Machine process.</help>
      <type>gauge</type>
      <value>8.727748738848019E-5</value>
   </metric>
   <metric>
      <name>base_cpu_processCpuTime_seconds</name>
      <help>Displays the CPU time used by the process on which the Java virtual machine is running in nanoseconds</help>
      <type>gauge</type>
      <value>127.40625000000001</value>
   </metric>
   <metric>
      <name>base_cpu_systemLoadAverage</name>
      <help>Displays the system load average for the last minute. The system load average is the sum of the number of runnable entities queued to the available processors and the number of runnable entities running on the available processors averaged over a period of time. The way in which the load average is calculated is operating system specific but is typically a damped time-dependent average. If the load average is not available, a negative value is displayed. This attribute is designed to provide a hint about the system load and may be queried frequently. The load average may be unavailable on some platform where it is expensive to implement this method.</help>
      <type>gauge</type>
      <value>-1.0</value>
   </metric>
   <metric>
      <name>base_gc_total</name>
      <help>Displays the total number of collections that have occurred. This attribute lists -1 if the collection count is undefined for this collector.</help>
      <type>counter</type>
      <labels>
         <label name="name">G1 Old Generation</label>
      </labels>
      <value>0.0</value>
   </metric>
  ...   
</metrics>

Data for wildfly can also be accessed via the following URL:

http://localhost:9990/metrics

Output with Keycloak as endpoint

With Keycloak as endpoint, the adapter generates an XML file in the following format:

CODE
<?xml version="1.0" encoding="UTF-8"?>
<metrics>
   <metric>
      <name>base_classloader_loadedClasses_count</name>
      <help>Displays the number of classes that are currently loaded in the Java virtual machine.</help>
      <type>gauge</type>
      <value>18209.0</value>
   </metric>
   <metric>
      <name>base_classloader_loadedClasses_total</name>
      <help>Displays the total number of classes that have been loaded since the Java virtual machine has started execution.</help>
      <type>counter</type>
      <value>18308.0</value>
   </metric>
   <metric>
      <name>base_classloader_unloadedClasses_total</name>
      <help>Displays the total number of classes unloaded since the Java virtual machine has started execution.</help>
      <type>counter</type>
      <value>99.0</value>
   </metric>
   <metric>
      <name>base_cpu_availableProcessors</name>
      <help>Displays the number of processors available to the Java virtual machine. This value may change during a particular invocation of the virtual machine.</help>
      <type>gauge</type>
      <value>16.0</value>
   </metric>
   ...
   <metric>
      <name>base_gc_time_total_seconds</name>
      <help>Displays the approximate accumulated collection elapsed time in milliseconds. This attribute displays -1 if the collection elapsed time is undefined for this collector. The Java virtual machine implementation may use a high resolution timer to measure the elapsed time. This attribute may display the same value even if the collection count has been incremented if the collection elapsed time is very short.</help>
      <type>counter</type>
      <labels>
         <label name="name">G1 Old Generation</label>
      </labels>
      <value>0.0</value>
   </metric>
  ...
</metrics>

For Keycloak, the data can also be accessed via the following URL:

http://localhost:8085/auth/metrics

Elements in the Output

The following elements are included in the output for wildfly and Keycloak:

Element

Description

<metrics>

Root element for the ListMetricsoperation.

<metric>

The <metric> element contains the following elements:

  • <name>

  • <help>

  • <type>

  • <labels>

  • <value>

<name>

Name of the measured value

<help>

Description of the measured value

<type>

Type of the measured value

Possible values:

  • gauge

  • counter

<labels>

Name of the subdeployment

The <label> element contains the <name> attribute with the name of the subdeployment.

<value>

Measured value

Possible values:

Any decimal number

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.