LogTailConfigArgs

data class LogTailConfigArgs(val inputDetail: Output<String>? = null, val inputType: Output<String>? = null, val logSample: Output<String>? = null, val logstore: Output<String>? = null, val name: Output<String>? = null, val outputType: Output<String>? = null, val project: Output<String>? = null) : ConvertibleToJava<LogTailConfigArgs>

The Logtail access service is a log collection agent provided by Log Service. You can use Logtail to collect logs from servers such as Alibaba Cloud Elastic Compute Service (ECS) instances in real time in the Log Service console. Refer to details(https://www.alibabacloud.com/help/doc-detail/29058.htm

  • )

Example Usage

Basic Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.random.RandomInteger;
import com.pulumi.random.RandomIntegerArgs;
import com.pulumi.alicloud.log.Project;
import com.pulumi.alicloud.log.ProjectArgs;
import com.pulumi.alicloud.log.Store;
import com.pulumi.alicloud.log.StoreArgs;
import com.pulumi.alicloud.log.LogTailConfig;
import com.pulumi.alicloud.log.LogTailConfigArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var default_ = new RandomInteger("default", RandomIntegerArgs.builder()
.max(99999)
.min(10000)
.build());
var exampleProject = new Project("exampleProject", ProjectArgs.builder()
.description("terraform-example")
.build());
var exampleStore = new Store("exampleStore", StoreArgs.builder()
.project(exampleProject.name())
.retentionPeriod(3650)
.shardCount(3)
.autoSplit(true)
.maxSplitShardCount(60)
.appendMeta(true)
.build());
var exampleLogTailConfig = new LogTailConfig("exampleLogTailConfig", LogTailConfigArgs.builder()
.project(exampleProject.name())
.logstore(exampleStore.name())
.inputType("file")
.outputType("LogService")
.inputDetail("""
{
"logPath": "/logPath",
"filePattern": "access.log",
"logType": "json_log",
"topicFormat": "default",
"discardUnmatch": false,
"enableRawLog": true,
"fileEncoding": "gbk",
"maxDepth": 10
}
""")
.build());
}
}

Module Support

You can use the existing sls-logtail module to create logtail config, machine group, install logtail on ECS instances and join instances into machine group one-click.

Import

Logtial config can be imported using the id, e.g.

$ pulumi import alicloud:log/logTailConfig:LogTailConfig example tf-log:tf-log-store:tf-log-config

Constructors

Link copied to clipboard
fun LogTailConfigArgs(inputDetail: Output<String>? = null, inputType: Output<String>? = null, logSample: Output<String>? = null, logstore: Output<String>? = null, name: Output<String>? = null, outputType: Output<String>? = null, project: Output<String>? = null)

Functions

Link copied to clipboard
open override fun toJava(): LogTailConfigArgs

Properties

Link copied to clipboard
val inputDetail: Output<String>? = null

The logtail configure the required JSON files. (Refer to details)

Link copied to clipboard
val inputType: Output<String>? = null

The input type. Currently only two types of files and plugin are supported.

Link copied to clipboard
val logSample: Output<String>? = null

(Optional)The log sample of the Logtail configuration. The log size cannot exceed 1,000 bytes.

Link copied to clipboard
val logstore: Output<String>? = null

The log store name to the query index belongs.

Link copied to clipboard
val name: Output<String>? = null

The Logtail configuration name, which is unique in the same project.

Link copied to clipboard
val outputType: Output<String>? = null

The output type. Currently, only LogService is supported.

Link copied to clipboard
val project: Output<String>? = null

The project name to the log store belongs.