Viewing Metrics from Kubernetes
It is important to track resource usage in the Kubernetes cluster. To view your resource usage, you must use a collector and an exporter.
Before you can view metrics with an APM system, you need an Java agent that supports JMX to extract them from the application. There are two approaches for exporting metrics:
-
Pulling (or scraping): The exporter creates an endpoint (usually
/metrics
) from where the collector can periodically retrieve data. You must configure the collector to access each endpoint, but the exporter doesn’t need any information about the collector. This way, most of the work is done by the collector. -
Pushing: The exporter periodically pushes metrics to a collector. You must configure the exporter to access the collector, but the collector doesn’t need any information about the exporter. You can choose the metrics extracted by the exporter without configuring the collector. This way, most of the work is done by the extractors. This is the recommended approach as it scales more easily.
If you need a metric that Liferay DXP doesn’t currently export, you can still access it by programming a JMX MBean that extracts it.