You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Noble Numbat (Jira)" <ji...@apache.org> on 2021/03/12 02:33:00 UTC

[jira] [Created] (NIFI-8317) Prometheus metrics returning incorrect heap and non-heap usage values when max values are undefined

Noble Numbat created NIFI-8317:
----------------------------------

             Summary: Prometheus metrics returning incorrect heap and non-heap usage values when max values are undefined
                 Key: NIFI-8317
                 URL: https://issues.apache.org/jira/browse/NIFI-8317
             Project: Apache NiFi
          Issue Type: Bug
    Affects Versions: 1.12.1, 1.13.0, 1.14.0
            Reporter: Noble Numbat
            Assignee: Noble Numbat


There are two metrics in the REST API Prometheus endpoint and the PrometheusReportingTask called nifi_jvm_heap_usage and nifi_jvm_heap_non_usage.
They are calculated using the heap_max and heap_non_max values. heap_max and heap_non_max return -1 if they are undefined.

There is currently no checking being done to see if these values are undefined and my metric for nifi_jvm_heap_non_usage returns values like -1.67424928E8.

This bug fix is to add checking and return -1.0 if heap_max or heap_non_max are undefined as implemented in SystemDiagnostics.java. [1]

[1] https://github.com/apache/nifi/blob/f9ae3bb9c970cd8d6d1d9e10f07cab9bdb66baa9/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/diagnostics/SystemDiagnostics.java#L167



--
This message was sent by Atlassian Jira
(v8.3.4#803005)