Github user alopresto commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/1736#discussion_r114436928
  
    --- Diff: nifi-docs/src/main/asciidoc/administration-guide.adoc ---
    @@ -1176,6 +1176,148 @@ Secure Prompt
     
     If you prefer not to provide the password or raw key in the command-line 
invocation of the tool, leaving these arguments absent will prompt a secure 
console read of the password (by default) or raw key (if the `-r` flag is 
provided at invocation).
     
    +[[admin-toolkit]]
    +Administrative Tools
    +--------------------
    +The admin toolkit contains command line utilities for administrators to 
support NiFi maintenance in standalone
    +and clustered environments. These utilities include:
    +
    +* Notify -- The notification tool allows administrators to send bulletins 
to the NiFi UI using the command line.
    +* Node Manager -- The node manager tool allows administrators to safely 
disconnect or remove nodes from a NiFi cluster.
    +
    +The admin toolkit is bundled with the nifi-toolkit and can be executed 
with scripts found in the _bin_ folder.
    +
    +=== Prerequisites for Running Admin Toolkit in a Secure Environment
    +For secured nodes and clusters, two policies should be configured in 
advance:
    +
    +* Access the controller – A user that will have access to these 
utilities should be authorized in NiFi by creating an “access the 
controller” policy (/controller) with both view and modify rights.
    +* Proxy user request – If not previously set node’s identity ( the DN 
value of the node’s certificate) should be authorized to proxy requests on 
behalf of a user
    +
    +When executing either the notify or node manager tools in a secured 
environment the proxyDN flag option should be used in order to properly 
identify the user that was authorized to execute these commands. In non-secure 
environments the flag will be ignored.
    +
    +=== Notify
    +Notify allows administrators to send messages as bulletins to NiFi.  
Notify is supported on NiFi version 1.2.0 and higher.
    +The notification tool is also available in a notify.bat file for use on 
Windows machines.
    +
    +
    +
    +To send notifications:
    +
    + notify.sh -d {nifi root folder} –b {nifi bootstrap file path} -m 
{message} [-l {level}][-v]
    +
    +
    +To show help:
    +
    + notify.sh -h
    +
    +The following are available options:
    +
    +* -b  | --bootstrapConf - Existing Bootstrap Configuration file (required)
    +* -d  |  --nifiInstallDir – NiFi Root Folder (required)
    +* -p  | --proxyDN – Proxy or User DN (required for secured nodes)
    +* -m  | --message – Bulletin message (required)
    +* -l  | --level – Status level of bulletin – INFO, WARN, ERROR
    +* -v  | --verbose – Verbose messaging (optional)
    +* -h  | --help – Help Text (optional)
    +
    +Example usage on Linux:
    +
    + ./notify.sh -d /usr/nifi/nifi_current -b 
/usr/nifi/nifi_current/conf/bootstrap.conf -m "Test Message Server 1" -l "WARN" 
–p “ydavis@nifi” -v
    +
    +Example usage on Windows:
    +
    +  notify.bat -v -d "C:\\Program Files\\nifi\\nifi-1.2.0-SNAPSHOT" -b 
"C:\\Program Files\\nifi\\nifi-1.2.0-SNAPSHOT\\conf\\bootstrap.conf" -m "Test 
Message Server 1" -v
    +
    +Executing the above command line should result in a bulletin appearing in 
NiFi:
    +
    +image::nifi-notifications.png["NiFi Notifications"]
    +
    +=== Node Manager
    +
    +Node manager supports connecting, disconnecting and removing a node when 
in a cluster (an error message
    +displays if the node is not part of a cluster) as well as obtaining the 
status of a node.  When nodes are disconnected 
    +from a cluster and need to be
    +connected or removed, a list of urls of connected nodes should be provided 
to send the required command to
    +the active cluster.  Node Manager supports NiFi version 1.0.0 and higher. 
Node Manager is also available in
    +node-manager.bat file for use on Windows machines.
    +
    +To connect, disconnect, or remove a node from a cluster:
    +
    + node-manager.sh -d {nifi root folder} –b { nifi bootstrap file path}
    + -o {remove|disconnect|connect|status} [-u {url list}] [-p {proxy 
name}][-v] 
    +
    +To show help:
    +
    +  node-manager.sh -h
    +
    +The following are available options:
    +
    +* -b  | --bootstrapConf - Existing Bootstrap Configuration file (required)
    +* -d  |  --nifiInstallDir – NiFi Root Folder (required)
    +* -p  | --proxyDN – Proxy or User DN (required for secured nodes doing 
connect, disconnect and remove operations)
    +* -o | --operation- Operations supported: status, connect (cluster), 
disconnect(cluster), remove (cluster) 
    +* -u  | --urlList – Comma delimited list of active urls for cluster 
(optional). Not required for disconnecting a node yet will be needed when 
connecting or removing from a cluster
    +* -v  | --verbose – Verbose messaging (optional)
    +* -h  | --help – Help Text (optional)
    +
    +Example usage on Linux:
    +
    + # disconnect without cluster url list
    + ./node-manager.sh
    + -d /usr/nifi/nifi_current
    + -b /usr/nifi/nifi_current/conf/bootstrap.conf
    + -o disconnect
    + –p ydavis@nifi
    + -v
    +
    + #with url list
    + ./node-manager.sh
    + -d /usr/nifi/nifi_current
    + -b /usr/nifi/nifi_current/conf/bootstrap.conf
    + -o connect
    + -u 'http://nifi-server-1:8080,http://nifi-server-2:8080'
    + -v
    +
    +Example usage on Windows:
    +
    + node-manager.bat
    + -d "C:\\Program Files\\nifi\\nifi-1.2.0-SNAPSHOT"
    + -b "C:\\Program Files\\nifi\\nifi-1.2.0-SNAPSHOT\\conf\\bootstrap.conf"
    + -o disconnect
    + –v
    +
    +==== Expected behavior
    +
    +Status:
    +
    +To obtain information on UI availability of a node, the status operation 
can be used to determine if the node is running.  
    +If the –u (clusterUrls) option is not provided the current node url is 
checked otherwise the urls provided will be checked.  
    +
    +Disconnect:
    +
    +When a node is disconnected from the cluster the node itself should appear 
as disconnected and the cluster
    --- End diff --
    
    ... disconnected from the cluster**, **the node itself ...


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to