Apache NiFi - MiNiFi - C++ Metrics Readme.

This readme defines the metrics published by Apache NiFi. All options defined are located in minifi.properties.

Table of Contents

Description

Apache NiFi MiNiFi C++ can communicate metrics about the agent's status, that can be a system level or component level metric. These metrics are exposed through the agent implemented metric publishers that can be configured in the minifi.properties. Aside from the publisher exposed metrics, metrics are also sent through C2 protocol of which there is more information in the C2 documentation.

Configuration

To configure the a metrics publisher first we have to set which publisher class should be used:

# in minifi.properties

nifi.metrics.publisher.class=PrometheusMetricsPublisher

Currently PrometheusMetricsPublisher is the only available publisher in MiNiFi C++ which publishes metrics to a Prometheus server. To use the publisher a port should also be configured where the metrics will be available to be scraped through:

# in minifi.properties

nifi.metrics.publisher.PrometheusMetricsPublisher.port=9936

The last option defines which metric classes should be exposed through the metrics publisher in configured with a comma separated value:

# in minifi.properties

nifi.metrics.publisher.metrics=QueueMetrics,RepositoryMetrics,GetFileMetrics,DeviceInfoNode,FlowInformation

Metrics

The following section defines the currently available metrics to be published by the MiNiFi C++ agent.

NOTE: In Prometheus all metrics are extended with a minifi_ prefix to mark the domain of the metric. For example the connection_name metric is published as minifi_connection_name in Prometheus.

QueueMetrics

QueueMetrics is a system level metric that reports queue metrics for every connection in the flow.

Metric nameLabelsDescription
queue_data_sizemetric_class, connection_uuid, connection_nameCurrent queue data size
queue_data_size_maxmetric_class, connection_uuid, connection_nameMax queue data size to apply back pressure
queue_sizemetric_class, connection_uuid, connection_nameCurrent queue size
queue_size_maxmetric_class, connection_uuid, connection_nameMax queue size to apply back pressure
LabelDescription
metric_classClass name to filter for this metric, set to QueueMetrics
connection_uuidUUID of the connection defined in the flow configuration
connection_nameName of the connection defined in the flow configuration

RepositoryMetrics

RepositoryMetrics is a system level metric that reports metrics for the registered repositories (by default flowfile and provenance repository)

Metric nameLabelsDescription
is_runningmetric_class, repository_nameIs the repository running (1 or 0)
is_fullmetric_class, repository_nameIs the repository full (1 or 0)
repository_sizemetric_class, repository_nameCurrent size of the repository
LabelDescription
metric_classClass name to filter for this metric, set to RepositoryMetrics
repository_nameName of the reported repository

GetFileMetrics

Processor level metric that reports metrics for the GetFile processor if defined in the flow configuration

Metric nameLabelsDescription
onTrigger_invocationsmetric_class, processor_name, processor_uuidNumber of times the processor was triggered
accepted_filesmetric_class, processor_name, processor_uuidNumber of files that matched the set criterias
input_bytesmetric_class, processor_name, processor_uuidSum of file sizes processed
LabelDescription
metric_classClass name to filter for this metric, set to GetFileMetrics
processor_nameName of the processor
processor_uuidUUID of the processor

GetTCPMetrics

Processor level metric that reports metrics for the GetTCPMetrics processor if defined in the flow configuration

Metric nameLabelsDescription
onTrigger_invocationsmetric_class, processor_name, processor_uuidNumber of times the processor was triggered
LabelDescription
metric_classClass name to filter for this metric, set to GetTCPMetrics
processor_nameName of the processor
processor_uuidUUID of the processor

DeviceInfoNode

DeviceInfoNode is a system level metric that reports metrics about the system resources used and available

Metric nameLabelsDescription
physical_memmetric_classPhysical memory available
memory_usagemetric_classMemory used by the agent
cpu_utilizationmetric_classCPU utilized by the agent
LabelDescription
metric_classClass name to filter for this metric, set to DeviceInfoNode

FlowInformation

DeviceInfoNode is a system level metric that reports metrics about the system resources used and available

Metric nameLabelsDescription
queue_data_sizemetric_class, connection_uuid, connection_nameCurrent queue data size
queue_data_size_maxmetric_class, connection_uuid, connection_nameMax queue data size to apply back pressure
queue_sizemetric_class, connection_uuid, connection_nameCurrent queue size
queue_size_maxmetric_class, connection_uuid, connection_nameMax queue size to apply back pressure
is_runningmetric_class, component_uuid, component_nameCheck if the component is running (1 or 0)
LabelDescription
metric_classClass name to filter for this metric, set to FlowInformation
connection_uuidUUID of the connection defined in the flow configuration
connection_nameName of the connection defined in the flow configuration
component_uuidUUID of the component
component_nameName of the component