Query applied Logtail configurations

Updated at:

Run a CLI command to query all Logtail configurations applied to a specified machine group.

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 and a machine group are created. For more information, see Create a project and Create a machine group.

Syntax

aliyun sls GetAppliedConfigs --project=<value> --machineGroup=<value>
Note

The get-applied-configs (kebab-case) command requires the aliyun-cli-sls plugin to be installed. The GetAppliedConfigs (PascalCase) command is a built-in command and requires no additional plugins.

Parameters

The following table describes the required and command-specific parameters.

ParameterTypeRequiredExampleDescription
--projectStringYesaliyun-test-projectThe name of the project.
--machineGroupStringYescontainerThe name of the machine group.

For information about global parameters, see Global parameters.

Command Example

  • Command example

    aliyun sls GetAppliedConfigs --project="aliyun-test-project" --machineGroup="container"
  • Return example

    {
      "configs": ["json-log-config", "access-log-config"],
      "count": 2
    }