EARLY RELEASE, SUBJECT TO CHANGE IN THE FUTURE.
alertlogic-cli is a Command Line Client for Alertlogic services.
- python 2.7+ (3.x not supported)
- requests library
The easiest way to install alertlogic-cli is using pip:
pip install alertlogic-cli
alertlogic-cli uses a config file: ~/.alertlogic/config
and a credentials file: ~/.alertlogic/credentials
They must be both ini style files where each section represents a profile.
Config profile can have these fields:
api_endpoint
: eitheruk
orus
(required)account_id
: only for managed accounts, uses this account instead of user's account (uuid) (optional)deployment_id
: default for deployment operations (uuid) (optional)
Credentials profile can have these fields:
username
: your alertlogic cloudinsight username (required)password
: your alertlogic cloudinsight password (required)
Example config:
[default]
api_endpoint = us
account_id = 123089
Example credentials:
[default]
username = [email protected]
password = ultr4s3cr3t
Alert Logic CLI currently supports the following commands and subcommands:
-
deployment
- groups the deployment related operationsOptions available:
--deployment_id ENVIRONMENT_ID
- to point on a customer deployment
Operations available:
-
set_deployment_mode
- changes deployment deployment mode between readonly or manualOptions available:
--mode {readonly,automatic}
- deployment mode neededExample:
$ alertlogic-cli deployment --deployment_id 00000000-0000-0000-0000-000000000000 set_deployment_mode --mode readonly
-
get_deployment_mode
- shows deployment deployment mode:Example:
$ alertlogic-cli deployment --deployment_id 00000000-0000-0000-0000-000000000000 get_deployment_mode
-
get_deployment_status
- gets deployment status for a given deploymentExample:
$ alertlogic-cli deployment --deployment_id 00000000-0000-0000-0000-000000000000 get_deployment_status
-
list_deployed_resources
- lists security infrastructure resources deployedExample:
$ alertlogic-cli deployment --deployment_id 00000000-0000-0000-0000-000000000000 list_deployed_resources
-
list_scan_queues
- lists hosts in scan queues for a given deploymentOptions available:
--vpc_key VPC_KEY
- filter hosts for a given VPCExample:
$ alertlogic-cli deployment --deployment_id 00000000-0000-0000-0000-000000000000 list_scan_queues
-
scan_host
- puts a host in the immediate scan queueOptions available:
--host_key HOST_KEY
- a host to put in the queueExample:
$ alertlogic-cli deployment --deployment_id 00000000-0000-0000-0000-000000000000 scan_host --host_key /aws/us-east-1/host/i-00000000000000000
For further information run alertlogic-cli --help
.