Remove a Logtail configuration from a machine group

Updated at:

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.

ParameterTypeRequiredExampleDescription
--projectStringYesaliyun-test-projectThe name of the project.
--configNameStringYesjson-log-configThe name of the Logtail configuration.
--machineGroupStringYescontainerThe 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 container
  • Response example

No response message is returned after the command runs successfully.