Search code examples
apache-nifi

Nifi Stop all Processors from Shell


For administration purposes I'm looking for an option or command to pause/stopp all Nifi Processes on the shell. Is there a way to do that or did I misunderstood the concepts behind.


Solution

  • You can use curl to send an api request telling it to stop the main canvas PG

    curl --tlsv1.2 -i -H 'Content-Type: application/json' -XPUT -d '{"id":"PG ID","state":"STOPPED"}'  http://nifi-server-ip:port/nifi-api/flow/process-groups/PG ID
    

    This will stop all PG/Processors that are on the main canvas.

    To get the PG Id to go to the main NiFi canvas and is the long id under the Operate dashboard.