Skip to content

Monitor a P6 instance

Howtio

Monitoring is available in a distinct web application using Hawtio.

You can now access your monitoring console via the URL:

http://<hostname>:8080/hawtio/

Authentication

Hawtio - Login

To access the Hawtio console you need to log in using your P6 Auth credentials. Your account needs the [hawtio=*] permission.

Warning

SSO authentication is not available for this service. Your are required to define a password by editing your profile here before being able to login.

Note

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

Disable authentication

To disable authentication create a hawtio.properties file inside the p6core_data/conf folder.

hawtio.authenticationEnabled=false

If you want to turn on the authentication, remove this file or set the hawtio.authenticationEnabled variable to true.

Management screens

Once connected you can access multiple screens like:

  • Camel
  • JMX
  • Runtime

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

Platform 6 monitoring endpoints

All the following endpoints produce output that can be processed by Nagios.

The format of the string output is:

[OK|WARNING|CRITICAL] - Description|[key = value][ ... ]

After the pipe is a list of space separated metrics entries (key/value).

The response is in either HTML or Text format based on the Accepts header: - text/plain - text/html

VM stats

Returns monitoring information and metrics about the Java Virtual Machine-

http://<hostname>:8080/p6/vmstats

Input parameters

Parameter Default value Description
lsofonly false Returns only the file descriptors information
threadsonly false Returns only the thread information
heaponly false Returns only the heap memory information

If none of the parameters is set to true both file descriptors, thread and heap memory information are returned.

Example

Retrieving the full Java Virtual Machine information

URL: http://<hostname>:8080/p6/vmstats

Returned metrics entries

Key Type Description
vmthread_count int Returns an estimate of the number of active threads in this thread group and its subgroups
vmheap_free int Returns the amount of free memory in the Java Virtual Machine
vmheap_total int Returns the total amount of memory in the Java virtual Machine
vmheap_max int Returns the maximum amount of memory that the Java Virtual Machine will attempt to use
open_file_descriptors int Returns the number of open file descriptors
max_file_descriptors int Returns the maximum number of file descriptors

Return example

OK - Threads = 159, Heap Free(Mb) = 2212, Heap Total(Mb) = 3055, Heap Max(Mb) = 3055, Open File Descriptors = 518, Max File Descriptors = 1048576|vmthread_count=159 vmheap_free=2320418224 vmheap_total=3203792896 vmheap_max=3203792896 open_file_descriptors=518 max_file_descriptors=1048576

Retrieving the thread information

URL: http://<hostname>:8080/p6/vmstats?threadsonly=true

Returned metrics entries

Key Type Description
vmthread_count int Returns an estimate of the number of active threads in this thread group and its subgroups

Return example

OK - Threads = 162|vmthread_count=162

Retrieving the Java Virtual Machine memory information

URL: http://<hostname>:8080/p6/vmstats?heaponly=true

Returned metrics entries

Key Type Description
vmheap_free int Returns the amount of free memory in the Java Virtual Machine
vmheap_total int Returns the total amount of memory in the Java virtual machine
vmheap_max int Returns the maximum amount of memory that the Java virtual machine will attempt to use

Return example

OK - Heap Free(Mb) = 2256, Heap Total(Mb) = 3055, Heap Max(Mb) = 3055|vmheap_free=2366497608 vmheap_total=3203792896 vmheap_max=3203792896

Retrieving the file descriptors information

URL: http://<hostname>:8080/p6/vmstats?lsofonly=true

Returned metrics entries

Key Type Description
open_file_descriptors int Returns the number of open file descriptors

Return example

OK - Open File Decriptors = 515 of 1048576|open_file_descriptors=515

Log4j stats

Returns Log4j statistics of the Platform 6 instance

http://<hostname>:8080/p6/log4jstats

Input parameters

Parameter Default value Description
maxerror -1 Error threshold
maxwarn -1 Warning threshold
margin 0 Margin between raising an error instead of a warning

If neither maxerror and maxwarn parameters are set then all the log information are returned.

Returned metrics entries

Key Type
log4j_error_count int
log4j_warn_count int
log4j_all_count int

Examples

Call without overpassed threshold URL: http://<hostname>:8080/p6/log4jstats

OK - Statistics, ERROR = -1, WARN = -1, ALL = -1|log4j_error_count=-1 log4j_warn_count=-1 log4j_all_count=-1

Call with overpassed threshold and margin URL: http://<hostname>:8080/p6/log4jstats?maxerror=10&margin=5

WARNING - Error threshold of 10 exceeded! ERROR count is 12|log4j_error_count=12 log4j_warn_count=-1 log4j_all_count=-1

Call with overpassed threshold URL: http://<hostname>:8080/p6/log4jstats?maxerror=10

ERROR - Error threshold of 10 exceeded! ERROR count is 12|log4j_error_count=12 log4j_warn_count=-1 log4j_all_count=-1

Error return CRITICAL - Failed to find log4j appender: monitor|log4j_error_count=-1 log4j_warn_count=-1 log4j_all_count=-1