Reputation: 24721
We had a lot of processors added for debugging. They are named "DebugFlow". Couple of days back, some one right clicked on canvas and clicked start. This must have started some of those DebugFlow processors deep inside all processor groups. (mostly we disable all those processors, but some of them might have left enabled) Now we want to stop all of them. When I search DebugFlow in Nifi search box, it populates huge drop down list. I can go to them one by one and turn them off. But the list is really really big. I am guessing if there is any way to search all running processors with name "DebugFlow" and stop them, something like below in terms of pseudo-sql like words:
UPDATE Processor SET state="stopped" WHERE state="running" and name="DebugFlow"
Upvotes: 0
Views: 145
Reputation: 14184
You can definitely automate this by using a variety of tools:
GET /flow/search-results
) to return the list of all DebugFlow
processors and then iterate over them, setting their state to stopped (and disable them as well if you want) using HTTP calls via the language or curl
. A general rule of thumb is that everything possible in NiFi via the UI is also possible via the API (as the UI is a reference implementation of an API client), so you can always open the Developer Tools of your browser and see which HTTP calls are made as you perform the desired operation manually, then copy those to a repeatable script.
Upvotes: 1