From 064186993443d51e9c7a02805a0dd9576940e775 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6nke=20Liebau?= Date: Tue, 11 Mar 2025 21:35:17 +0100 Subject: [PATCH 1/2] Add minimal vector stack to enable scraping logs from containers and outputting them to the vector pod's console in json format. This is in order to be able to scrape the logs with lnav from there and display them in a nice format. --- .../_templates/vector-aggregator-console.yaml | 25 +++++++++++++++++++ stacks/stacks-v2.yaml | 10 ++++++++ 2 files changed, 35 insertions(+) create mode 100644 stacks/_templates/vector-aggregator-console.yaml diff --git a/stacks/_templates/vector-aggregator-console.yaml b/stacks/_templates/vector-aggregator-console.yaml new file mode 100644 index 00000000..8b58e4b7 --- /dev/null +++ b/stacks/_templates/vector-aggregator-console.yaml @@ -0,0 +1,25 @@ +releaseName: vector-aggregator +name: vector +repo: + name: vector + url: https://helm.vector.dev +version: 0.34.0 +options: + commonLabels: + stackable.tech/vendor: Stackable + podLabels: # Doesn't seem to work? + stackable.tech/vendor: Stackable + role: Aggregator + customConfig: + sources: + vector: + address: 0.0.0.0:6000 + type: vector + version: "2" + sinks: + console: + type: console + encoding: + codec: json + inputs: + - vector \ No newline at end of file diff --git a/stacks/stacks-v2.yaml b/stacks/stacks-v2.yaml index 1c49ef88..70d00199 100644 --- a/stacks/stacks-v2.yaml +++ b/stacks/stacks-v2.yaml @@ -1,5 +1,15 @@ --- stacks: + dev-logging: + description: Vector aggregator with console output to allow scraping logs with lnav + stackableRelease: dev + stackableOperators: + labels: + - logging + - vector + manifests: + - helmChart: https://raw.githubusercontent.com/stackabletech/demos/main/stacks/_templates/vector-aggregator-console.yaml + - plainYaml: https://raw.githubusercontent.com/stackabletech/demos/main/stacks/_templates/vector-aggregator-discovery.yaml monitoring: description: Stack containing Prometheus and Grafana stackableRelease: dev From d9f5c54b52ab918b073804c9d417bdd959af9c93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6nke=20Liebau?= Date: Wed, 12 Mar 2025 14:26:38 +0100 Subject: [PATCH 2/2] Missing newline at end of file. --- stacks/_templates/vector-aggregator-console.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stacks/_templates/vector-aggregator-console.yaml b/stacks/_templates/vector-aggregator-console.yaml index 8b58e4b7..7679e166 100644 --- a/stacks/_templates/vector-aggregator-console.yaml +++ b/stacks/_templates/vector-aggregator-console.yaml @@ -22,4 +22,4 @@ options: encoding: codec: json inputs: - - vector \ No newline at end of file + - vector