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 only a single config file: ~/.alertlogic/config.ini
.
It must be an ini style file where each section represents a profile.
Each profile has 3 fields:
username
: your alertlogic's username (the one you use to login on alertlogic's web portal)password
: your alertlogic's password (same as above)datacenter
: eitheruk
orus
Example:
[default]
username = user@example.com
password = editme
datacenter = us
Alert Logic CLI currently supports the following commands and subcommands:
-
environment
- groups the environment related operationsOptions available:
--environment_id ENVIRONMENT_ID
- to point on a customer environment
Operations available:
-
set_deployment_mode
- changes environment deployment mode between readonly or manualOptions available:
--mode {readonly,automatic}
- deployment mode neededExample:
$ alertlogic-cli environment --environment_id 00000000-0000-0000-0000-000000000000 set_deployment_mode --mode readonly
-
get_deployment_mode
- shows environment deployment mode:Example:
$ alertlogic-cli environment --environment_id 00000000-0000-0000-0000-000000000000 get_deployment_mode
-
get_deployment_status
- gets deployment status for a given environmentExample:
$ alertlogic-cli environment --environment_id 00000000-0000-0000-0000-000000000000 get_deployment_status
-
list_deployed_resources
- lists security infrastructure resources deployedExample:
$ alertlogic-cli environment --environment_id 00000000-0000-0000-0000-000000000000 list_deployed_resources
-
list_scan_queues
- lists hosts in scan queues for a given environmentOptions available:
--vpc_key VPC_KEY
- filter hosts for a given VPCExample:
$ alertlogic-cli environment --environment_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 environment --environment_id 00000000-0000-0000-0000-000000000000 scan_host --host_key /aws/us-east-1/host/i-00000000000000000
For further information run alertlogic-cli --help
.