You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 2d28a68
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: website/content/en/docs/setup/quickstart.md
+11-12Lines changed: 11 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -64,10 +64,9 @@ mkdir vector-quickstart
64
64
cd vector-quickstart
65
65
```
66
66
67
-
Run all remaining commands from this directory. Copy and run the entire command below, including the final `YAML` line, to create`vector.yaml`:
67
+
Let's create a configuration file called`vector.yaml`:
68
68
69
-
```shell
70
-
cat > vector.yaml <<'YAML'
69
+
```yaml filename="vector.yaml"
71
70
sources:
72
71
in:
73
72
type: "stdin"
@@ -79,7 +78,6 @@ sinks:
79
78
type: "console"
80
79
encoding:
81
80
codec: "text"
82
-
YAML
83
81
```
84
82
85
83
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`.
@@ -90,7 +88,7 @@ The `inputs` option of the `sinks.out` component tells Vector where this sink's
90
88
91
89
## Hello world!
92
90
93
-
That's it for our first config. Now let's pipe an event through it. Choose the tab for your installation method:
91
+
That's it for our first config. Now let's pipe an event through it:
94
92
95
93
{{< tabs default="Local installation" >}}
96
94
{{< tab title="Local installation" >}}
@@ -119,16 +117,16 @@ The event we've just sent is received by our `sources.in` component, then sent o
119
117
120
118
```shell
121
119
... some logs ...
122
-
Hello world!
120
+
Hello World!
123
121
```
124
122
125
123
{{< info title="JSON encoding" >}}
126
-
To see the event as JSON, change `codec: "text"` to `codec: "json"`under `encoding`in the sink configuration and run the command again.
124
+
If you want to see something cool, try setting `encoding.codec = "json"` in the sink config.
127
125
{{< /info >}}
128
126
129
127
## Hello Syslog!
130
128
131
-
Next, let's collect and process generated Syslog events. Open the same `vector.yaml` file in your text editor, replace its entire contents with the following configuration, and save the file:
129
+
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:
132
130
133
131
```yaml filename="vector.yaml"
134
132
sources:
@@ -157,9 +155,9 @@ sinks:
157
155
158
156
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.
159
157
160
-
{{< info >}}
161
-
Generated logs let you try this pipeline without connecting to an external log source.
162
-
{{< /info >}}
158
+
{{< warning >}}
159
+
Wait, I thought you said "real" observability data? We choose generated data here because it's hard for us to know which platform you're trying Vector on. That means it's also hard to document a single way for everyone to get data into Vector.
160
+
{{< /warning >}}
163
161
164
162
The second component is a transform called [`remap`][remap]. The `remap` transform is at the heart of what makes Vector so powerful for processing observability data. The transform exposes a simple language called [Vector Remap Language][vrl] that allows you to parse, manipulate, and decorate your event data as it passes through Vector. Using `remap`, you can turn static events into informational
165
163
data that can help you ask and answer questions about your environment's state.
@@ -176,7 +174,7 @@ We support parsing a variety of logging formats. Of course, if you have an event
176
174
177
175
Lastly, we've updated the ID of our sink component to `emit_syslog`, updated the `inputs` option to process events generated by the `remap_syslog` transform, and specified that we want to emit events in JSON-format.
178
176
179
-
Let's re-run Vector from the same directory, choosing the tab for your installation method. This time we don't need to echo any data to it. It'll process
177
+
Let's re-run Vector. This time we don't need to echo any data to it; just run in on the command line. It'll process
180
178
100 lines of generated Syslog data, emit the processed data as JSON, and exit:
181
179
182
180
{{< tabs default="Local installation" >}}
@@ -212,6 +210,7 @@ We're just scratching the surface in this post. To get your hands dirty with Vec
212
210
213
211
* All of Vector's [sources][sources], [transforms][transforms], and [sinks][sinks].
214
212
* The [Vector Remap Language][vrl], the heart of data processing in Vector.
213
+
* More details on [component configuration][config] in Vector.
215
214
* Finally, [deploying Vector][deployment] to launch Vector in your production environment.
0 commit comments