You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2021/03/30 15:08:00 UTC

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

    [ https://issues.apache.org/jira/browse/NIFI-8317?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17311571#comment-17311571 ] 

ASF subversion and git services commented on NIFI-8317:
-------------------------------------------------------

Commit ee1386db0229ebf84ead0001607ed03a4cd0fc53 in nifi's branch refs/heads/main from noblenumbat360
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=ee1386d ]

NIFI-8317 heap and non_heap usage Prometheus metrics now return -1.0 when undefined.

Signed-off-by: Matthew Burgess <ma...@apache.org>

This closes #4920


> 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.13.0, 1.12.1, 1.14.0
>            Reporter: Noble Numbat
>            Assignee: Noble Numbat
>            Priority: Minor
>              Labels: REST_API, metrics, prometheus, reporting_task
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> 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)