-
Notifications
You must be signed in to change notification settings - Fork 168
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
Add hints based autodiscover part #2182
Conversation
Signed-off-by: ChrsMark <[email protected]>
This pull request does not have a backport label. Could you fix it @ChrsMark? 🙏
|
A documentation preview will be available soon: |
Signed-off-by: ChrsMark <[email protected]>
@elastic/obs-cloudnative-monitoring could someone have a look into this one please? |
@@ -331,6 +331,81 @@ The policy generated by this configuration looks like: | |||
target: orchestrator | |||
---- | |||
|
|||
[discrete] | |||
== Autodiscover targeted Pods using hints (standalone mode) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe mention in the title that it is related to the Elastic Agent?
== Autodiscover targeted Pods using hints (standalone mode) | |
== Autodiscover targeted Pods using hints (Elastic Agent standalone mode) |
== Autodiscover targeted Pods using hints (standalone mode) | ||
|
||
Standalone Elastic Agent supports autodiscover based on hints from the provider. | ||
The hints system looks for hints in Kubernetes Pod annotations which have the prefix `co.elastic.hints`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what hints system
here means?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe hints mechanism instead of system.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍🏼
[float] | ||
===== `co.elastic.hints/username` | ||
|
||
The username to use for authentication |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
username and password are required?
is it elasticsearch credentioals?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think these are integrations variables. If it is Redis for example , it should be Redis creds
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, those are integration level settings. Keep in mind that most of them are taken directly from Beat's docs :) .
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it looks more like a required credentials, not as an configuration of specific integration 😕
but, yes, I found the beats doc - https://www.elastic.co/guide/en/beats/metricbeat/current/configuration-autodiscover-hints.html#_co_elastic_metricsusername
|
||
The stream to use for logs collection, ie stdout/stderr. | ||
|
||
In any case if the specified package has no logs support the generic `container_logs` input will be used as a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should it be 'container_logs
input' or 'container_logs
datastream of kubernetes package'?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's the a generic container logs input section, see https://github.com/elastic/elastic-agent/blob/main/deploy/kubernetes/elastic-agent-standalone/templates.d/prometheus.yml#L70-L90 as an example.
---- | ||
providers: | ||
kubernetes: | ||
node: "kind-control-plane" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should it be more generic and use node: ${NODE_NAME}
?
---- | ||
providers: | ||
kubernetes: | ||
node: "kind-control-plane" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should it be more generic : ${NODE_NAME} ?
Then ensure that the proper volumes and volumeMounts are added properly. These sections are already defined in the | ||
provided kubernetes manifest, so it's only required to uncomment these sections. | ||
|
||
In order to enable hints one need to add the `hints.enabled: true` in the provider's configuration, ie: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this section repeats line 271 - https://github.com/elastic/observability-docs/pull/2182/files#diff-b8738d619ef877c7cf3f0dce25b4c512396007f53eddc2d16fe82bfb1a4a1642R271
is it expected?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
something went wrong here! Thanks!
hints.enabled: true | ||
---- | ||
|
||
In order to enable hints one need to add the `hints.enabled: true` in the provider's configuration, ie: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this section repeats line 271 - https://github.com/elastic/observability-docs/pull/2182/files#diff-b8738d619ef877c7cf3f0dce25b4c512396007f53eddc2d16fe82bfb1a4a1642R271
here should be sentence about uncommenting volumes and volumeMounts
https://github.com/elastic/observability-docs/pull/2182/files#diff-b8738d619ef877c7cf3f0dce25b4c512396007f53eddc2d16fe82bfb1a4a1642R281-R282, no?
- -c | ||
- >- | ||
mkdir -p /etc/elastic-agent/inputs.d && | ||
wget -O - https://github.com/elastic/elastic-agent/archive/8.5.0.tar.gz | tar xz -C /etc/elastic-agent/inputs.d --strip=5 "elastic-agent-main/deploy/kubernetes/elastic-agent-standalone/templates.d" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The path is fixed for 8.5. Should this be updated in each stack release or should we have a placeholder here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right. We properly handle it in the official manifests, see https://github.com/elastic/elastic-agent/blob/main/deploy/kubernetes/elastic-agent-standalone/elastic-agent-standalone-daemonset.yaml#L37. Here since it's just docs' example it should be fine but I will make it to use the proper version dynamically like what we do in the curl
command in the very beginning of this guide.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Just a few cosmetic comments.
Signed-off-by: ChrsMark <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Adds documentation part for elastic/elastic-agent#662