Skip to content

Conversation

@vadimalekseev
Copy link
Member

@vadimalekseev vadimalekseev commented Nov 13, 2025

Describe Your Changes

Fixes: #538

Checklist

The following checks are mandatory:

@vadimalekseev vadimalekseev force-pushed the k8s-collector branch 3 times, most recently from 9a03420 to faedb5b Compare November 14, 2025 07:41
Copy link
Contributor

@valyala valyala left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great overall!

@vadimalekseev , please document the added functionality in docs/victorialogs/vlagent.md, and mention it at docs/victorialogs/CHANGELOG.md.

@AndrewChubatiuk
Copy link
Contributor

maybe makes sense to move k8s client configuration from this PR and https://github.com/VictoriaMetrics/VictoriaMetrics/blob/1a68d4ac8a032dfa96cea8b984e17a3cb23f825d/lib/promscrape/discovery/kubernetes/kubeconfig.go to a separate package

@vadimalekseev vadimalekseev force-pushed the k8s-collector branch 3 times, most recently from 9c17ba6 to b44ea2d Compare November 16, 2025 18:39
@vadimalekseev
Copy link
Member Author

vadimalekseev commented Nov 16, 2025

Added documentation.

Please, do not merge this PR until we resolve this issue: #816, because it significantly affects memory usage when collecting pod logs. In my tests, vlagent uses up to 5x more memory because of the double buffering issue.

After this, I need to run final tests to compare the FDs, RAM, CPU usage of vlagent with promtail, Vector and Fluent Bit.

upd:
Fixed by implementing new LogMessageProcessor, see:

type logFileProcessor struct {

@vadimalekseev vadimalekseev force-pushed the k8s-collector branch 8 times, most recently from e704457 to 4d6b440 Compare November 17, 2025 13:59
@vadimalekseev vadimalekseev marked this pull request as draft November 18, 2025 10:35
@vadimalekseev vadimalekseev force-pushed the k8s-collector branch 3 times, most recently from 4fe8d5f to bedc0a7 Compare November 20, 2025 21:49
@vadimalekseev vadimalekseev force-pushed the k8s-collector branch 6 times, most recently from f9a9997 to 1c3b7b4 Compare December 1, 2025 11:36
@vadimalekseev vadimalekseev force-pushed the k8s-collector branch 4 times, most recently from 8757ae4 to fbc8332 Compare December 1, 2025 13:19
@vadimalekseev vadimalekseev marked this pull request as ready for review December 1, 2025 16:20
@vadimalekseev vadimalekseev requested a review from valyala December 1, 2025 16:21
@valyala valyala merged commit 2aa0ea1 into master Dec 5, 2025
6 checks passed
@valyala valyala deleted the k8s-collector branch December 5, 2025 17:57
@valyala
Copy link
Contributor

valyala commented Dec 5, 2025

@vadimalekseev , thank you for implementing discovery and collecting of logs in Kubernetes by vlagent!

valyala added a commit that referenced this pull request Dec 5, 2025
… for the Kubernetes log collector functionality implemented in vlagent at the commit 2aa0ea1

Updates #538
Updates #815
valyala added a commit that referenced this pull request Dec 5, 2025
…s logs via vlagent

This is a follow-up for the commit 2aa0ea1

Updates #815
Updates #538
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

vlagent: support log collection from Kubernetes

3 participants