Marvel is a monitoring tool for Elasticsearch. It lets you view the performance and health of your Elasticsearch cluster, so you can anticipate issues ahead of time, troubleshoot them quickly, and scale your cluster appropriately.
To obtain Marvel and the client application for Liferay DXP, you need the Enterprise Search-Standard subscription. With it you’ll get a connector plugin for configuring Liferay DXP for Marvel and a Marvel Portlet that can be added to a page. The Marvel portlet gives you access to all of Marvel’s functionality. If you don’t yet have an Enterprise Search subscription, contact your sales representative.
This article shows you how to install and configure Marvel for Liferay DXP–and Liferay DXP for Marvel–with these general steps:
These terms will be useful to understand as you read this guide:
- Elasticsearch Home refers to the root folder of your unzipped Elasticsearch
installation (for example,
- Liferay Home
refers to the root folder of your Liferay DXP installation. It contains the
- Kibana Home refers to the root folder of your Kibana installation.
marvel-agentplugin on Elasticsearch by navigating to Elasticsearch Home and entering
./bin/plugin install marvel-agent
Note: Your Liferay Home folder should now have the usual Liferay DXP folders, as well as the
elasticsearch-[version](Elasticsearch Home) and
kibana-[version](Kibana Home) folders. A Liferay Home folder for a Tomcat bundle would look like this:
Liferay_Home/ data/ deploy/ Elasticsearch_Home/ Kibana_Home/ license/ logs/ osgi/ patching-tool tomcat-[version]
Install Marvel on Kibana by navigating to Kibana Home and entering
./bin/kibana plugin --install elasticsearch/marvel/[version]
The next step is to configure Kibana to connect with Elasticsearch. The instructions vary depending on whether you are using Shield or not.
Now you need to configure Kibana. Since you’ll use Liferay DXP’s Marvel Portlet as a proxy servlet to view the Kibana UI and Marvel, you’ll start configuring that here.
If you’re using Shield, follow all the steps below. If not, skip the steps that begin with [Shield].
[Shield] Set the user name and password in
Kibana_Home/config/kibana.yml, by entering these lines:
elasticsearch.username: liferay elasticsearch.password: liferay elasticsearch.url: "https://<your_elasticsearch_host>:9200"
[Shield] Also in
kibana.yml, you need to add Elasticsearch’s Certificate Authority (CA) property. If you’re using a self-signed certificate as demonstrated in the Shield article, export the certificate from the JKS file and use it as the CA.
keytool -v -importkeystore -srckeystore es-ssl.keystore.jks -srcalias es-shield -destkeystore es-ssl.PKCS12.p12 -deststoretype PKCS12
This command converts the JKS file to a PKCS12 file, which is more portable.
Note: You’ll be prompted to enter a password for the new PKCS12 file. Enter liferay. You’ll also be prompted for the password of the JKS file, which is also liferay if you followed the instructions from the Shield article.
openssl pkcs12 -in es-ssl.PKCS12.p12 -out es-ssl.CA.pem
to export the certificate from the PKCS12 file. When prompted for the password to access the PKCS12 file, enter liferay. Likewise, enter liferay when prompted to create a password for the PEM file.
[Shield] Move the PEM file created above to
[Shield] Add the following line to
Configure Kibana to be accessed through the Liferay DXP Marvel Portlet by adding the following to
/oprefix is a default. Change it if you’re running Liferay DXP under a different web context path.
Start Elasticsearch by running
from Elasticsearch Home.
Start Kibana by running
from Kibana Home.
Start Liferay DXP.
To run Kibana with SSL encryption you’ll need to do these things:
- Place a proxy server in front of it.
- Tell the proxy’s firewall to allow port 5601 (Kibana’s port).
- If using a self signed certificate in the proxy server,
ProxyServletwon’t be able to trust the connection, so add the certificate to the JVM truststore.
Now that you have Marvel and Kibana configured, you can configure the Marvel adapter in Liferay DXP.
There’s a Marvel entry in the System Settings application (Control Panel → Configuration → System Settings) under the Foundation heading.
There are several configuration options for the Marvel adapter plugin. While you
can make edits directly in System Settings, in production environments you’ll
want to make edits to the defaults through a
.cfg configuration file. Name it
and place it in
Here are the settings you can configure:
- Set the String URL for the remote Kibana server where Marvel is deployed. The URL should only contain the host and port. If you’re using a Proxy Server in front of Kibana, set the Proxy Server’s URL here instead of Kibana’s URL.
- Set this boolean to
trueto show debug logging for the Marvel proxy. This is useful for troubleshooting URL mappings passing through the proxy from Liferay DXP to Kibana, and to display the error codes from requests that Kibana denies.
- If Shield is being used, set the String value for the user name used for authenticating to Shield. This setting is ignored if Shield isn’t installed.
- Set the String password used for Shield authentication. This setting is ignored if Shield isn’t configured.
As mentioned earlier, Liferay provides a Marvel Portlet that displays an embedded, proxied version of the Marvel UI from Kibana.
If you’ve followed the steps outlined above, and you have Elasticsearch, Marvel, Kibana, and Liferay DXP configured correctly, you can just add the Marvel Portlet to a page in Liferay DXP:
Click the page’s Add button () and select Applications.
Enter Marvel in the search box, and click Add next to the Marvel entry in the Tools category. First you’ll see a message about Kibana loading, then the Marvel UI appears.
You’re ready to start exploring Marvel’s monitoring interface. For an overview of your cluster, click on its name in the Your Clusters table (if you left it at the default, it’s
For more information on what Marvel offers you, refer to Elasticsearch’s Marvel guide.
With Liferay DXP’s Enterprise Search-Standard subscription, you not only have a powerful search engine, but you have security and monitoring tools at your disposal. You can now diagnose, troubleshoot, and fix problems more easily than ever.