Member since
07-30-2019
3473
Posts
1642
Kudos Received
1021
Solutions
My Accepted Solutions
| Title | Views | Posted |
|---|---|---|
| 298 | 06-15-2026 08:08 AM | |
| 501 | 06-03-2026 06:06 PM | |
| 736 | 05-06-2026 09:16 AM | |
| 1703 | 05-04-2026 05:20 AM | |
| 822 | 05-01-2026 10:15 AM |
01-26-2022
06:49 AM
2 Kudos
@rafy There are two commonly used methods used to get actively being written to logs from a source server. 1. Install a MiNiFi agent on the server that utilizes a tailFile processor that is configured to read the log file being produced and then sends those FlowFiles to your NiFi cluster for further processing. However, as you said, you can not install new services/software on this server, so that rules out this option. 2. Another option is to modify the logger on your source system so that in addition to it logging locally, it also sends log output to an external syslog server. IN this case that syslog server would be your NiFi cluster with a dataflow that uses the ListenSyslog NiFi processor. There is no way for NiFi to connect to a remote server and incrementally pull new lines from a file that is continuously being written to. Now if your source server rolls the logs, It is possible you could have your NiFi use the ListSFTP and FetchSFTP processors to consume those rolled logs. Downside here is this would no be real time processing of those logs since you are only consuming based on the log rotation configuration on the target server. And you cannot use these processors to consume the actively being written to log. Doing so means that NiFi would pull the entire contents of the log each time the processor executes rather than just the newest log lines. If you found this response assisted with your query, please take a moment to login and click on "Accept as Solution" below this post. Thank you, Matt
... View more
01-25-2022
01:28 PM
@RonMilne I recommend taking your initial CSV record file and partitioning by the "salesRepId" in to multiple new JSON records. This can be accomplished using the PartitionRecord processor utilizing a CSVReader and a JsonRecordSetWriter. Your PartitionRecord processor configuration would look like this: Your CSVReader would be configured something like this (you'll need to modify it for your specific record's Schema: Note: Pop-out shows the "Schema Text" property and don't forget to set "Treat First Line as Header" property to "true" The JsonRecordSetWriter would need to be configured to produce the desired JSON record output format. However, just leaving default configuration will out put a separate FlowFile for each unique "SalesRepId". If you found this response assisted with your query, please take a moment to login and click on "Accept as Solution" below this post. Thank you, Matt
... View more
01-25-2022
12:53 PM
@vk21 You are running in to a known bug in that version of Apache NiFi. The bug was addressed in Apache NiFi 1.14. Upgrading Apache NiFi 1.5 to 1.14 would solve the issue for you. Here are the bugs that addressed the issue: https://issues.apache.org/jira/browse/NIFI-8281 https://issues.apache.org/jira/browse/NIFI-8630 If you found this response assisted with your query, please take a moment to login and click on "Accept as Solution" below this post. Thank you, Matt
... View more
01-24-2022
06:54 AM
@ebeb You can name each of your process groups uniquely by name that identifies the ETL pipeline it contains. Then you can use the Search box in the upper right corner of the UI to search for specific ETL process groups. You are correct that having 100 PG on a single canvas, if zoomed out far enough to see them all, would result in PG boxes rendered without the visible names on them. So if the PG were not named making them easy to search for. the only option would be to zoom in and pan around looking for a PG you want to access. There is no way to enter some search which would hide some rendered items and highlight others. All items are always visible, so unique naming when dealing with large dataflows is very important from a usability perspective. Every component when created is assigned a Unique ID (UUID) which can be used to search on as well. If each of your pipelines does the same thing, but on different data, creating a separate dataflow for each would not be the most efficient use of resources. Maybe better to tag your data accordingly and share pipeline processing where it makes sense.
... View more
01-19-2022
05:45 AM
@Wisdomstar Thank you, I appreciate that and glad I could help. Matt
... View more
01-18-2022
08:34 AM
@Kilynn So as i mentioned in my last response, once memory usage go to high, OS level OOM Killer was most likely killing the NiFi service to protect the OS. The NiFi bootstrap process would have detected the main process died and started it again assuming OOM killer did not kill the parent process.
... View more
01-18-2022
08:23 AM
@oopslemon NiFi only encrypts and obscures values in properties that support sensitive properties (so those properties which are specifically coded as sensitive properties like "password" properties). So there is no way at this time to encrypt all or portions of property values not coded as sensitive. Keep in mind it is not just what is visible in the UI, your unencrypted passwords will be in plaintext with the NiFi flow.xml.gz file as well. My recommendation to you is to use mutual TLS based authentication instead. You can create a clientAuth certificate to use in your rest API calls. Then you need to make sure that your clientAuth certificate is authorized to perform the actions the rest-api call is making. This is not going to be possible while using the single user login mode as it does not allow you to setup additional users and authorizations. This single users authentication and authorization providers where added to protect users from unprotected access to their NiFis. It was not meant to be the desired choice when securing your NiFi. It is one step above an unsecured default setup that existed prior to NiFi 1.14. It protects you, but also has limitations that go with its very basic functionality. So step one is to switch to another method of authentication and authorization to you NiFi. TLS is always enabled for authentication as soon as NiFi is configured for HTTPS. You can configure additional authentication methods like ldap/AD. https://nifi.apache.org/docs/nifi-docs/html/administration-guide.html#user_authentication The authorizer configured in the authorizers.xml file allows you to establish policies that control user/client permissions. https://nifi.apache.org/docs/nifi-docs/html/administration-guide.html#multi-tenant-authorization Then you can configure your invokeHTTP processor to simply use a SSLContextService that you would configure with your clientAuth certificate keystore and a truststore. The password fields in this controller service would be encrypted. No more need to constantly get a new bearer token. All you need to worry about is getting a new client certificate before the old one expires which is typically every 2 years, but that is configurable when you create it and get it signed. If you found this response assisted with your query, please take a moment to login and click on "Accept as Solution" below this post. Thank you, Matt
... View more
01-18-2022
08:08 AM
@Wisdomstar You should be able to use the JoltTransformJson NiFi processor to accomplish this. There is a thread here where a jolt specification example exists fro doing what you are trying to do: https://stackoverflow.com/questions/54696540/jolt-transformation-lowercase-all-keys Add the Jolt specification in to the "Jolt Specification" property in the JoltTransformJson NiFi processor. Set "Pretty Print" to true if you still want the nice multi-line formatted json to be produced. If you found this response assisted with your query, please take a moment to login and click on "Accept as Solution" below this post. Thank you, Matt
... View more
01-14-2022
10:49 AM
@samarsimha Did you make any recent changes before you restarted your NiFi nodes to things like hostnames or ports? You could try stopping you NiFi nodes, removing the NiFi local state directory on all nodes, and then restarting NiFi again. You can check the state-management.xml configuration file to see where each node is keeping local state. The default for Apache NiFi is "./state/local". If you found this response assisted with your query, please take a moment to login and click on "Accept as Solution" below this post. Thank you, Matt
... View more
01-14-2022
08:09 AM
@Kilynn I see that you have set some very high values (330 GB) for your NiFi heap space. This is really not recommended. Can also see from what you have shared that the particular NiFi instance has been up for ~2.5 hours and within that 2.5 hour timeframe it has been in a stop-the-world state due to Java Garbage Collection (GC) for ~20 minutes. This means that your NiFi is spending ~13% of its uptime doing nothing by stop-the-world garbage collection. Is there a reason you set your heap this high? Setting large heap simply because your server has the memory available is not a good reason. Java GC kicks in when heap usage is around 80% usage. When an object in heap is no longer being used it is not actually cleaned out of heap and space reclaimed at that time. Space is only reclaimed via GC. The larger the heap the longer the GC events are going to take. Seeing as how you current heap usage is ~53%, I am guessing with each GC event a considerable amount of heap space is being released. Long GC pauses (stop-the-world) can result in node disconnection because NiFi node heartbeats are not being sent. When NiFi seems to be restarting with no indication at all in the nifi-app.log, you may want to take a look at your systems /var/log/messages file for any indications of the Out Of Memory (OOM) killer being executed. With your NiFi instance being the largest consumer of memory on the host, it would be the top pick process by the OS OOM Killer when available OS memory gets too low. In most case you should not need more the 16GB of heap to run most dataflows. If you are building dataflows that utilize a lot of heap, I'd recommend taking a close look at your dataflow designs to see if there are better design choices. This that can lead to large heap usage is creating very large FlowFile attributes (for example, extracting large amount of a FlowFile's content in to a FlowFile attribute). FlowFile attributes all live inside the JVM heap. Some other dataflow designs elements that can lead to high heap usage include: - Merging a very large number of FlowFiles in a single Merge processor. Better to use multiple merge processors in series with first merging up 10,000 to 20,000 FlowFiles and then second merging those in to even larger files - Splitting a very large file in a single split processor resulting in a lot of FlowFiles produced in a single transaction. Better to use multiple or even look at ways of processing the dat without needing to split the file in to multiple files (look at using the available "record" based processors) - Reading in entire content of a large FlowFile in to memory to perform action on it. Like ExtractText processor configured for entire text instead of line-by-line mode. While I 100% agree that you should be looking in to your "thread" allocation choices in your nifi.properties file. Many of them seem unnecessarily high for a 7 node cluster. You should understand that each node in your cluster executes independently of the others, so the settings applied pertain to each node individually. Following the guidance in the NiFi app guide (can be found in NIFi UI under help or on Apache NiFi site) is strongly advised. If you found this response assisted with your query, please take a moment to login and click on "Accept as Solution" below this post. Thank you, Matt
... View more