Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding generic_logs template for hints autodiscovery #304

Merged
merged 6 commits into from
Jul 6, 2023
Merged

Conversation

gizas
Copy link
Contributor

@gizas gizas commented Jul 3, 2023

Adding Documentation for generic_logs template for Elastic Agent Hints Autodiscovery scenario in order to collect logs from k8s pods

@gizas gizas requested a review from ChrsMark July 3, 2023 13:57
[discrete]
=== Hints autodiscovery for kubernetes log collection

The log collection for Kubernetes autodiscovered pods can be supported by using https://github.com/elastic/elastic-agent/tree/main/deploy/kubernetes/elastic-agent-standalone/templates.d/container_logs.yml[container_logs.yml template]. Users need to emit a caontainer_logs mapping so as to start collecting logs for all the discovered containers *even if no annotations are present in the containers*.
Copy link
Member

Choose a reason for hiding this comment

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

Users do not emit any mappings right? This sentence does not look correct.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

How about now?

enabled: true
----

Example to manually mount the needed container_logs template under the inputs.d folder of Elastic Agent
Copy link
Member

Choose a reason for hiding this comment

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

Why we need this extra mount? All templates are mounted automatically under /etc/elastic-agent/inputs.d if we uncomment the respective parts in the k8s manifests. So I see no need to specifically mount this one.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Well yes. I wanted to give an example of manual mount in order to make clear that the initcontainer is not needed.
Do you think shall I be more specific here? This is something that came out from the call form BY
So wanted to also provided such an example

What do you think? Shall I completely remove it?

Copy link
Member

Choose a reason for hiding this comment

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

I think that if we want an example with custom template's addition we should create a separate section for this and be specific there.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok removed mount info and updated the section a bit

gizas and others added 2 commits July 4, 2023 16:30
…overy/kubernetes-hints-autodiscover.asciidoc

Co-authored-by: Chris Mark <chrismarkou92@gmail.com>
…overy/kubernetes-hints-autodiscover.asciidoc

Co-authored-by: Chris Mark <chrismarkou92@gmail.com>
@ChrsMark
Copy link
Member

ChrsMark commented Jul 5, 2023

@gizas
Copy link
Contributor Author

gizas commented Jul 5, 2023

@ChrsMark nice idea: I have removed them in relevant PR: https://github.com/elastic/elastic-agent/pull/2986/files

@gizas gizas merged commit 4bea8be into main Jul 6, 2023
@gizas gizas deleted the generic_logs_hints branch July 6, 2023 08:26
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.

2 participants