Graylog2 / graylog2-server

Free and open log management
https://www.graylog.org
Other
7.22k stars 1.05k forks source link

Metrics for gl_jvm_memory_total_max and gl_jvm_memory_non_heap_max show unlimited in 6.0 where they previously showed the configured max in 5.2 #19820

Open drewmiranda-gl opened 5 days ago

drewmiranda-gl commented 5 days ago

When using the metrics exporter for graylog, the behavior of the following metrics has changed between Graylog 5.2 and 6.0:

In Graylog 5.2 these displayed the configured max value for JVM heap. In Graylog 6.0 they show -1 or unlimited:

image

Its not clear to me which of these is the correct value to return though.

Expected Behavior

Current Behavior

Possible Solution

Steps to Reproduce (for bugs)

  1. Configure metric exporting via server.conf
prometheus_exporter_enabled = true
prometheus_exporter_bind_address = 0.0.0.0:9833
prometheus_exporter_mapping_file_path_custom = /usr/share/graylog-server/prometheus-exporter-mapping-custom.yml

Relevant metrics declared in prometheus-exporter-mapping-custom.yml

metric_mappings:
  - metric_name: "jvm_memory_total_max"
    match_pattern: "jvm.memory.total.max"
  - metric_name: "jvm_memory_non_heap_max"
    match_pattern: "jvm.memory.non-heap.max"
  1. view metric via :9833

Context

Your Environment

thll commented 5 days ago

6.0 includes updates to our metrics libraries. E.g. https://github.com/Graylog2/graylog2-server/pull/17142. That could be related.