HzSessions HOWTO

Revision as of 18:20, 29 December 2015 by Dominik.epple (talk | contribs)

HOWTO - Access session list in hazelcast Jolokia

This article describes how to access information exposed through JMX by Open-Xchange with the Jolokia JMX-to-HTTP bridge, to get information about the current sessions.

Enable Jolokia

(See also https://oxpedia.org/wiki/index.php?title=Jolokia)

In etc/jolokia.properties, enable Jolokia by setting the following properties:

 com.openexchange.jolokia.start = true
 com.openexchange.jolokia.user = youruser
 com.openexchange.jolokia.password = yourpassword

Jolokia will not be enabled when no user/password is set.

You can optionally adjust this setting:

 com.openexchange.jolokia.servlet.name = /monitoring/jolokia

If you do, you need to adjust the examples below as well.

Allow access from other hosts

This is an optional step, if you want to access the Jolokia interface from other hosts than localhost. This may be very helpful during the development phase of a project. Please be aware that this interface exposes lots of "interesting" data, so if you remove the restriction to localhost, you need to ensure by other means (network setup, firewalls, web server configuration, ...) that no unauthorised access is possible on production systems.

In etc/jolokia.properties, set:

 com.openexchange.jolokia.restrict.to.localhost = false

In your web server configuration, enable access to the jolokia servlet. For Apache this is possible by adding a ProxyPass directive for each OX host in the cluster:

 ProxyPass /monitoring/ox1/jolokia http://ox1-ip:8009/monitoring/jolokia
 ProxyPass /monitoring/ox2/jolokia http://ox2-ip:8009/monitoring/jolokia
 ...

On a default installation as described by our installation guides, this would be in proxy_http.conf.

Reload your apache config and restart open-xchange for the changes to take effect.

File:Listsessions.zip