1- # Nifi Exporter
1+ # Apache NiFi Exporter
22
3- Interrogates a running Apache NiFi instance and makes the following
4- information available via a metrics endpoint to a prometheus scraper:
3+ ![ go report] ( https://goreportcard.com/badge/github.com/msiedlarek/nifi_exporter )
4+ ![ version] ( https://img.shields.io/docker/v/msiedlarek/nifi_exporter?sort=semver )
5+ ![ image size] ( https://img.shields.io/docker/image-size/msiedlarek/nifi_exporter?sort=semver )
56
6- ## Configuration
7-
8- The configuration comes from the configuration yaml file passed to the exporter at startup
9- e.g.
10-
11- ``` bash
12- ./nifi_exporter /etc/nifi_exporter/config.yml
13- ```
7+ Exports metrics from Apache NiFi API in Prometheus-compatible format.
148
15- ### Minimal configuration
9+ ## Configuration
1610
17- The nifi exporter expects at least the following keys to be present in the yaml config file :
11+ NiFi Exporter is configured through a single YAML file. Here is the minimal configuration :
1812
19- ``` yaml
13+ ``` yaml
2014---
2115exporter :
2216 listenAddress : 127.0.0.1:9103
@@ -26,227 +20,34 @@ nodes:
2620 password : xxxxxx
2721` ` `
2822
29- ## Example output
23+ See the [sample config](./sample-config.yml) for a full example of all available options.
24+
25+ ## Running
26+
27+ ### Using Docker
3028
31- ` ` ` text
32- # HELP go_gc_duration_seconds A summary of the GC invocation durations.
33- # TYPE go_gc_duration_seconds summary
34- go_gc_duration_seconds{quantile="0"} 0
35- go_gc_duration_seconds{quantile="0.25"} 0
36- go_gc_duration_seconds{quantile="0.5"} 0
37- go_gc_duration_seconds{quantile="0.75"} 0
38- go_gc_duration_seconds{quantile="1"} 0
39- go_gc_duration_seconds_sum 0
40- go_gc_duration_seconds_count 0
41- # HELP go_goroutines Number of goroutines that currently exist.
42- # TYPE go_goroutines gauge
43- go_goroutines 12
44- # HELP go_memstats_alloc_bytes Number of bytes allocated and still in use.
45- # TYPE go_memstats_alloc_bytes gauge
46- go_memstats_alloc_bytes 1.737064e+06
47- # HELP go_memstats_alloc_bytes_total Total number of bytes allocated, even if freed.
48- # TYPE go_memstats_alloc_bytes_total counter
49- go_memstats_alloc_bytes_total 1.737064e+06
50- # HELP go_memstats_buck_hash_sys_bytes Number of bytes used by the profiling bucket hash table.
51- # TYPE go_memstats_buck_hash_sys_bytes gauge
52- go_memstats_buck_hash_sys_bytes 1.443204e+06
53- # HELP go_memstats_frees_total Total number of frees.
54- # TYPE go_memstats_frees_total counter
55- go_memstats_frees_total 1395
56- # HELP go_memstats_gc_sys_bytes Number of bytes used for garbage collection system metadata.
57- # TYPE go_memstats_gc_sys_bytes gauge
58- go_memstats_gc_sys_bytes 2.234368e+06
59- # HELP go_memstats_heap_alloc_bytes Number of heap bytes allocated and still in use.
60- # TYPE go_memstats_heap_alloc_bytes gauge
61- go_memstats_heap_alloc_bytes 1.737064e+06
62- # HELP go_memstats_heap_idle_bytes Number of heap bytes waiting to be used.
63- # TYPE go_memstats_heap_idle_bytes gauge
64- go_memstats_heap_idle_bytes 6.3307776e+07
65- # HELP go_memstats_heap_inuse_bytes Number of heap bytes that are in use.
66- # TYPE go_memstats_heap_inuse_bytes gauge
67- go_memstats_heap_inuse_bytes 3.178496e+06
68- # HELP go_memstats_heap_objects Number of allocated objects.
69- # TYPE go_memstats_heap_objects gauge
70- go_memstats_heap_objects 11434
71- # HELP go_memstats_heap_released_bytes_total Total number of heap bytes released to OS.
72- # TYPE go_memstats_heap_released_bytes_total counter
73- go_memstats_heap_released_bytes_total 0
74- # HELP go_memstats_heap_sys_bytes Number of heap bytes obtained from system.
75- # TYPE go_memstats_heap_sys_bytes gauge
76- go_memstats_heap_sys_bytes 6.6486272e+07
77- # HELP go_memstats_last_gc_time_seconds Number of seconds since 1970 of last garbage collection.
78- # TYPE go_memstats_last_gc_time_seconds gauge
79- go_memstats_last_gc_time_seconds 0
80- # HELP go_memstats_lookups_total Total number of pointer lookups.
81- # TYPE go_memstats_lookups_total counter
82- go_memstats_lookups_total 0
83- # HELP go_memstats_mallocs_total Total number of mallocs.
84- # TYPE go_memstats_mallocs_total counter
85- go_memstats_mallocs_total 12829
86- # HELP go_memstats_mcache_inuse_bytes Number of bytes in use by mcache structures.
87- # TYPE go_memstats_mcache_inuse_bytes gauge
88- go_memstats_mcache_inuse_bytes 6912
89- # HELP go_memstats_mcache_sys_bytes Number of bytes used for mcache structures obtained from system.
90- # TYPE go_memstats_mcache_sys_bytes gauge
91- go_memstats_mcache_sys_bytes 16384
92- # HELP go_memstats_mspan_inuse_bytes Number of bytes in use by mspan structures.
93- # TYPE go_memstats_mspan_inuse_bytes gauge
94- go_memstats_mspan_inuse_bytes 45752
95- # HELP go_memstats_mspan_sys_bytes Number of bytes used for mspan structures obtained from system.
96- # TYPE go_memstats_mspan_sys_bytes gauge
97- go_memstats_mspan_sys_bytes 49152
98- # HELP go_memstats_next_gc_bytes Number of heap bytes when next garbage collection will take place.
99- # TYPE go_memstats_next_gc_bytes gauge
100- go_memstats_next_gc_bytes 4.473924e+06
101- # HELP go_memstats_other_sys_bytes Number of bytes used for other system allocations.
102- # TYPE go_memstats_other_sys_bytes gauge
103- go_memstats_other_sys_bytes 1.301364e+06
104- # HELP go_memstats_stack_inuse_bytes Number of bytes in use by the stack allocator.
105- # TYPE go_memstats_stack_inuse_bytes gauge
106- go_memstats_stack_inuse_bytes 622592
107- # HELP go_memstats_stack_sys_bytes Number of bytes obtained from system for stack allocator.
108- # TYPE go_memstats_stack_sys_bytes gauge
109- go_memstats_stack_sys_bytes 622592
110- # HELP go_memstats_sys_bytes Number of bytes obtained by system. Sum of all system allocations.
111- # TYPE go_memstats_sys_bytes gauge
112- go_memstats_sys_bytes 7.2153336e+07
113- # HELP nifi_info NiFi version info.
114- # TYPE nifi_info gauge
115- nifi_info{env="testing",node_id="aggregate",version="1.7.1"} 1
116- # HELP nifi_jvm_available_processor_count Number of available processors if supported by the underlying system.
117- # TYPE nifi_jvm_available_processor_count gauge
118- nifi_jvm_available_processor_count{env="testing",node_id="aggregate"} 36
119- # HELP nifi_jvm_daemon_thread_count Number of daemon threads.
120- # TYPE nifi_jvm_daemon_thread_count gauge
121- nifi_jvm_daemon_thread_count{env="testing",node_id="aggregate"} 28
122- # HELP nifi_jvm_free_heap_bytes The number of bytes that are allocated to the JVM heap but not currently being used.
123- # TYPE nifi_jvm_free_heap_bytes gauge
124- nifi_jvm_free_heap_bytes{env="testing",node_id="aggregate"} 9.637522384e+09
125- # HELP nifi_jvm_free_non_heap_bytes Total number of free non-heap bytes available to the JVM.
126- # TYPE nifi_jvm_free_non_heap_bytes gauge
127- nifi_jvm_free_non_heap_bytes{env="testing",node_id="aggregate"} 1.086156e+07
128- # HELP nifi_jvm_gc_collection_time_ms_total The total number of milliseconds spent garbage collecting.
129- # TYPE nifi_jvm_gc_collection_time_ms_total counter
130- nifi_jvm_gc_collection_time_ms_total{env="testing",gc="G1 Old Generation",node_id="aggregate"} 0
131- nifi_jvm_gc_collection_time_ms_total{env="testing",gc="G1 Young Generation",node_id="aggregate"} 1565
132- # HELP nifi_jvm_gc_collection_total The number of times garbage collection has run.
133- # TYPE nifi_jvm_gc_collection_total counter
134- nifi_jvm_gc_collection_total{env="testing",gc="G1 Old Generation",node_id="aggregate"} 0
135- nifi_jvm_gc_collection_total{env="testing",gc="G1 Young Generation",node_id="aggregate"} 54
136- # HELP nifi_jvm_heap_bytes The total number of bytes that are available for the JVM heap to use.
137- # TYPE nifi_jvm_heap_bytes gauge
138- nifi_jvm_heap_bytes{env="testing",node_id="aggregate"} 1.2884901888e+10
139- # HELP nifi_jvm_info JVM version info.
140- # TYPE nifi_jvm_info gauge
141- nifi_jvm_info{env="testing",node_id="aggregate",vendor="Oracle Corporation",version="1.8.0_181"} 1
142- # HELP nifi_jvm_max_heap_bytes The maximum number of bytes that can be used by the JVM.
143- # TYPE nifi_jvm_max_heap_bytes gauge
144- nifi_jvm_max_heap_bytes{env="testing",node_id="aggregate"} 1.2884901888e+10
145- # HELP nifi_jvm_max_non_heap_bytes The maximum number of bytes that the JVM can use for non-heap purposes.
146- # TYPE nifi_jvm_max_non_heap_bytes gauge
147- nifi_jvm_max_non_heap_bytes{env="testing",node_id="aggregate"} -1
148- # HELP nifi_jvm_non_heap_bytes Total number of bytes allocated to the JVM not used for heap.
149- # TYPE nifi_jvm_non_heap_bytes gauge
150- nifi_jvm_non_heap_bytes{env="testing",node_id="aggregate"} 2.03776e+08
151- # HELP nifi_jvm_processor_load_avg The processor load average if supported by the underlying system.
152- # TYPE nifi_jvm_processor_load_avg gauge
153- nifi_jvm_processor_load_avg{env="testing",node_id="aggregate"} 0
154- # HELP nifi_jvm_thread_count Total number of threads.
155- # TYPE nifi_jvm_thread_count gauge
156- nifi_jvm_thread_count{env="testing",node_id="aggregate"} 139
157- # HELP nifi_jvm_used_heap_bytes The number of bytes of JVM heap that are currently being used.
158- # TYPE nifi_jvm_used_heap_bytes gauge
159- nifi_jvm_used_heap_bytes{env="testing",node_id="aggregate"} 3.247379504e+09
160- # HELP nifi_jvm_used_non_heap_bytes Total number of bytes used by the JVM not in the heap space.
161- # TYPE nifi_jvm_used_non_heap_bytes gauge
162- nifi_jvm_used_non_heap_bytes{env="testing",node_id="aggregate"} 1.9291444e+08
163- # HELP nifi_os_info Operating system version info.
164- # TYPE nifi_os_info gauge
165- nifi_os_info{arch="amd64",env="testing",name="Linux",node_id="aggregate",version="4.14.72-73.55.amzn2.x86_64"} 1
166- # HELP nifi_conn_flow_files_queued The number of FlowFiles that are currently queued in the connection
167- # TYPE nifi_conn_flow_files_queued gauge
168- nifi_conn_flow_files_queued{connection_id="026073af-c1c7-3d0e-2b43-e8baf6bb875b",connection_name="success",destination_name="in",env="testing",group_id="57b9c87e-7ee2-3cf1-2a76-5d75762bb2dd",node_id="aggregate",source_name="GenerateFlowFile"} 0
169- nifi_conn_flow_files_queued{connection_id="06e8674b-a9a2-300a-5fea-3bcb312a7a0e",connection_name="failure",destination_name="fail5",env="testing",group_id="053742a0-5d93-379d-8232-ff6e6c21794d",node_id="aggregate",source_name="ExecuteSQL"} 4
170- nifi_conn_flow_files_queued{connection_id="0818d0fd-9d0f-36b4-db68-596dfe02569e",connection_name="success",destination_name="out",env="testing",group_id="48f00c1b-c9c7-30cf-e3f8-52f0745f3dfd",node_id="aggregate",source_name="PutDistributedMapCache"} 0
171- nifi_conn_flow_files_queued{connection_id="0bd6ab8a-29f8-37df-b345-16bdcf1abb9a",connection_name="success",destination_name="ExecuteScript",env="testing",group_id="263a63da-e085-3f02-1818-f5dfaa5504f0",node_id="aggregate",source_name="Set Credentials & Properties"} 0
172- nifi_conn_flow_files_queued{connection_id="134df201-97bf-3eed-f937-445c48af300d",connection_name="splits",destination_name="ExtractText",env="testing",group_id="d99c18ca-e627-3085-7280-3aabf4c44eba",node_id="aggregate",source_name="SplitText"} 0
173- nifi_conn_flow_files_queued{connection_id="16122638-c888-3192-a3f2-c6578fa7bced",connection_name="Response",destination_name="RouteOnContent",env="testing",group_id="053742a0-5d93-379d-8232-ff6e6c21794d",node_id="aggregate",source_name="InvokeHTTP"} 0
174- nifi_conn_flow_files_queued{connection_id="1d681a65-c462-30eb-0f17-c56423642902",connection_name="No Retry, Failure",destination_name="UpdateAttribute",env="testing",group_id="053742a0-5d93-379d-8232-ff6e6c21794d",node_id="aggregate",source_name="InvokeHTTP"} 0
175- # HELP nifi_pg_active_thread_count The active thread count for this process group.
176- # TYPE nifi_pg_active_thread_count gauge
177- nifi_pg_active_thread_count{env="testing",group="my_processor_group",node_id="aggregate"} 0
178- # HELP nifi_pg_bulletin_5m_count Number of bulletins posted during last 5 minutes.
179- # TYPE nifi_pg_bulletin_5m_count gauge
180- nifi_pg_bulletin_5m_count{env="testing",group="my_processor_group",level="ERROR"} 0
181- nifi_pg_bulletin_5m_count{env="testing",group="my_processor_group",level="INFO"} 0
182- nifi_pg_bulletin_5m_count{env="testing",group="my_processor_group",level="WARNING"} 0
183- # HELP nifi_pg_component_count The number of components in this process group.
184- # TYPE nifi_pg_component_count gauge
185- nifi_pg_component_count{env="testing",group="my_processor_group",status="disabled"} 0
186- nifi_pg_component_count{env="testing",group="my_processor_group",status="invalid"} 2
187- nifi_pg_component_count{env="testing",group="my_processor_group",status="running"} 0
188- nifi_pg_component_count{env="testing",group="my_processor_group",status="stopped"} 5
189- # HELP nifi_pg_in_bytes_5m_count The number of bytes that have come into this ProcessGroup in the last 5 minutes
190- # TYPE nifi_pg_in_bytes_5m_count gauge
191- nifi_pg_in_bytes_5m_count{env="testing",group="my_processor_group",node_id="aggregate"} 0
192- # HELP nifi_pg_in_flow_files_5m_count The number of FlowFiles that have come into this ProcessGroup in the last 5 minutes
193- # TYPE nifi_pg_in_flow_files_5m_count gauge
194- nifi_pg_in_flow_files_5m_count{env="testing",group="my_processor_group",node_id="aggregate"} 0
195- # HELP nifi_pg_out_bytes_5m_count The number of bytes transferred out of this ProcessGroup in the last 5 minutes
196- # TYPE nifi_pg_out_bytes_5m_count gauge
197- nifi_pg_out_bytes_5m_count{env="testing",group="my_processor_group",node_id="aggregate"} 0
198- # HELP nifi_pg_out_flow_files_5m_count The number of FlowFiles transferred out of this ProcessGroup in the last 5 minutes
199- # TYPE nifi_pg_out_flow_files_5m_count gauge
200- nifi_pg_out_flow_files_5m_count{env="testing",group="my_processor_group",node_id="aggregate"} 0
201- # HELP nifi_pg_queued_bytes The number of bytes that are queued up in this ProcessGroup right now
202- # TYPE nifi_pg_queued_bytes gauge
203- nifi_pg_queued_bytes{env="testing",group="my_processor_group",node_id="aggregate"} 0
204- # HELP nifi_pg_queued_flow_files_count The number of FlowFiles that are queued up in this ProcessGroup right now
205- # TYPE nifi_pg_queued_flow_files_count gauge
206- nifi_pg_queued_flow_files_count{env="testing",group="my_processor_group",node_id="aggregate"} 0
207- # HELP nifi_pg_read_bytes_5m_count The number of bytes read by components in this ProcessGroup in the last 5 minutes
208- # TYPE nifi_pg_read_bytes_5m_count gauge
209- nifi_pg_read_bytes_5m_count{env="testing",group="my_processor_group",node_id="aggregate"} 0
210- # HELP nifi_pg_received_bytes_5m_count The number of bytes received from external sources by components within this ProcessGroup in the last 5 minutes
211- # TYPE nifi_pg_received_bytes_5m_count gauge
212- nifi_pg_received_bytes_5m_count{env="testing",group="my_processor_group",node_id="aggregate"} 0
213- # HELP nifi_pg_received_flow_files_5m_count The number of FlowFiles received from external sources by components within this ProcessGroup in the last 5 minutes
214- # TYPE nifi_pg_received_flow_files_5m_count gauge
215- nifi_pg_received_flow_files_5m_count{env="testing",group="my_processor_group",node_id="aggregate"} 0
216- # HELP nifi_pg_sent_bytes_5m_count The number of bytes sent to an external sink by components within this ProcessGroup in the last 5 minutes
217- # TYPE nifi_pg_sent_bytes_5m_count gauge
218- nifi_pg_sent_bytes_5m_count{env="testing",group="my_processor_group",node_id="aggregate"} 0
219- # HELP nifi_pg_sent_flow_files_5m_count The number of FlowFiles sent to an external sink by components within this ProcessGroup in the last 5 minutes
220- # TYPE nifi_pg_sent_flow_files_5m_count gauge
221- nifi_pg_sent_flow_files_5m_count{env="testing",group="my_processor_group",node_id="aggregate"} 0
222- # HELP nifi_pg_transferred_bytes_5m_count The number of bytes transferred in this ProcessGroup in the last 5 minutes
223- # TYPE nifi_pg_transferred_bytes_5m_count gauge
224- nifi_pg_transferred_bytes_5m_count{env="testing",group="my_processor_group",node_id="aggregate"} 0
225- # HELP nifi_pg_transferred_flow_files_5m_count The number of FlowFiles transferred in this ProcessGroup in the last 5 minutes
226- # TYPE nifi_pg_transferred_flow_files_5m_count gauge
227- nifi_pg_transferred_flow_files_5m_count{env="testing",group="my_processor_group",node_id="aggregate"} 0
228- # HELP nifi_pg_written_bytes_5m_count The number of bytes written by components in this ProcessGroup in the last 5 minutes
229- # TYPE nifi_pg_written_bytes_5m_count gauge
230- nifi_pg_written_bytes_5m_count{env="testing",group="my_processor_group",node_id="aggregate"} 0
231- # HELP nifi_stor_free_bytes The number of bytes of free space.
232- # TYPE nifi_stor_free_bytes gauge
233- nifi_stor_free_bytes{env="testing",location="default",node_id="aggregate",type="content"} 1.92030683136e+11
234- nifi_stor_free_bytes{env="testing",location="default",node_id="aggregate",type="flow_file"} 1.92030683136e+11
235- nifi_stor_free_bytes{env="testing",location="default",node_id="aggregate",type="provenance"} 1.92030683136e+11
236- # HELP nifi_stor_size_bytes The number of bytes of total space.
237- # TYPE nifi_stor_size_bytes gauge
238- nifi_stor_size_bytes{env="testing",location="default",node_id="aggregate",type="content"} 2.14735761408e+11
239- nifi_stor_size_bytes{env="testing",location="default",node_id="aggregate",type="flow_file"} 2.14735761408e+11
240- nifi_stor_size_bytes{env="testing",location="default",node_id="aggregate",type="provenance"} 2.14735761408e+11
241- # HELP nifi_stor_used_bytes The number of bytes of used space.
242- # TYPE nifi_stor_used_bytes gauge
243- nifi_stor_used_bytes{env="testing",location="default",node_id="aggregate",type="content"} 2.2705078272e+10
244- nifi_stor_used_bytes{env="testing",location="default",node_id="aggregate",type="flow_file"} 2.2705078272e+10
245- nifi_stor_used_bytes{env="testing",location="default",node_id="aggregate",type="provenance"} 2.2705078272e+10
29+ Docker image is available at [Docker Hub](https://hub.docker.com/msiedlarek/nifi_exporter):
30+
31+ ` ` ` sh
32+ docker run -p 9103:9103 -v /path/to/config.yml:/config/config.yml:ro msiedlarek/nifi_exporter:0.2.0
33+ ```
34+
35+ ### Without Docker
36+
37+ Download a release package for your system from [ Releases page] ( https://github.com/msiedlarek/nifi_exporter/releases ) , unpack it and run the binary directly:
38+
39+ ``` sh
40+ curl -fLO https://github.com/msiedlarek/nifi_exporter/releases/download/v0.2.0/nifi_exporter-0.2.0.linux-amd64.tar.gz
41+ tar -xvf nifi_exporter-0.2.0.linux-amd64.tar.gz
42+ cd ./nifi_exporter-0.2.0.linux-amd64
43+ ./nifi_exporter /path/to/config.yml
24644```
24745
24846## Building
24947
250- Set up a [ golang environment] ( https://golang.org/doc/install )
251- Checkout this repository to ` $GOPATH/src/github.com/msiedlarek/nifi_exporter `
252- From the root of this repository run ` go build `
48+ ``` sh
49+ go get github.com/msiedlarek/nifi_exporter
50+ cd ${GOPATH-$HOME / go} /src/github.com/msiedlarek/nifi_exporter
51+ go build
52+ ./nifi_exporter
53+ ```
0 commit comments