讨论区 » AAS-V10敏捷版 »
Prometheus监控AAMSV10
1.下载jmx_prometheus_javaagent-0.17.2.jar 可下载附件
2.将jmx_prometheus_javaagent-0.17.2.jar放入/opt目录下
3.创建config.yaml 可下载附件,将config.yaml 放入/opt目录下,yaml配置可参考如下:
---
lowercaseOutputLabelNames: true
lowercaseOutputName: true
whitelistObjectNames: ["java.lang:type=OperatingSystem"]
blacklistObjectNames: []
rules:
- pattern: 'java.lang<type=OperatingSystem><>(committed_virtual_memory|free_physical_memory|free_swap_space|total_physical_memory|total_swap_space)_size:'
name: os_$1_bytes
type: GAUGE
attrNameSnakeCase: true
- pattern: 'java.lang<type=OperatingSystem><>((?!process_cpu_time)\w+):'
name: os_$1
type: GAUGE
attrNameSnakeCase: true
4.修改AAMS-V10/bin目录下的apusic.sh文件
添加JVM参数:JAVA_OPTS="-javaagent:/opt/jmx_prometheus_javaagent-0.17.2.jar=30018:/opt/config.yaml"
位置大概如下:
添加完成后重启AAMSV10,访问:ip:30018 成功后如下图所示:
jmx_prometheus_javaagent-0.17.2.jar (527 KB) jmx_prometheus_javaagent-0.17.2.jar | |||
config.yaml (523 Bytes) config.yaml |