[Stack Monitoring] Switch cgroup memory fields to keyword#88260
[Stack Monitoring] Switch cgroup memory fields to keyword#88260matschaffer merged 2 commits intoelastic:masterfrom
Conversation
|
elastic/beats#32197 is open, considering this ready for review. |
| "bytes": { | ||
| "type": "long" | ||
| "ignore_above": 1024, | ||
| "type": "keyword" |
There was a problem hiding this comment.
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.
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.
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_aboveon 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
maxin the cgroup memory setting:I'll need that before I can advise on how to test this.