-
Notifications
You must be signed in to change notification settings - Fork 25.1k
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
[Stack Monitoring] Switch cgroup memory fields to keyword #88260
[Stack Monitoring] Switch cgroup memory fields to keyword #88260
Conversation
elastic/beats#32197 is open, considering this ready for review. |
@@ -732,14 +732,16 @@ | |||
"usage": { | |||
"properties": { | |||
"bytes": { | |||
"type": "long" | |||
"ignore_above": 1024, | |||
"type": "keyword" |
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 means we won't be able to run metric aggregations on this field anymore, is that okay?
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.
Good question. I should at least check that we're not trying to graph it in stack monitoring. ES returns a string (potentially max
) so if we needed to keep it graphable I guess we could have metricbeat just drop the field if it's not a number.
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 don't see it in https://github.com/elastic/kibana/blob/b8c1323d5bdc921a6238003bc698bc03750c5320/x-pack/plugins/monitoring/server/lib/metrics/elasticsearch/metrics.ts
Additionally it's already keyword
in internal collection so I think we're safe here. Would it be nice to aggregate cgroup memory, perhaps. But I'd probably opt to tackle that as a new feature.
Pinging @elastic/es-data-management (Team:Data Management) |
Hi @matschaffer, I've created a changelog YAML for you. |
Guessing I can probably merge this but maybe someone from @elastic/es-data-management should weigh in too. Also maybe they have ideas on how to get ES producing the |
The change looks good to me. To weigh in on the cgroups question about why "max" appears as a value: The code that collects the cgroup memory values is just reading a single line from either the In cgroups v1, a value of Incidentally, the api that returns these values originally returned a string not because |
Ah, so |
Finally got the metricbeat suite to run against a docker image with this PR ( |
💚 Backport successful
|
* upstream/master: Pass IndexMetadata to AllocationDecider.can_remain (elastic#88453) [TSDB] Cache rollup bucket timestamp to reduce rounding cost (elastic#88420) Correct some typos/mistakes in comments/docs (elastic#88446) Make ClusterInfo use immutable maps in all cases (elastic#88447) Reduce map lookups (elastic#88418) Don't index geo_shape field in AbstractBuilderTestCase (elastic#88437) Remove usages of TestGeoShapeFieldMapperPlugin from enrich module (elastic#88440) Fix test memory leak (elastic#88362) Improve error when sorting on incompatible types (elastic#88399) Remove usages of BucketCollector#getLeafCollector(LeafReaderContext) (elastic#88414) Mute ReactiveStorageIT::testScaleWhileShrinking (elastic#88431) Clarify snapshot docs on archive indices (elastic#88417) [Stack Monitoring] Switch cgroup memory fields to keyword (elastic#88260) Fix RealmIdentifier XContent parser (elastic#88410) Make LoggedExec gradle task configuration cache compatible (elastic#87621) Update CorruptedFileIT so that it passes with new allocation strategy (elastic#88314) Update RareClusterStateIT to work with the new shards allocator (elastic#87922) Ensure CreateApiKey always creates a new document (elastic#88413) # Conflicts: # x-pack/plugin/rollup/src/main/java/org/elasticsearch/xpack/rollup/v2/RollupShardIndexer.java
Rel elastic/beats#31765
Per https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-nodes-stats.html they should be strings. The internal collection template (monitoring-es.json) has them as keywords without any
ignore_above
.This template uses
ignore_above
on all keywords, so keeping that convention for these mapping updates.Opening as draft since we won't want to merge this until there's a corresponding beats change in place to match.
Testing
So far I can't figure out how to get ES to respond with
max
in the cgroup memory setting:I'll need that before I can advise on how to test this.