Skip to content

Monitor a P6 instance

Prometheus

An endpoint is provided as standard to connect with Prometheus to facilitate monitoring.

In addition to the standard HTTP and HTTPS ports, Platform 6 provides an admin port. This is an HTTP port that is not secured via the standard Json Web Tokens, mandated by the other ports.

This port is intended for use by trusted monitoring systems only, allowing connection through the careful use of docker networking and/or firewall(s) configuration.

The default admin port is 8091 but may be changed using the configuration attribute:

jetty.admin.port

When configuring Prometheus the URL of the metrics endpoint is required. By default, Platform 6 provides:

http://<hostname>:8091/metrics
This endpoint provides a Prometheus formatted TEXT response and is designed to be both efficient and induce only a small processing load on Platform 6 to generate.

Available Metrics Groups

  • p6core_
  • jetty_
  • jvm_
  • process_

In addition to p6core_ application metrics, metrics on jetty_ (The Web Server), jvm_ (The Java Virtual Machine), and process_ (The Host Process) are available.

Application Metrics: p6core_

Two types of p6core_ metrics are available:

  • log4j_
  • counters_

log4j

  • warn_total: total log4j WARN log entries written since Platform 6 was started
  • error_total: total log4j ERROR log entries written since Platform 6 was started
  • fatal_total: total log4j FATAL log entries written since Platform 6 was started

counters

  • [appKey]_[counter name]

All defined Platform 6 counters with none empty values will automatically appear as counters metrics available to Prometheus.

Note

To ensure metrics can be provided with minimal load on Platform 6 runtime, counter service values are cached for a number of milliseconds The default time to live for this cache is 60 seconds and may be customised using the configuration attribute: p6.service.counters.metrics.cache.ttl

Hawtio

Monitoring is available in a distinct web application using Hawtio.

You can now access your monitoring console via the admin port URL:

http://<hostname>:8091/hawtio/

Note

It could take some time once logged in to display the management console while the JMX MBeans are being scanned.

Management screens

Once connected you can access multiple screens like:

  • Camel
  • JMX
  • Runtime
  • Logs

Camel

Hawtio - Camel

You can view inside the Camel entry menu multiple information about the Camel Contexts:

  • the routes
  • the endpoints
  • the components
  • and the MBeans

Cf. Route Guide for more information

JMX

Hawtio - JMX

JMX (Java Management Extensions) is a Java technology that supplies tools for managing and monitoring. Using the JMX entry menu will give you access to a list of MBeans you can manage or monitor. You can also perform some actions depending on the MBean you select.

Runtime

Hawtio - Runtime

You can view inside the Runtime entry menu the following information:

  • System properties (read only)
  • Metrics, about the JMV and the System in live mode
  • running Threads