|
| 1 | +id: nifi |
| 2 | +metric_id: nifi |
| 3 | +backend_only: false |
| 4 | +facets: |
| 5 | + - groups: |
| 6 | + - Source Code |
| 7 | + name: Logger Name |
| 8 | + path: logger.name |
| 9 | + source: log |
| 10 | + - groups: |
| 11 | + - Source Code |
| 12 | + name: Thread Name |
| 13 | + path: logger.thread_name |
| 14 | + source: log |
| 15 | + - groups: |
| 16 | + - Web Access |
| 17 | + name: Method |
| 18 | + path: http.method |
| 19 | + source: log |
| 20 | + - groups: |
| 21 | + - Web Access |
| 22 | + name: Status Code |
| 23 | + path: http.status_code |
| 24 | + source: log |
| 25 | + - groups: |
| 26 | + - Web Access |
| 27 | + name: URL Path |
| 28 | + path: http.url_details.path |
| 29 | + source: log |
| 30 | + - groups: |
| 31 | + - Web Access |
| 32 | + name: Client IP |
| 33 | + path: network.client.ip |
| 34 | + source: log |
| 35 | +pipeline: |
| 36 | + type: pipeline |
| 37 | + name: NiFi |
| 38 | + enabled: true |
| 39 | + filter: |
| 40 | + query: source:nifi |
| 41 | + processors: |
| 42 | + - type: pipeline |
| 43 | + name: NiFi application logs |
| 44 | + enabled: true |
| 45 | + filter: |
| 46 | + query: -log_type:request |
| 47 | + processors: |
| 48 | + - type: grok-parser |
| 49 | + name: Parsing NiFi application logs |
| 50 | + enabled: true |
| 51 | + source: message |
| 52 | + samples: |
| 53 | + - "2026-03-20 18:08:33,065 INFO [main] o.a.nifi.NiFi NiFi PID is 1" |
| 54 | + - "2026-03-20 18:08:33,065 ERROR [Timer-Driven Process Thread-1] o.a.n.p.standard.PutFile PutFile[id=abc] Failed to write" |
| 55 | + - "2026-03-20 18:08:34,100 WARN [Flow Service Tasks Thread-1] o.a.n.c.s.impl.WriteAheadFlowFileRepository Encountered non-critical error" |
| 56 | + grok: |
| 57 | + supportRules: | |
| 58 | + _date %{date("yyyy-MM-dd HH:mm:ss,SSS"):timestamp} |
| 59 | + _level %{word:level} |
| 60 | + _thread %{regex("[^]]*"):logger.thread_name} |
| 61 | + _logger %{notSpace:logger.name} |
| 62 | + matchRules: | |
| 63 | + nifi_app %{_date} %{_level} \[%{_thread}\] %{_logger} %{data:message} |
| 64 | + - type: date-remapper |
| 65 | + name: Define `timestamp` as the official date of the log |
| 66 | + enabled: true |
| 67 | + sources: |
| 68 | + - timestamp |
| 69 | + - type: status-remapper |
| 70 | + name: Define `level` as the official status of the log |
| 71 | + enabled: true |
| 72 | + sources: |
| 73 | + - level |
| 74 | + - type: message-remapper |
| 75 | + name: Define `message` as the official message of the log |
| 76 | + enabled: true |
| 77 | + sources: |
| 78 | + - message |
| 79 | + - type: pipeline |
| 80 | + name: NiFi HTTP request logs |
| 81 | + enabled: true |
| 82 | + filter: |
| 83 | + query: log_type:request |
| 84 | + processors: |
| 85 | + - type: grok-parser |
| 86 | + name: Parsing NiFi HTTP request logs |
| 87 | + enabled: true |
| 88 | + source: message |
| 89 | + samples: |
| 90 | + - '192.168.1.100 - admin [20/Mar/2026:18:08:33 +0000] "GET /nifi-api/flow/status HTTP/1.1" 200 1234 "-" "python-requests/2.31.0"' |
| 91 | + - '10.0.0.50 - - [20/Mar/2026:18:10:45 +0000] "POST /nifi-api/process-groups/root/process-groups HTTP/1.1" 404 892 "https://localhost:8443/nifi/" "Mozilla/5.0"' |
| 92 | + grok: |
| 93 | + supportRules: | |
| 94 | + _auth %{notSpace:http.auth:nullIf("-")} |
| 95 | + _bytes_written %{integer:network.bytes_written} |
| 96 | + _client_ip %{ipOrHost:network.client.ip} |
| 97 | + _version HTTP\/%{regex("\\d+\\.\\d+"):http.version} |
| 98 | + _url %{notSpace:http.url} |
| 99 | + _ident %{notSpace:http.ident:nullIf("-")} |
| 100 | + _user_agent %{regex("[^\\\"]*"):http.useragent} |
| 101 | + _referer %{notSpace:http.referer} |
| 102 | + _status_code %{integer:http.status_code} |
| 103 | + _method %{word:http.method} |
| 104 | + _date_access %{date("dd/MMM/yyyy:HH:mm:ss Z"):date_access} |
| 105 | + matchRules: | |
| 106 | + access.common %{_client_ip} %{_ident} %{_auth} \[%{_date_access}\] "(?>%{_method} |)%{_url}(?> %{_version}|)" %{_status_code} (?>%{_bytes_written}|-) |
| 107 | +
|
| 108 | + access.combined %{access.common} "%{_referer}" "%{_user_agent}" |
| 109 | + - type: url-parser |
| 110 | + name: Extract URL details |
| 111 | + enabled: true |
| 112 | + sources: |
| 113 | + - http.url |
| 114 | + target: http.url_details |
| 115 | + - type: user-agent-parser |
| 116 | + name: Extract user agent details |
| 117 | + enabled: true |
| 118 | + sources: |
| 119 | + - http.useragent |
| 120 | + target: http.useragent_details |
| 121 | + encoded: false |
| 122 | + - type: date-remapper |
| 123 | + name: Define `date_access` as the official date of the log |
| 124 | + enabled: true |
| 125 | + sources: |
| 126 | + - date_access |
| 127 | + - type: category-processor |
| 128 | + name: Categorize status code |
| 129 | + enabled: true |
| 130 | + categories: |
| 131 | + - filter: |
| 132 | + query: "@http.status_code:[200 TO 299]" |
| 133 | + name: OK |
| 134 | + - filter: |
| 135 | + query: "@http.status_code:[300 TO 399]" |
| 136 | + name: notice |
| 137 | + - filter: |
| 138 | + query: "@http.status_code:[400 TO 499]" |
| 139 | + name: warning |
| 140 | + - filter: |
| 141 | + query: "@http.status_code:[500 TO 599]" |
| 142 | + name: error |
| 143 | + target: http.status_category |
| 144 | + - type: status-remapper |
| 145 | + name: Define `http.status_category` as the official status of the log |
| 146 | + enabled: true |
| 147 | + sources: |
| 148 | + - http.status_category |
0 commit comments