How ARMS Configuration Templates Simplify JVM Monitoring in Cloud‑Native Environments
This article explains how Alibaba Cloud's ARMS uses configurable templates to provide tiered, low‑overhead JVM monitoring and full APM capabilities, enabling users to create, customize, and apply monitoring policies across applications and workspaces for cost‑effective observability.
Traditional Application Performance Monitoring (APM) collects full trace, metric, log, and profiling data via framework‑level instrumentation, ensuring comprehensive fault analysis but incurring high cost, resource usage, and performance impact.
ARMS addresses diverse user needs by defining three monitoring levels: basic monitoring (lightweight JVM metrics and diagnostics), custom monitoring (user‑defined logs, metrics, spans), and full APM (complete trace, exception, RED metrics, profiling).
ARMS provides configuration templates that encapsulate monitoring settings. System‑built templates include:
JVM JMX monitoring template : collects 20+ key JMX beans (heap, GC, threads) with <1% CPU overhead and ~1 GB daily data per node.
Full APM monitoring template : gathers trace, exception stacks, RED metrics, JVM data, and profiling, typically under 10% overhead with ~15 GB daily data per node.
Users can customize these templates, save them as user‑defined templates, and manage them via the ARMS UI. Templates can be set as global for a workspace, automatically applied to newly created applications, or assigned per‑application through the UI or by adding the label apsara.apm/armsConfigTemplate in the application’s YAML (e.g., jvm_jmx_default).
The management page lists each template’s name, description, type (system‑built or custom), source, language (Java, Go, Python), and actions such as setting as global, viewing details, or deleting.
Example Java code demonstrates how to create an application with a specific template using the OpenAPI:
public static CreateServiceResponse createApp(String workspace, String appName, String configTemplateName, String regionId) {
try {
Config config = new Config();
config.setAccessKeyId("your ak");
config.setAccessKeySecret("your sk");
config.setEndpoint(String.format("cms.%s.aliyuncs.com", regionId));
Client client = new Client(config);
CreateServiceRequest request = new CreateServiceRequest();
request.setServiceName(appName);
request.setServiceType("TRACE");
request.setAttributes(String.format("{\"armsConfigTemplate\":\"%s\", \"language\":\"JAVA\"}", configTemplateName));
return client.createService("default-cms-1672753017899339-cn-hangzhou", request);
} catch (Exception e) {
e.printStackTrace();
return null;
}
}Beyond basic monitoring, ARMS supports three upgrade paths:
Framework‑level deep observability : enable plugins for Tomcat, Spring MVC, Dubbo, gRPC, MySQL, Redis, then restart the instance.
Performance‑bottleneck diagnosis : activate Continuous Profiling and analyze flame graphs.
Business‑level custom observability : instrument code with OpenTelemetry SDK (Counter, Gauge, Histogram) and register custom metric collection rules in the monitoring configuration center.
Finally, ARMS encourages a sustainable monitoring governance model: versioned templates are saved, optionally set as global, and applied to new applications, ensuring a balanced trade‑off among functionality, performance, and cost.
Alibaba Cloud Observability
Driving continuous progress in observability technology!
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
