File tree Expand file tree Collapse file tree 4 files changed +80
-1
lines changed Expand file tree Collapse file tree 4 files changed +80
-1
lines changed Original file line number Diff line number Diff line change @@ -33,4 +33,4 @@ codec = "json"
3333timestamp_format = " rfc3339"
3434
3535[sinks .datadog .healthcheck ]
36- enabled = true
36+ enabled = true
Original file line number Diff line number Diff line change 1+ # Send Vector logs and metrics to Datadog
2+
3+ In this demo, Vector is running a simple topology in which the ` generator ` source emits random JSON
4+ logs twice per second and sends those logs off to stdout via the ` console ` sink. But even this
5+ simple pipeline is enough to generate internal logs and metrics for Vector (via the eponymous
6+ sources).
7+
8+ To run this scenario, make sure you have the ` DD_API_KEY ` environment variable set to your Datadog
9+ API key and then run:
10+
11+ ``` bash
12+ docker compose up --detach
13+ ```
14+
15+ Once Vector is up and running, check out the [ Logs exporer] [ logs ] and this simple
16+ [ Metrics dashboard] [ metrics ] .
17+
18+ [ logs ] : https://app.datadoghq.com/logs?query=%40tag%3Avector_internal
19+ [ metrics ] : https://app.datadoghq.com/metric/explorer?live=true&tile_size=m&exp_metric=vector.events_in_total&exp_agg=avg&exp_row_type=metric
Original file line number Diff line number Diff line change 1+ version : ' 3.9'
2+ services :
3+ vector :
4+ image : timberio/vector:0.16.1-alpine
5+ ports :
6+ - 8686:8686
7+ environment :
8+ - DD_API_KEY
9+ - LOG=info
10+ volumes :
11+ - ./vector:/etc/vector:ro
Original file line number Diff line number Diff line change 1+ [api ]
2+ enabled = true
3+ address = " 0.0.0.0:8686"
4+ playground = true
5+
6+ [sources .generator ]
7+ type = " generator"
8+ format = " json"
9+ interval = 0.5
10+
11+ [sinks .stdout ]
12+ type = " console"
13+ inputs = [" generator" ]
14+ target = " stdout"
15+
16+ [sinks .stdout .encoding ]
17+ codec = " json"
18+
19+ [sources .vector_logs ]
20+ type = " internal_logs"
21+
22+ [sources .vector_metrics ]
23+ type = " internal_metrics"
24+
25+ [transforms .tag_vector_logs ]
26+ type = " remap"
27+ inputs = [" vector_logs" ]
28+ source = '''
29+ .tag = "vector_internal"
30+ '''
31+
32+ [sinks .datadog_logs ]
33+ type = " datadog_logs"
34+ inputs = [" tag_vector_logs" ]
35+ default_api_key = " ${DD_API_KEY}"
36+
37+ [sinks .datadog_logs .healthcheck ]
38+ enabled = true
39+
40+ [sinks .datadog_logs .encoding ]
41+ codec = " json"
42+
43+ [sinks .datadog_metrics ]
44+ type = " datadog_metrics"
45+ inputs = [" vector_metrics" ]
46+ api_key = " ${DD_API_KEY}"
47+
48+ [sinks .datadog_metrics .healthcheck ]
49+ enabled = true
You can’t perform that action at this time.
0 commit comments