Skip to content

Commit a5f94a1

Browse files
committed
migrate to VictoriaLogs
1 parent 4c0f4d1 commit a5f94a1

File tree

3 files changed

+69
-25
lines changed

3 files changed

+69
-25
lines changed

docker-compose.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,13 @@ services:
2727
max-size: "10m"
2828
max-file: "3"
2929

30-
# filebeat:
31-
# image: docker.elastic.co/beats/filebeat:8.17.3
30+
# vector:
31+
# image: timberio/vector:0.46.0-debian
3232
# user: root
3333
# environment:
34-
# ELASTICSEARCH_HOSTS: ${ELASTICSEARCH_HOSTS}
35-
# ELASTICSEARCH_USERNAME: elastic
36-
# ELASTICSEARCH_PASSWORD: ${ELASTICSEARCH_PASSWORD}
34+
# VLOGS_URI: ${VLOGS_URI}
3735
# volumes:
38-
# - ./filebeat.yml:/usr/share/filebeat/filebeat.yml
36+
# - ./vector.yaml:/etc/vector/vector.yaml
3937
# - /var/lib/docker/containers:/var/lib/docker/containers:ro
4038
# - /var/run/docker.sock:/var/run/docker.sock
4139
# depends_on:

filebeat.yml

Lines changed: 0 additions & 19 deletions
This file was deleted.

vector.yaml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# __ __ __
2+
# \ \ / / / /
3+
# \ V / / /
4+
# \_/ \/
5+
#
6+
# V E C T O R
7+
# Configuration
8+
#
9+
# ------------------------------------------------------------------------------
10+
# Website: https://vector.dev
11+
# Docs: https://vector.dev/docs
12+
# Chat: https://chat.vector.dev
13+
# ------------------------------------------------------------------------------
14+
15+
# Change this to use a non-default directory for Vector data storage:
16+
# data_dir: "/var/lib/vector"
17+
18+
# Random Syslog-formatted logs
19+
sources:
20+
docker_logs:
21+
type: "docker_logs"
22+
23+
# See the Vector Remap Language reference for more info: https://vrl.dev
24+
transforms:
25+
parse_docker:
26+
type: remap
27+
inputs: ["docker_logs"]
28+
source: |
29+
.message = parse_json(.message) ?? .message
30+
31+
# Print parsed logs to stdout
32+
sinks:
33+
# print:
34+
# type: "console"
35+
# inputs: ["parse_docker"]
36+
# encoding:
37+
# codec: "json"
38+
# json:
39+
# pretty: true
40+
41+
vlogs:
42+
type: http
43+
inputs:
44+
- parse_docker
45+
uri: ${VLOGS_URI}
46+
encoding:
47+
codec: json
48+
framing:
49+
method: newline_delimited
50+
compression: gzip
51+
healthcheck:
52+
enabled: false
53+
request:
54+
headers:
55+
AccountID: "0"
56+
ProjectID: "0"
57+
VL-Stream-Fields: container_name
58+
VL-Msg-Field: message.RequestPath
59+
VL-Time-Field: timestamp
60+
# Vector's GraphQL API (disabled by default)
61+
# Uncomment to try it out with the `vector top` command or
62+
# in your browser at http://localhost:8686
63+
# api:
64+
# enabled: true
65+
# address: "127.0.0.1:8686"

0 commit comments

Comments
 (0)