xieyi888 commented on issue #3053:
URL: https://github.com/apache/amoro/issues/3053#issuecomment-2246726709
> Thanks for the suggestion, but actually I think a richer metrics reporting
can be achieved by using prometheus java agent + JMX reporter directly, e.g.
after the JVM parameters add: -javaagent:/usr/local/amoro/plugin/jmx_
prometheus_javaagent-0.18.0.jar=8088:/usr/local/amoro/conf/prometheus-jmx-config.yaml
>
> JVM metrics samples
>
> ```
> amoro@ams-6655745b6d-zc8w2:/usr/local/amoro$ curl localhost:8088
> ```
>
> ```
> # HELP jvm_buffer_pool_used_bytes Used bytes of a given JVM buffer pool.
> # TYPE jvm_buffer_pool_used_bytes gauge
> jvm_buffer_pool_used_bytes{pool="direct",} 1.8900953E7
> jvm_buffer_pool_used_bytes{pool="mapped",} 0.0
> # HELP jvm_buffer_pool_capacity_bytes Bytes capacity of a given JVM buffer
pool.
> # TYPE jvm_buffer_pool_capacity_bytes gauge
> jvm_buffer_pool_capacity_bytes{pool="direct",} 1.8900952E7
> jvm_buffer_pool_capacity_bytes{pool="mapped",} 0.0
> # HELP jvm_buffer_pool_used_buffers Used buffers of a given JVM buffer
pool.
> # TYPE jvm_buffer_pool_used_buffers gauge
> jvm_buffer_pool_used_buffers{pool="direct",} 1072.0
> jvm_buffer_pool_used_buffers{pool="mapped",} 0.0
> # HELP jmx_exporter_build_info A metric with a constant '1' value labeled
with the version of the JMX exporter.
> # TYPE jmx_exporter_build_info gauge
> jmx_exporter_build_info{version="0.18.0",name="jmx_prometheus_javaagent",}
1.0
> # HELP jvm_memory_pool_allocated_bytes_total Total bytes allocated in a
given JVM memory pool. Only updated after GC, not continuously.
> # TYPE jvm_memory_pool_allocated_bytes_total counter
> jvm_memory_pool_allocated_bytes_total{pool="G1 Old Gen",} 7.1708652656E10
> jvm_memory_pool_allocated_bytes_total{pool="Code Cache",} 8.7114112E7
> jvm_memory_pool_allocated_bytes_total{pool="G1 Eden Space",}
2.9765555716096E13
> jvm_memory_pool_allocated_bytes_total{pool="G1 Survivor Space",}
2.0626538496E11
> jvm_memory_pool_allocated_bytes_total{pool="Compressed Class Space",}
1.062508E7
> jvm_memory_pool_allocated_bytes_total{pool="Metaspace",} 9.7063792E7
> ```
Thanks @XBaith Yes! jmx reporter is a good way to export jvm metrics,
But It seems not be combined with our metric report plugin.
under this way:
1. ams will export two independent port
one for jmx reporter which collect jvm metrics, localhost:8088 above example
one for metric-reporters under our metric plugin(such as optimizer metric),
localhost:9090
```
metric-reporters:
- name: prometheus-exporter # configs for prometheus exporter
enabled: true
properties:
port: 9090 # the port that the
prometheus-exporter listens on.
2. for users who want to monitor metrics both jvm metrics and optimizer
metric ,will config two scrape_configs
```
scrape_configs:
- job_name: 'amoro-exporter'
scrape_interval: 15s
static_configs:
- targets: ['localhost:9090'] # The host and port that you configured
in Amoro plugins configs file.
scrape_configs:
- job_name: 'amoro-jmx-exporter'
scrape_interval: 15s
static_configs:
- targets: ['localhost:8088']
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]