Monitoring Microclimate-based Liberty applications in Kubernetes
By default, applications that are created by using Microclimate include the Microclimate > App Monitor in-built monitoring dashboards. If these applications are deployed in IBM Cloud Private, in production, you should upgrade
to the Monitoring server to get polyglot application monitoring, and alerting and analytics across your hybrid cloud applications. If you have access to the Monitoring server, you can configure the Microclimate-based
easily to be monitored by Monitoring.
Before you begin
Ensure that you have installed and configured the following:
- Monitoring server
About this task
You must delete the old Cloud APM data collector configuration from the
Dockerfile that is generated in Microclimate before you configure the Microclimate-based
Liberty applications to be monitored by the server.
Deleting the old Cloud APM data collector configuration
In your application directory, remove the following lines from the
RUN installUtility install --acceptLicense defaultServer && installUtility install --acceptLicense apmDataCollector-7.4 ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/lib:/opt/ibm/wlp/usr/extension/liberty_dc/toolkit/lib/lx8266 \ JVM_ARGS="$JVM_ARGS -agentlib:am_ibm_16=defaultServer - Xbootclasspath/p:/opt/ibm/wlp/usr/extension/liberty_dc/toolkit/lib/bcm-bootstrap.jar - Xverbosegclog:/logs/gc.log,1,10000 -verbosegc - Djava.security.policy=/opt/ibm/wlp/usr/extension/liberty_dc/itcamdc/etc/datacollector.policy - Dliberty.home=/opt/ibm/wlp"
Configuring the Liberty data collector
Enable your application with the Monitoring data collector.
If you use
Open Liberty, add the following lines to your
COPY path_to_esa_file /opt/ RUN mkdir -p /opt/ol/wlp/usr/extension/lib/features/ RUN cd /tmp && unzip /opt/javametrics.liberty.icam-1.2.1.esa && mv /tmp/wlp/liberty_dc /opt/ol/wlp/usr/extension/ && mv /tmp/OSGI-INF/SUBSYSTEM.MF /opt/ol/wlp/usr/extension/lib/features/javametrics.liberty.icam-1.2.1.mf COPY path_to_silent_file /opt/ol/wlp/usr/extension/liberty_dc/bin/ RUN /opt/ol/wlp/usr/extension/liberty_dc/bin/config_unified_dc.sh -silent
If you use
WebSphere Liberty, add the following lines to the
RUN chmod 777 liberty_server_dir RUN /opt/ibm/wlp/bin/installUtility install ibmAppMetricsForJava-1.2.1 --acceptLicense RUN /opt/ibm/wlp/usr/extension/liberty_dc/bin/config_unified_dc.sh -silent
This enables your application container to include the Liberty data collector. If the Monitoring configuration isn’t provided, the data collector remains in a disabled state.
To enable the Liberty data collector to communicate with the Monitoring server at a later stage, follow step 1 and step 5 in Monitoring Liberty applications in Kubernetes environment.