Simple Log Service provides the command-line interface (CLI) to meet the requirements for automated configurations in Simple Log Service.
Features
Simple Log Service CLI provides the following features:
Supports most RESTful API operations of Simple Log Service. For example, you can use the CLI to manage projects, Logstores, machine groups, consumer groups, and Logtail configurations.
Allows you to manage logs across multiple accounts and regions.
Allows you to query and pull logs.
Allows you to migrate data from Elasticsearch to Simple Log Service.
Supports flexible time configurations.
Allows you to replicate logs across regions at a high speed, reindex historical logs, and ship logs to data warehouses.
Commands
Simple Log Service CLI supports most features of Simple Log Service API. The following table describes the commonly used commands that are supported by Simple Log Service CLI.
Category | Command | Description |
Project management | Creates a project. | |
Deletes a project. | ||
Queries a specified project. | ||
Queries all projects. | ||
Replicates all Logstores, Logtail configurations, machine groups, and index configurations from a source project to a destination project. | ||
Logstore management | Creates a Logstore. | |
Deletes a Logstore. | ||
Queries a specified Logstore. | ||
Queries all Logstores. | ||
Updates a Logstore. | ||
Shard management | Queries shards. | |
Splits a shard. | ||
Merges shards. | ||
Machine group management | Creates a machine group. | |
Deletes a machine group. | ||
Updates a machine group. | ||
Queries a specified machine group. | ||
Queries all machine groups. | ||
Queries the servers in a specified machine group. | ||
Logtail configuration management | Creates a Logtail configuration. | |
Updates a Logtail configuration. | ||
Deletes a Logtail configuration. | ||
Queries a specified Logtail configuration. | ||
Queries all Logtail configurations. | ||
Mappings between machine groups and Logtail configurations | Applies a Logtail configuration to a machine group. | |
Removes a Logtail configuration from a machine group. | ||
Queries the Logtail configurations that are applied to a specified machine group. | ||
Queries the machine groups to which a Logtail configuration is applied. | ||
Index management | Creates indexes for a specified Logstore. | |
Deletes indexes from a specified Logstore. | ||
Updates the indexes of a Logstore. | ||
Queries the indexes of a Logstore. | ||
Cursor management | Queries a cursor based on a specified point in time. | |
Queries the server-side time based on a cursor. | ||
Queries the server-side time based on the previous cursor of a specified cursor. | ||
Queries a start cursor. | ||
Queries an end cursor. | ||
Log management | Queries logs. You can configure a query request by using a JSON file. This command is suitable for exact match scenarios. | |
Queries a specified number of logs. | ||
Queries a large number of logs. | ||
Queries the distribution of logs. | ||
Pulls logs. | ||
Pulls a large number of logs. | ||
Downloads a large number of logs to local files in a concurrent manner. | ||
Consumer group management | Creates a consumer group in a specified Logstore. | |
Deletes a consumer group. | ||
Updates a specified consumer group. | ||
Queries all consumer groups in a specified Logstore. | ||
Updates the checkpoint of a shard from which a specified consumer group consumes data. | ||
Queries the checkpoints of shards from which a specified consumer group consumes data. |
Cloud Shell
Cloud Shell is a web-based CLI tool. Simple Log Service CLI is built in to Cloud Shell. You can access Cloud Shell from a browser and manage the resources of Simple Log Service by using Simple Log Service CLI. For more information, see Use Cloud Shell.
References
For more information, see Simple Log Service CLI.