Remove a Logtail configuration from a machine group
Run a CLI command to remove a Logtail configuration from a machine group. After the configuration is removed, the servers in the machine group stop collecting logs as specified by the configuration.
Prerequisites
Before you run this command, make sure that the following prerequisites are met:
Simple Log Service (SLS) is activated. For more information, see Getting started with SLS.
The SLS CLI is installed and configured. For more information, see Install the CLI and Configure the CLI.
An SLS project, a Logtail configuration, and a machine group are created. For more information, see Create a project, Create a Logtail pipeline configuration, and Create a machine group.
Syntax
aliyun sls remove-config-from-machine-group --project=<value> --configName=<value> --machineGroup=<value>Parameters
The following table describes the required and command-specific parameters.
| Parameter | Type | Required | Example | Description |
|---|---|---|---|---|
| --project | String | Yes | aliyun-test-project | The name of the project. |
| --configName | String | Yes | json-log-config | The name of the Logtail configuration. |
| --machineGroup | String | Yes | container | The name of the machine group. |
For information about global parameters, see Global parameters.
Command examples
Command example
Remove the json-log-config configuration from the container machine group:
aliyun sls remove-config-from-machine-group --project="aliyun-test-project" \
--configName json-log-config \
--machineGroup containerResponse example
No response message is returned after the command runs successfully.