Noble Numbat created NIFI-8271:
----------------------------------

             Summary: Expansion of metrics in the REST API Prometheus endpoint 
and PrometheusReportingTask
                 Key: NIFI-8271
                 URL: https://issues.apache.org/jira/browse/NIFI-8271
             Project: Apache NiFi
          Issue Type: Improvement
            Reporter: Noble Numbat


Expansion of metrics available for programmatic access through the REST API 
Prometheus endpoint and the PrometheusReportingTask.
These metrics are currently available through other REST API endpoints but not 
through the Prometheus endpoint.
The PrometheusReportingTask has been extended for consistency.

I have copied the outputs below to show how they will appear, including the 
figures from my test flow. I have removed identifiers for clarity.

New gauges to be added:

 
{noformat}
# TYPE nifi_jvm_deadlocked_thread_count gauge
# HELP nifi_jvm_deadlocked_thread_count NiFi JVM deadlocked thread count
nifi_jvm_deadlocked_thread_count{instance="",} 0.0
# TYPE nifi_jvm_heap_committed gauge
# HELP nifi_jvm_heap_committed The amount of heap memory in bytes that is 
committed and guaranteed for the JVM to use.
nifi_jvm_heap_committed{instance="",} 5.111808E8
# TYPE nifi_jvm_heap_init gauge
# HELP nifi_jvm_heap_init The amount of heap memory in bytes that the JVM 
initially requested from the operating system for memory management, returning 
-1 if undefined.
nifi_jvm_heap_init{instance="",} 5.36870912E8
# TYPE nifi_jvm_heap_max gauge
# HELP nifi_jvm_heap_max The maximum amount of heap memory in bytes that can be 
used for memory management, returning -1 if undefined.
nifi_jvm_heap_max{instance="",} 5.111808E8
# TYPE nifi_jvm_heap_non_committed gauge
# HELP nifi_jvm_heap_non_committed The amount of non-heap memory in bytes that 
is committed and guaranteed for the JVM to use.
nifi_jvm_heap_non_committed{instance="",} 2.031616E8
# TYPE nifi_jvm_heap_non_init gauge
# HELP nifi_jvm_heap_non_init The amount of non-heap memory in bytes that the 
JVM initially requested from the operating system for memory management, 
returning -1 if undefined.
nifi_jvm_heap_non_init{instance="",} 2555904.0
# TYPE nifi_jvm_heap_non_max gauge
# HELP nifi_jvm_heap_non_max The maximum amount of non-heap memory in bytes 
that can be used for memory management, returning -1 if undefined.
nifi_jvm_heap_non_max{instance="",} -1.0
# TYPE nifi_jvm_heap_non_used gauge
# HELP nifi_jvm_heap_non_used The amount of used non-heap memory in bytes.
nifi_jvm_heap_non_used{instance="",} 1.9151288E8

# TYPE nifi_component_state gauge
# HELP nifi_component_state State of the component, captured in the state 
label. Values are 0 or 1
<Processors display the following states>
nifi_component_state{instance="",component_type="Processor",component_name="GenerateFlowFile",component_id="",parent_id="",state="Disabled",}
 0.0
nifi_component_state{instance="",component_type="Processor",component_name="GenerateFlowFile",component_id="",parent_id="",state="Invalid",}
 0.0
nifi_component_state{instance="",component_type="Processor",component_name="GenerateFlowFile",component_id="",parent_id="",state="Running",}
 1.0
nifi_component_state{instance="",component_type="Processor",component_name="GenerateFlowFile",component_id="",parent_id="",state="Stopped",}
 0.0
nifi_component_state{instance="",component_type="Processor",component_name="GenerateFlowFile",component_id="",parent_id="",state="Validating",}
 0.0
<Remote Process Groups display the following states>
nifi_component_state{instance="",component_type="RemoteProcessGroup",component_name="",component_id="",parent_id="",state="Transmitting",}
 1.0
<Input Ports and Output Ports display the following states>
nifi_component_state{instance="",component_type="OutputPort",component_name="",component_id="",parent_id="",state="Disabled",}
 0.0
nifi_component_state{instance="",component_type="OutputPort",component_name="",component_id="",parent_id="",state="Invalid",}
 0.0
nifi_component_state{instance="",component_type="OutputPort",component_name="",component_id="",parent_id="",state="Running",}
 1.0
nifi_component_state{instance="",component_type="OutputPort",component_name="",component_id="",parent_id="",state="Stopped",}
 0.0
nifi_component_state{instance="",component_type="OutputPort",component_name="",component_id="",parent_id="",state="Transmitting",}
 0.0
nifi_component_state{instance="",component_type="OutputPort",component_name="",component_id="",parent_id="",state="Validating",}
 0.0
{noformat}
 

 

The idea is that component_state metrics above will replace the existing 
nifi_transmitting metrics. The nifi_transmitting metrics are unchanged to not 
affect any existing flows however the #HELP line has been changed to the 
following.

 
{noformat}
# HELP nifi_transmitting Whether this component is transmitting data. Values 
are 0 or 1 - Deprecated, replaced by nifi_component_state.{noformat}
 

 

The following new gauges are currently only added to the REST API Prometheus 
endpoint pending completion of NIFI-8239 
(https://issues.apache.org/jira/browse/NIFI-8239).

 
{noformat}
# TYPE nifi_max_event_driven_threads gauge
# HELP nifi_max_event_driven_threads The maximum number of threads for event 
driven processors available to the system.
nifi_max_event_driven_threads{instance="",} 1.0
# TYPE nifi_max_timer_driven_threads gauge
# HELP nifi_max_timer_driven_threads The maximum number of threads for timer 
driven processors available to the system.
nifi_max_timer_driven_threads{instance="",} 10.0

# TYPE nifi_repository_max_bytes gauge
# HELP nifi_repository_max_bytes The maximum number of bytes available to the 
specified repository.
nifi_repository_max_bytes{instance="",identifier="default",repository_type="content",}
 5.2709261312E10
nifi_repository_max_bytes{instance="",identifier="default",repository_type="provenance",}
 5.2709261312E10
nifi_repository_max_bytes{instance="",identifier="FlowFile 
Repository",repository_type="flowfile",} 5.2709261312E10
# TYPE nifi_repository_used_bytes gauge
# HELP nifi_repository_used_bytes The number of bytes currently used by the 
specified repository.
nifi_repository_used_bytes{instance="",identifier="default",repository_type="content",}
 3.74875136E10
nifi_repository_used_bytes{instance="",identifier="default",repository_type="provenance",}
 3.74875136E10
nifi_repository_used_bytes{instance="",identifier="FlowFile 
Repository",repository_type="flowfile",} 3.74875136E10
{noformat}
 

 

 

 

 



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

Reply via email to