Add hints based autodiscover part#2182
Conversation
Signed-off-by: ChrsMark <chrismarkou92@gmail.com>
|
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 <chrismarkou92@gmail.com>
|
@elastic/obs-cloudnative-monitoring could someone have a look into this one please? |
| ---- | ||
|
|
||
| [discrete] | ||
| == Autodiscover targeted Pods using hints (standalone mode) |
There was a problem hiding this comment.
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.
what hints system here means?
There was a problem hiding this comment.
Maybe hints mechanism instead of system.
| [float] | ||
| ===== `co.elastic.hints/username` | ||
|
|
||
| The username to use for authentication |
There was a problem hiding this comment.
username and password are required?
is it elasticsearch credentioals?
There was a problem hiding this comment.
I think these are integrations variables. If it is Redis for example , it should be Redis creds
There was a problem hiding this comment.
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.
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.
should it be 'container_logs input' or 'container_logs datastream of kubernetes package'?
There was a problem hiding this comment.
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.
should it be more generic and use node: ${NODE_NAME} ?
| ---- | ||
| providers: | ||
| kubernetes: | ||
| node: "kind-control-plane" |
There was a problem hiding this comment.
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.
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.
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.
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.
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.
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.
MichaelKatsoulis
left a comment
There was a problem hiding this comment.
LGTM. Just a few cosmetic comments.
Signed-off-by: ChrsMark <chrismarkou92@gmail.com>
Adds documentation part for elastic/elastic-agent#662