From 4dfe3a3367ea3dff24303af7471e7bb15ad49514 Mon Sep 17 00:00:00 2001
From: foroogh shahab
Date: Sun, 18 Aug 2024 15:48:12 +0200
Subject: [PATCH 1/2] Documentation is added.
---
docs/_docs/cli.md | 236 ++++++++++++++++++++++++++++------------------
1 file changed, 143 insertions(+), 93 deletions(-)
diff --git a/docs/_docs/cli.md b/docs/_docs/cli.md
index 7320b9b1f..2af609034 100644
--- a/docs/_docs/cli.md
+++ b/docs/_docs/cli.md
@@ -32,55 +32,67 @@ Listing 4: The command "csle ls emulations --all" (line 1) and the output genera
CSLE CLI (lines 2-14).
-| *Command* | *Description* |
-|----------------------------------------------|--------------------------------------------------------|
-| `csle attacker ` | Opens an attacker shell in a given execution. |
-| `csle clean all` | Removes all containers, networks, emulations, etc. |
-| `csle clean containers` | Removes all Docker containers in a given execution. |
-| `csle clean emulations` | Removes all emulations in a given execution. |
-| `csle clean emulation_traces` | Removes all emulation traces in a given execution. |
-| `csle clean simulation_traces` | Removes all simulation traces in a given execution. |
-| `csle clean emulation_statistics` | Removes all emulation statistics in a given execution. |
-| `csle clean emulation_executions` | Removes all emulation executions in a given execution. |
-| `csle em ` | Get status of a given emulation. |
-| `csle em --host` | Get status of host managers in a given emulation. |
-| `csle em --stats` | Get status of stats managers in a given emulation. |
-| `csle em --kafka` | Get status of kafka managers in a given emulation. |
-| `csle em --snortids` | Get status of snortids in a given emulation. |
-| `csle em --clients` | Get status of clients in a given emulation. |
-| `csle em --executions` | Get status of executions in a given emulation. |
-| `csle em --executions` | Get status of executions in a given emulation. |
-| `csle init` | Initializes CSLE and sets up management accounts. |
-| `csle install emulations` | Install emulation environments. |
-| `csle install simulations` | Install simulation environments. |
-| `csle install ` | Install a given emulation. |
-| `csle install ` | Install a given simulation. |
-| `csle install derived images` | Install derived Docker images. |
-| `csle install base images` | Install base Docker images. |
-| `csle install metastore` | Install the metastore. |
-| `csle install all` | Install everything. |
-| `csle ls all` | List all information about entities. |
-| `csle ls containers` | List all containers. |
-| `csle ls networks` | List all networks. |
-| `csle ls images` | List all Docker images. |
-| `csle ls emulations` | List all emulations. |
-| `csle ls environments` | List all environments. |
-| `csle ls prometheus` | List status of Prometheus. |
-| `csle ls node_exporter` | List status of node exporter. |
-| `csle ls cadvisor` | List status of cadvisor. |
-| `csle ls statsmanager` | List status of statsmanager. |
-| `csle ls managementsystem` | List status of management system. |
-| `csle ls simulations` | List status of simulations. |
-| `csle ls emulation_executions` | List status of emulation executions. |
-| `csle ls --all` | List extended information of the given entity. |
-| `csle ls --running` | Only list information about running entities. |
-| `csle ls --stopped` | Only list information about stopped entities. |
-| `csle rm ` | Removes the network with the given name. |
-| `csle rm ` | Removes the container with the given name. |
-| `csle rm ` | Removes the Docker image with the given name. |
-| `csle rm networks` | Removes all networks. |
-| `csle rm images` | Removes all images. |
-| `csle rm containers` | Removes all containers. |
+| *Command* | *Description* |
+|-----------------------------------------------------------------------|--------------------------------------------------------|
+| `csle attacker ` | Opens an attacker shell in a given execution. |
+| `csle clean all` | Removes all containers, networks, emulations, etc. |
+| `csle clean containers` | Removes all Docker containers in a given execution. |
+| `csle clean emulations` | Removes all emulations in a given execution. |
+| `csle clean emulation_traces` | Removes all emulation traces in a given execution. |
+| `csle clean simulation_traces` | Removes all simulation traces in a given execution. |
+| `csle clean emulation_statistics` | Removes all emulation statistics in a given execution. |
+| `csle clean emulation_executions` | Removes all emulation executions in a given execution. |
+| `csle em ` | Get status of a given emulation. |
+| `csle em --host` | Get status of host managers in a given emulation. |
+| `csle em --stats` | Get status of stats managers in a given emulation. |
+| `csle em --kafka` | Get status of kafka managers in a given emulation. |
+| `csle em --snortids` | Get status of snortids in a given emulation. |
+| `csle em --clients` | Get status of clients in a given emulation. |
+| `csle em --executions` | Get status of executions in a given emulation. |
+| `csle em --executions` | Get status of executions in a given emulation. |
+| `csle init` | Initializes CSLE and sets up management accounts. |
+| `csle install emulations` | Install emulation environments. |
+| `csle install simulations` | Install simulation environments. |
+| `csle install ` | Install a given emulation. |
+| `csle install ` | Install a given simulation. |
+| `csle install derived images` | Install derived Docker images. |
+| `csle install base images` | Install base Docker images. |
+| `csle install metastore` | Install the metastore. |
+| `csle install all` | Install everything. |
+| `csle ls all` | List all information about entities. |
+| `csle ls containers` | List all containers. |
+| `csle ls networks` | List all networks. |
+| `csle ls images` | List all Docker images. |
+| `csle ls emulations` | List all emulations. |
+| `csle ls environments` | List all environments. |
+| `csle ls prometheus` | List status of Prometheus. |
+| `csle ls node_exporter` | List status of node exporter. |
+| `csle ls cadvisor` | List status of cadvisor. |
+| `csle ls statsmanager` | List status of statsmanager. |
+| `csle ls managementsystem` | List status of management system. |
+| `csle ls simulations` | List status of simulations. |
+| `csle ls emulation_executions` | List status of emulation executions. |
+| `csle ls --all` | List extended information of the given entity. |
+| `csle ls --running` | Only list information about running entities. |
+| `csle ls --stopped` | Only list information about stopped entities. |
+| `csle ls hostmanagers --id --ip ` | Lists host managers on the specified ip sever. |
+| `csle ls clientmanager --id --ip ` | Lists the client manager on the specified ip sever. |
+| `csle ls snortmanagers --id --ip ` | Lists snort managers on the specified ip sever. |
+| `csle ls elkmanager --id --ip ` | Lists the Elk manager on the specified ip sever. |
+| `csle ls trafficmanagers --id --ip ` | Lists traffic managers on the specified ip sever. |
+| `csle ls kafkamanager --id --ip ` | Lists the Kafka manager on the specified ip sever. |
+| `csle ls ossecmanagers --id --ip ` | Lists Ossec managers on the specified ip sever. |
+| `csle ls ryumanager --id --ip ` | Lists the Ryu manager on the specified ip sever. |
+| `csle ls filebeats --id --ip ` | Lists filebeats on the specified ip sever. |
+| `csle ls metricbeats --id --ip ` | Lists metricbeats on the specified ip sever. |
+| `csle ls heartbeats --id --ip ` | Lists heartbeats on the specified ip sever. |
+| `csle ls packetbeats --id --ip ` | Lists packetbeats on the specified ip sever. |
+| `csle rm ` | Removes the network with the given name. |
+| `csle rm ` | Removes the container with the given name. |
+| `csle rm ` | Removes the Docker image with the given name. |
+| `csle rm networks` | Removes all networks. |
+| `csle rm images` | Removes all images. |
+| `csle rm containers` | Removes all containers. |
@@ -88,51 +100,89 @@ Table 24: Commands available in the CSLE command-line interface (1/2).
-| *Command* | *Description* |
-|-------------------------------------------------------------------|----------------------------------------------------------------|
-| `csle shell ` | Opens shell in a given container. |
-| `csle start prometheus ` | Starts prometheus. |
-| `csle start node_exporter ` | Starts node exporter. |
-| `csle start grafana ` | Starts grafana. |
-| `csle start cadvisor ` | Starts cadvisor. |
-| `csle start managementsystem ` | Starts the management system. |
-| `csle start ` | Starts the given container. |
-| `csle start ` | Starts the given emulation. |
-| `csle start --no_network` | Starts the given emulation without virtual networks. |
-| `csle start --no_traffic` | Starts the given emulation without traffic generators. |
-| `csle start --no_beats` | Starts the given emulation without configuring/starting beats. |
-| `csle start --no_clients` | Starts the given emulation without clients. |
-| `csle start --id` | Starts the given emulation with execution id. |
-| `csle start all ` | Starts everything. |
-| `csle start all --id ` | Starts everything in an execution. |
+| *Command* | *Description* |
+|------------------------------------------------------------------|----------------------------------------------------------------|
+| `csle shell ` | Opens shell in a given container. |
+| `csle start prometheus ` | Starts prometheus. |
+| `csle start node_exporter ` | Starts node exporter. |
+| `csle start grafana ` | Starts grafana. |
+| `csle start cadvisor ` | Starts cadvisor. |
+| `csle start managementsystem ` | Starts the management system. |
+| `csle start ` | Starts the given container. |
+| `csle start ` | Starts the given emulation. |
+| `csle start --no_network` | Starts the given emulation without virtual networks. |
+| `csle start --no_traffic` | Starts the given emulation without traffic generators. |
+| `csle start --no_beats` | Starts the given emulation without configuring/starting beats. |
+| `csle start --no_clients` | Starts the given emulation without clients. |
+| `csle start --id` | Starts the given emulation with execution id. |
+| `csle start all ` | Starts everything. |
+| `csle start all --id ` | Starts everything in an execution. |
| `csle start statsmanager ` | Starts statsmanager. |
-| `csle start ` | Starts trainingjob with a given id. |
-| `csle start ` | Starts system identification job with a given id. |
-| `csle start ` | Starts a container with a given image and name. |
-| `csle start_traffic ` | Starts the traffic and clients in execution. |
-| `csle statsmanager ` | Starts the statsmanager. |
-| `csle stop ` | Stops the emulation execution. |
-| `csle stop ` | Stops prometheus. |
-| `csle stop ` | Stops cadvisor. |
-| `csle stop ` | Stops grafana. |
-| `csle stop ` | Stops the management system. |
-| `csle stop ` | Stops the container. |
-| `csle stop ` | Stops the statsmanager. |
-| `csle stop emulation_executions ` | Stops all emulation executions. |
-| `csle stop all ` | Stops everything that runs. |
-| `csle stop_traffic ` | Stops client population and traffic in execution. |
-| `csle systemidentificationjob ` | Starts job. |
-| `csle trainingjob ` | Starts job. |
-| `csle datacollectionjob ` | Starts job. |
-| `csle uninstall emulations` | Uninstalls emulation environments. |
-| `csle uninstall simulations` | Uninstalls simulation environments. |
-| `csle uninstall ` | Uninstalls emulation. |
-| `csle uninstall ` | Uninstalls simulation. |
-| `csle uninstall derived_images` | Uninstalls derived images. |
-| `csle uninstall base_images` | Uninstalls base images. |
-| `csle uninstall metastore` | Uninstalls metastore. |
-| `csle uninstall all` | Uninstalls everything. |
-| `csle help` | Lists all available commands |
+| `csle start ` | Starts trainingjob with a given id. |
+| `csle start ` | Starts system identification job with a given id. |
+| `csle start ` | Starts a container with a given image and name. |
+| `csle start_traffic ` | Starts the traffic and clients in execution. |
+| `csle statsmanager ` | Starts the statsmanager. |
+| `csle start hostmanagers --id --ip ` | Starts host managers on the specified ip sever. |
+| `csle start hostmanager --id --ip --container_ip ` | Starts a host manager on the specified container. |
+| `csle start clientmanager --id --ip ` | Starts a client managers on the specified ip sever. |
+| `csle start snortmanagers --id --ip ` | Starts snort managers on the specified ip sever. |
+| `csle start snort manager --id --ip --container_ip ` | Starts a snort manager on the specified container. |
+| `csle start elkmanager --id --ip ` | Starts an Elk managers on the specified ip sever. |
+| `csle start traffic managers --id --ip ` | Starts traffic managers on the specified ip sever. |
+| `csle start trafficmanager --id --ip --container_ip ` | Starts a traffic manager on the specified container. |
+| `csle start ossecmanagers --id --ip ` | Starts Ossec managers on the specified ip sever. |
+| `csle start ossecmanager --id --ip --container_ip ` | Starts an Ossec manager on the specified container. |
+| `csle start ryumanager --id --ip ` | Starts a Ryu managers on the specified ip sever. |
+| `csle start filebeats --id --ip ` | Starts filebeats on the specified ip sever. |
+| `csle start filebeat --id --ip --container_ip ` | Starts the filebeat on the specified container. |
+| `csle start metricbeats --id --ip ` | Starts metricbeats on the specified ip sever. |
+| `csle start metricbeat --id --ip --container_ip ` | Starts the metricbeat on the specified container. |
+| `csle start heartbeats --id --ip ` | Starts heartbeats on the specified ip sever. |
+| `csle start heartbeat --id --ip --container_ip ` | Starts the heartbeat on the specified container. |
+| `csle start packetbeats --id --ip ` | Starts packetbeats on the specified ip sever. |
+| `csle start packetbeat --id --ip --container_ip ` | Starts the packetbeat on the specified container. |
+| `csle stop ` | Stops the emulation execution. |
+| `csle stop ` | Stops prometheus. |
+| `csle stop ` | Stops cadvisor. |
+| `csle stop ` | Stops grafana. |
+| `csle stop ` | Stops the management system. |
+| `csle stop ` | Stops the container. |
+| `csle stop ` | Stops the statsmanager. |
+| `csle stop emulation_executions ` | Stops all emulation executions. |
+| `csle stop all ` | Stops everything that runs. |
+| `csle stop_traffic ` | Stops client population and traffic in execution. |
+| `csle stop hostmanagers --ip ` | Stops host managers on the specified ip sever. |
+| `csle stop hostmanager --ip --container_ip ` | Stops a host manager on the specified container. |
+| `csle stop clientmanager --ip ` | Stops a client managers on the specified ip sever. |
+| `csle stop snortmanagers --ip ` | Stops snort managers on the specified ip sever. |
+| `csle stop snort manager --ip --container_ip ` | Stops a snort manager on the specified container. |
+| `csle stop elkmanager --ip ` | Stops an Elk managers on the specified ip sever. |
+| `csle stop traffic managers --ip ` | Stops traffic managers on the specified ip sever. |
+| `csle stop trafficmanager --ip --container_ip ` | Stops a traffic manager on the specified container. |
+| `csle stop ossecmanagers --ip ` | Stops Ossec managers on the specified ip sever. |
+| `csle stop ossecmanager --ip --container_ip ` | Stops an Ossec manager on the specified container. |
+| `csle stop ryumanager --ip ` | Stops a Ryu managers on the specified ip sever. |
+| `csle stop filebeats