Usage metering information sent to WebSphere Automation

The usageMetering feature in Liberty sends registration information and usage metrics to the usage metering service in WebSphere® Automation.

WebSphere Automation uses the registration information and usage metrics so that you can register your Liberty servers to WebSphere Automation. When you register Liberty servers, you also enable them for security monitoring. You can enable your servers for other monitoring, such as health monitoring.
Stabilized feature: The usage metering feature is stabilized. It currently is used with WebSphere Automation. For application development or general health status needs, you can use the MicroProfile metrics feature. For more information about available metrics, see Monitoring with MicroProfile metrics.

Registration

When the usage metering feature is enabled, the following information about the Application Server process is sent on registration to the WebSphere Automation metering service.
  • Unique server instance identifier
    Each server instance is uniquely identified by four attributes:
    • Product identifier
    • Host name, first 12 characters of a Docker container ID, or the Cloud Foundry application_name variable
    • Product installation or directory
    • Server name, full Docker container ID, or the Cloud Foundry application_id_INSTANCE_INDEX variable
  • Product edition
  • Enabled features
  • Admin Center URL
  • Installed APARs
  • JVM version and fix level
  • Operating system version
  • Group identifier, such as department identifier or a usage identifier
Important: The Admin Center URL is only provided if the adminCenter-1.0 feature is enabled.

Usage

After successful registration, the usage metering feature collects and reports metrics to the metering service every 15 minutes.

The Virtual Processor Cores metric is required. The other metrics are optional.
Metric Identifier Description
CPU Time CPU_TIME CPU time that the process uses for the report interval (OperatingSystemMXBean.getProcessCpuTime())
Java Initial Memory JAVA_INIT_MEMORY Initial amount of memory requested at virtual machine startup (MemoryUsage.getInit())
Java Used Memory JAVA_USED_MEMORY Current number of megabytes used for memory (MemoryUsage.getUsed())
Java Committed Memory JAVA_COMMITTED_MEMORY Current number of megabytes committed to memory (MemoryUsage.getCommitted())
Java Maximum Memory JAVA_MAX_MEMORY Maximum memory size in megabytes (MemoryUsage.getMax())
Java Memory After Garbage Collection JAVA_MEMORY_AFTER_GC If the JVM supports garbage collection, the number of megabytes that is used for memory after the last garbage collection (only if supported by the JVM)
Servlet Requests SERVLET_REQUESTS Number of servlet requests made during the report interval, if available. Obtained from the monitor-1.0 feature
Total Physical Memory TOTAL_PHYSICAL_MEMORY The total amount of physical memory (OperatingSystemMXBean.getTotalPhysicalMemorySize())
Virtual Processor Cores VIRTUAL_PROCESSOR_CORES Number of processors available to the Java virtual machine. Container limitations are accounted for and can result in a fractional value.

Determining virtual processor cores

The virtual processor cores metric supports the reporting of container limitations, including fractional values, when Docker, Kubernetes or Cloud Foundry settings are used to constrain accessible processors. The virtual processor cores metric is identified by a dividing quota, if set, by a period. A quota specifies the portion of time that is allocated to the current process and the period provides the length of time in microseconds.
/sys/fs/cgroup/cpu/cpu.cfs_quota_us
/sys/fs/cgroup/cpu/cpu.cfs_period_us

For Docker, the CPU limits can be configured with -cpus setting or the -cpu-period and -cpu-quota settings. For Cloud Foundry, limitations can be defined with the cpu_quota_per_share_in_us identifier. If no such limitation is set, then the Runtime.getRuntime().availableProcessors() object is used for the virtual processor cores metric.

Configuring Reported Metrics

You can limit which of the optional metrics to report to the metering service. The virtual processor cores metric is not optional and is always reported. For Liberty, you can specify the optionalMetrics attribute of the <usageMetering> feature in the server.xml file to limit which metrics are reported to the metering service.