eiq-platform command line
The eiq-platform command line utility provides a set of command-line tools that enable carrying out administrative and maintenance tasks through the command line.
Before you run eiq-platform
The eiq-platform command line utility requires root-level, admin-level access.
To access the eiq-platform command line utility:
Log in to a Intelligence Center instance through SSH.
Obtain root-level access.
Launch the Intelligence Center Python virtual environment.
Export the Intelligence Center environment variables.
To do that, carry out the following steps:
Open a terminal session.
In the terminal, log in to the Intelligence Center through SSH:
# the Intelligence Center user name must have admin access rightsssh ${platform_user_name}@${platform_host_name}# Or:ssh ${platform_user_name}@${platform_ip_address}# Example:# Or:ssh eldon-tyrell@173.237.136.98Obtain root-level access by running sudo -i:
# Root-access login shellsudo-iTo access resources as a different user than the currently active one, append -u:
# Grant the currently logged in user root-level accesssudo-i# Grant root-level access to a different usersudo-i-u ${user_name}# Run a command as a different user, with root-level accesssudo-i-u ${user_name} ${command} ${options}Activate a Python virtual environment for the Intelligence Center:
source/opt/eclecticiq-platform-backend/bin/activate
For further details about each command, append --help to it to view the available switches for the specific command.
View the eiq-platform help
The eiq-platform command line utility includes a built-in help feature with details about the commands you can execute, and the arguments each command accepts.
Append -help to the eiq-platform to view the general help section covering the command areas.
Append -help to any eiq-platform ${command} to view contextual help about the specified command.
Append -help to any eiq-platform ${command} ${subcommand} to view contextual help about the options and arguments the specified command accepts.
Examples
View the he eiq-platform help
eiq-platform --helpUsage: eiq-platform [OPTIONS] COMMAND [ARGS]... Umbrella command for administrative tasks for the EclecticIQ Intelligence Center. All functionality is available as subcommands, e.g. eiq-platform database upgrade All commands provide a `--help` flag for compact usage information. Refer to the documentation for detailed instructions.Options: --help Show this message and exit.Commands: blob Blob related commands. create-fake-stix-packages This script generates fake STIX packages. database Database (PostgreSQL) related commands. diagnose Diagnostic commands. entity Entity related commands. extensions Extensions related commands. graph Graph (neo4j) related commands. ingestion Ingestion related commands. list-commands List all commands. observable Observable related commands. purge-incoming-feed Delete all data related to an incoming feed. run-script Execute a script. saml SAML related commands. search Search (Elasticsearch) related commands. shell Launch an interactive Python shell. stix STIX related commands. user User related commands.View the eiq-platform help for the user command
eiq-platform user --helpUsage: eiq-platform user [OPTIONS] COMMAND [ARGS]... User related commands.Options: --help Show this message and exit.Commands: create Create a new user. modify Modify existing user.View the eiq-platform help for the user modify command
eiq-platform user modify --helpUsage: eiq-platform user modify [OPTIONS] Modify existing user.Options: --name TEXT name (login) of user to modify --unlock unlock user --help Show this message and exit.