From 0e76fe06ac8c0c0a63d2cf319a4fb3a807b1dec3 Mon Sep 17 00:00:00 2001 From: Pavlos Rontidis Date: Fri, 6 Oct 2023 14:25:24 -0400 Subject: [PATCH] chore(docs): update quickstart.md to use YAML (#18796) --- website/content/en/docs/setup/quickstart.md | 69 ++++++++++++--------- 1 file changed, 39 insertions(+), 30 deletions(-) diff --git a/website/content/en/docs/setup/quickstart.md b/website/content/en/docs/setup/quickstart.md index 8dc44300e272b..864b5bb527866 100644 --- a/website/content/en/docs/setup/quickstart.md +++ b/website/content/en/docs/setup/quickstart.md @@ -55,16 +55,20 @@ Vector topologies are defined using a [configuration file][config] that tells it * [Transforms] manipulate or change that observability data as it passes through your topology * [Sinks] send data onwards from Vector to external services or destinations -Let's create a configuration file called `vector.toml`: - -```toml filename="vector.toml" -[sources.in] -type = "stdin" - -[sinks.out] -inputs = ["in"] -type = "console" -encoding.codec = "text" +Let's create a configuration file called `vector.yaml`: + +```yaml filename="vector.yaml" +sources: + in: + type: "stdin" + +sinks: + out: + inputs: + - "in" + type: "console" + encoding: + codec: "text" ``` Each component has a unique id and is prefixed with the type of the component, for example `sources` for a source. Our first component, `sources.in`, uses the [`stdin` source][stdin], which tells Vector to receive data over stdin and is given the ID `in`. @@ -96,26 +100,31 @@ If you want to see something cool, try setting `encoding.codec = "json"` in the ## Hello Syslog! -Echoing events into the console isn't terribly exciting. Let's see what we can do with some real observability data by collecting and processing Syslog events. To do that, we'll add two new components to our configuration file. Here's our updated `vector.toml` configuration file: - -```toml filename="vector.toml" -[sources.generate_syslog] -type = "demo_logs" -format = "syslog" -count = 100 - -[transforms.remap_syslog] -inputs = [ "generate_syslog"] -type = "remap" -source = ''' - structured = parse_syslog!(.message) - . = merge(., structured) -''' - -[sinks.emit_syslog] -inputs = ["remap_syslog"] -type = "console" -encoding.codec = "json" +Echoing events into the console isn't terribly exciting. Let's see what we can do with some real observability data by collecting and processing Syslog events. To do that, we'll add two new components to our configuration file. Here's our updated `vector.yaml` configuration file: + +```yaml filename="vector.yaml" +sources: + generate_syslog: + type: "demo_logs" + format: "syslog" + count: 100 + +transforms: + remap_syslog: + inputs: + - "generate_syslog" + type: "remap" + source: | + structured = parse_syslog!(.message) + . = merge(., structured) + +sinks: + emit_syslog: + inputs: + - "remap_syslog" + type: "console" + encoding: + codec: "json" ``` The first component uses the [`demo_logs` source][demo_logs], which creates sample log data that enables you to simulate different types of events in various formats.