1.0.6 • Published 6 years ago

n-brother v1.0.6

Weekly downloads
1
License
MIT
Repository
-
Last release
6 years ago

N-Brother

NPM

N-Brother is a tool for monitoring multiple machines from a single client shell. Currently the communication does not have authentication or authorization. The messages are exchanged in plain-text. Running the daemon exposes your file-system for unauthenticated read access and is a security risk.

Getting Started

  1. Install the N-Brother package from NPM (on all the remote machines and your local machine)
~$ sudo npm install -g n-brother
  1. Start the N-Brother Daemon on the remote machines that you want to monitor.
~$ nbrod -p 8000

The above command will bind the N-Brother daemon process to port 8000. It starts a WebSocket server that listens for incoming commands.

  1. Start the N-Brother Shell on your local machine.
~$ nbro

The above command will start the interactive shell. Type "help" in the shell to see the list of available commands.

3.a. From the Shell, you can add a remote machine like below:

$ add daemon1 ws://daemon1.example.com:8000

daemon1 can be any string; this is the name of the remote machine that you give. daemon1.example.com should be replaced with either a DNS resolved host name or the remote machine's IP.

3.b. Connect to the machines.

$ connect

The shell will display the list of the machines, indicating whether they are connected or not. You can type show to see the list of machines.

3.c. Execute a command on the remote machines.

$ grep 123 ~/some-log-file.log

The shell will be 'pending' until all the remote machines return the grep output. Once all responses are received, the shell will display the output.

Commands

Shell commands

  1. show
    • Show the list of machines
  2. add {machine_id} {daemon_url}
    • Add a machine to the registry
  3. remove {machine_id}
    • Remove a machine from the registry
  4. connect
    • Connect to the machines
  5. disconnect
    • Disconnect from the machines
  6. help
    • Show the man page
  7. exit
    • Exit the shell

Remote commands

  1. grep {pattern} {file_path}
    • execute "grep" command on all the machines and retrieve the output
1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago