-
Notifications
You must be signed in to change notification settings - Fork 152
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
Uplifting Kubernetes Standalone Manifest #2113
Conversation
This pull request does not have a backport label. Could you fix it @gizas? 🙏
NOTE: |
🌐 Coverage report
|
Some errors are generated when running the current standalone manifest {
"log.level": "error",
"@timestamp": "2023-01-17T10:00:07.412Z",
"log.origin": {
"file.name": "coordinator/coordinator.go",
"file.line": 833
},
"message": "Unit state changed beat/metrics-monitoring-metrics-monitoring-beats (CONFIGURING->FAILED): [output unit has no config]",
"component": {
"id": "beat/metrics-monitoring",
"state": "HEALTHY"
},
"unit": {
"id": "beat/metrics-monitoring-metrics-monitoring-beats",
"type": "input",
"state": "FAILED",
"old_state": "CONFIGURING"
},
"ecs.version": "1.6.0"
} There is already an issue open about the previous error at #2086 |
Another error {
"log.level": "error",
"@timestamp": "2023-01-17T09:59:53.950Z",
"message": "Error fetching data for metricset beat.stats: monitored beat is using Elasticsearch output but cluster UUID cannot be determined",
"component": {
"binary": "metricbeat",
"dataset": "elastic_agent.metricbeat",
"id": "beat/metrics-monitoring",
"type": "beat/metrics"
},
"ecs.version": "1.6.0",
"log.origin": {
"file.line": 256,
"file.name": "module/wrapper.go"
},
"service.name": "metricbeat",
"ecs.version": "1.6.0"
} Issue at elastic/beats#34217 |
and a warning {
"log.level": "warn",
"@timestamp": "2023-01-17T09:59:53.931Z",
"message": "error when check request status for getting IMDSv2 token: http request status 405. No token in the metadata request will be used.",
"component": {
"binary": "metricbeat",
"dataset": "elastic_agent.metricbeat",
"id": "beat/metrics-monitoring",
"type": "beat/metrics"
},
"log.logger": "add_cloud_metadata",
"log.origin": {
"file.line": 97,
"file.name": "add_cloud_metadata/provider_aws_ec2.go"
},
"service.name": "metricbeat",
"ecs.version": "1.6.0",
"ecs.version": "1.6.0"
} Issue at elastic/beats#33058 |
@@ -35,7 +35,7 @@ data: | |||
meta: | |||
package: | |||
name: kubernetes | |||
version: 1.9.0 | |||
version: 1.29.2 |
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.
Are we supposed to update this every time we have a new version of the integration?
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 would be great to know how you generated this manifest for next time
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.
For now I went to UI and created the standalone version of manifest from there. This included latest references for packages and manually I did the changes.
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.
Are we supposed to update this every time we have a new version of the integration?
Good one, I don think we can follow the system integration changes all the time. I think we should try to keep updating yes but still trying to figure out how can we constantly. Maybe periodically once per quarter? Or from now on if an important k8s integration is added to have it in mind?
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 that the standalone configuration only makes sense to follow the integration's changes in case the data_streams' inputs are changed. For example a new version of the integration that just changes some visualisations or the package wording has no impact to the standalone input. So maybe a best effort approach here would be fine, and integration maintainers/contributors should have in mind to update this manifest whenever the integration/package has an input-level change.
ecs.version: 1.12.0 | ||
- add_locale: null | ||
ignore_older: 72h | ||
- id: windows-event-log |
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.
Any background on this change?
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.
@elastic/elastic-agent-data-plane can you give us some more info about this change?
We updated our standalone manifests to include your last package version and we are in the progress of aligning the manifest that is auto-generated from kibana UI with what we have in github. So we removed the add_field
processor but we added the add_locale
that we found. Can you give us some more info? Is it needed?
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 `condition: '${host.platform} == ''windows''' will evaluate to false for every stream and prevent this from actually starting.
For Kubernetes you can omit this since Windows isn't supported. The policy generated by Fleet is universal for all operating systems.
Edit: Windows containers are are a thing now so this can stay: https://kubernetes.io/docs/concepts/windows/intro/
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 want to align this as closely as you can with the latest version of the system package generated by Fleet, as that is what is actually maintained.
I think there is a problem here where this is naturally going to drift out of sync with the latest version of the system package unless we either automate updates to it or do the manual work to sync it.
What do you actually want to have in these manifests? What is the goal? It seems like there would be less chance of regression if we only included a minimal configuration that is kept up to date.
Is it worth including only the Kubernetes integration here and omitting the system integration entirely?
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.
@cmacknz Sorry for not replying you before, Indeed on one hand we have the problem of syncing and on the other one we want to have it minimal especially no automation is implemented at the moment.
For the moment we agreed to keep the best effort and manually do the sync and also to keep system integration for now.
| Is it worth including only the Kubernetes integration here and omitting the system integration entirely?
This is something that might reconsider
FYI I get the same warning "error when check request status for getting IMDSv2 token" when elastic-agent is running in managed mode. I think it has to do with the fact that I am running on GCP and that error is complaining about AWS. So maybe we can ignore this warning since it is not specific to the standalone mode. |
metricsets: | ||
- process | ||
process.include_cpu_ticks: false | ||
system.hostfs: /hostfs |
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.
@elastic/elastic-agent-data-plane we also removed this. Is not needed in latest 1.20.4 version right?
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.
There were a collection of changes that made system.hostfs: /hostfs
unnecessary. @fearful-symmetry can confirm.
@@ -433,6 +447,7 @@ data: | |||
- data_stream: | |||
dataset: system.load | |||
type: metrics | |||
condition: '${host.platform} != ''windows''' |
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.
@elastic/elastic-agent-data-plane is this also correct? Why we exclude windows in system load?
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.
Likely the underlying Metricbeat doesn't implement collection of it.
We can also ignore it. It dissapears after connection |
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.
Changes lgtm!
I'm not familiar with the system
integration details though but since we use the latest version of the package itselft, we could consider it as valid?
@@ -35,7 +35,7 @@ data: | |||
meta: | |||
package: | |||
name: kubernetes | |||
version: 1.9.0 | |||
version: 1.29.2 |
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 that the standalone configuration only makes sense to follow the integration's changes in case the data_streams' inputs are changed. For example a new version of the integration that just changes some visualisations or the package wording has no impact to the standalone input. So maybe a best effort approach here would be fine, and integration maintainers/contributors should have in mind to update this manifest whenever the integration/package has an input-level change.
Cloudantive team hosts and is responsible to housekeep the standalone version of https://github.com/elastic/elastic-agent/blob/main/deploy/kubernetes/elastic-agent-standalone-kubernetes.yaml.
As part of this continuous effort we uplifted the Stanadlone Manifest in order to include latest changes for System and Kubernetes Integration
What does this PR do?
Uplifting versions of System Integration and Kubernetes Integration into our manifest. Releavant changes to conditions and missing datastreams added
Why is it important?
In order to keep standalone manifest consistent with latest changes of our integration pacakges.
Checklist
./changelog/fragments
using the changelog toolHow to test this PR locally