View source | Discuss this page | Page history | Printable version   

Retail:Monitoring and Management

Back to main page



Bulbgraph.png   Note: Starting from RR18Q2

The monitoring and management functionalities included in the Openbravo Hardware Manager is based in standard technologies:

Java Management Extensions (JMX) Technology. (

This technology is used to publish information like status, attributes and statistics, and to publish actions like device testing actions. All the information and actions published can be consumed by all monitoring and management tools that support JMX for example JConsole and Java Mission Control.

Java Util Logging (JUL) Technology (

This technology is used to publish logging events that are raised during the operation of the Hardware manager Logging events can be processed in several ways, the most simple way is just write all logging events to a file, but also can be collected, processed and and stored by tools like Logstash and Fluentd.

System scripts

As system script there are two simple utilities that allow to start and stop the Hardware Manager from the command line. For Windows systems the scripts are start.bat and stop.bat, and for Linux and MacOS systems the scripts are and

Consuming information and actions using JConsole

JConsole is a basic monitoring application that uses JMX. It is open source and free. It is and standalone application but it comes with the Oracle Java JDK or OpenJDK, it cannot be downloaded independently.

Enabling JMX monitoring

When opened JConsole, it can connect to local java applications or remote java applications. To connect to local applications is enabled by default but to connect to remote applications, remote monitoring has to be enabled in the monitored application. As an example remote monitoring with disabled security can be enabled passing the following parameters to the monitored application: 

Where portNum is the port the application will listen for remote JMX connections. This remote monitoring can also be secured with user and password, and encrypted. To set these parameters you have to set the environment variable HWMANAGER_OPT. In Linux it can be set this way:

export HWMANAGER_OPT = " \ \ \"

For the details about this configuration refer to the JMX documentation:

Connecting with JConsole

When opening JConsole the following dialog appears:


Here you can select any of the local processes running or a remote host or port listening for JMX connections. The JMX name exposed by the Hardware Manager is the main java class: org.openbravo.poshw.Main.

Java VM general charts

In the Overview tab there are general performance charts showing the heap memory usage, threads, classes loaded and CPU usage.


Java VM information

In the VM Summary tab there is general information of the Java VM used to run the Hardware Manager like the version, vendor name, live threads, current heap memory, operating system details, and application arguments.


Hardware manager information and actions

In the MBeans tab there are detailed Java VM monitoring information and also all the Hardware Manager published information and actions. The Hardware Manager monitoring information is in the package com.openbravo.pos.monitor. Here there are several samples of screenshots showing Hardware Manager monitoring information.


Hminformation1.png Hminformation2.png Hminformation3.png Hminformation4.png Hminformation5.png

Here there is a sample screenshot showing Hardware Manager management actions for printers and cash drawers.

Consuming logging events using the Elastic logging stack

Logstash / Elasticsearch / Kibana is a logging stack by Elastic that allows to collect, process and store, logging events coming from different sources. These three tools are open source and free to use.

Configuring logging in the Hardware Manager

Logging is configured in the Hardware Manager in the file By default logging is disabled but it is pre-configured to publish logging events to the console, file or a remote server. For example to enable logging to the console add the following line:


To enable logging to file add the following line:


To enable logging to a remote server add the following lines. This is the configuration to use to publish to the elastic logging stack.


To configure the level of the logging events published it has to be done at root level and/or in each logging handlers. The logging levels available are: SEVERE, WARNING, INFO, CONFIG, FINE, FINER and FINEST.


For detailed information, refer to the following document:

Installing and running the logging stack

The three applications of the stack can be downloaded from the Elastic web page There are packages for Windows and Linux.

Logstash is the dynamic data collection pipeline of the stack. To configure Logstash there is needed to edit a logstash.config file. The sections to configure are the input sources, filters and output destinations. The following configuration sample file listens logging data in a server port and sends the data to the console in ruby format and to an elasticsearch database:

input { 
  tcp {
    port => 8200
    codec => "json"
filter {
output {
  stdout { codec => rubydebug }
  elasticsearch { hosts => "http://localhost:9200" }

To run logstash execute the following command

bin/logstash -f logstash.config

For detailed information to configure logstash go the document:

Elasticsearch is the database where log events are stored. Is a distributed, JSON-based search and analytics engine.

To run elasticsearch with its default configuration execute the following command:


For detailed information to configure elasticsearch go to the document:

Finally Kibana is the user interface of the stack if offers all the configuring and managing aspects of the logging stack. To configure kibana there is needed at least to configure the location of the elasticsearch database. To do it edit the file config/kibana.yml and add the following line:

elasticsearch.url: "http://localhost:9200"

To run kibana first execute the following command:


And then open a browser and go to http://localhost:5601 The user interface will appear and you can see all the functionalities available to inspect and analyse the logging data provided by one or all the hardware manager applications that publish the logging events to the logging stack.

For detailed information to configure and operate kibana go to the document:


Appendix. Information published

Java VM information

In every java application the package provides the interface for monitoring and managing the Java VM. This API provides access to the following types of information.

General Hardware Manager information

The com.openbravo.pos.monitor provides the following information in the ApplicationStats object.

Printers information

The com.openbravo.pos.monitor provides the following information in the DevicePrinterProxy_% object. There is one object for configured printer.

Display information

The com.openbravo.pos.monitor provides the following information in the DeviceDisplay_proxy object.

Payment device information

The com.openbravo.pos.monitor provides the following information in the DevicePaymentProxy object.

Processes information

The com.openbravo.pos.monitor provides the following information in the DeviceProcessProxy_% object. There is one object for running process like the PDF printing process.

Timing statistics

The com.openbravo.pos.monitor provides the following information in the StopWatch Stats_% object. There is one object for functionality monitored.

The functionalities with timing statistics are:

Counter statistics

The com.openbravo.pos.monitor provides the following information in the CounterStats_% object. There is one object for quantities monitored. Currently only payment amounts are using counter statistics.

The functionalities with counter statistics are:

Appendix. Actions published

General actions

Printer actions

Customer display actions

Payment actions

Appendix. Logging events published

Severe level

Warning level

Fine level


Printer devices

Display devices

Payment devices

Finer level

Printer devices

Display devices

Payment devices

Retrieved from ""

This page has been accessed 4,214 times. This page was last modified on 21 December 2017, at 12:31. Content is available under Creative Commons Attribution-ShareAlike 2.5 Spain License.