第 6 章 配置统计、指标和 JMX
启用数据网格导出到指标端点或通过 JMX MBeans 导出的统计信息。您还可以注册 JMX MBeans 来执行管理操作。
6.1. 启用 Data Grid Statistics 复制链接链接已复制到粘贴板!
复制链接链接已复制到粘贴板!
配置 Data Grid 以导出缓存管理器和缓存的统计信息。
流程
修改您的配置,以以下方法之一启用 Data Grid 统计:
-
declarative: 添加
statistics="true"属性。 -
programmatic :调用
.statistics ()方法。
声明
<!-- Enables statistics for the Cache Manager. --> <cache-container statistics="true"> <!-- Enables statistics for the named cache. --> <local-cache name="mycache" statistics="true"/> </cache-container>
<!-- Enables statistics for the Cache Manager. -->
<cache-container statistics="true">
<!-- Enables statistics for the named cache. -->
<local-cache name="mycache" statistics="true"/>
</cache-container>
programmatic