Skip to content

Update monitoring-es-mb.json to correct datatype #126842

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

ash-darin
Copy link

This fixes #116766

Datatype for bytes should not be keyword but (unsigned_)long. Chose unsinged_long as there should be no negative amounts of bytes.

@elasticsearchmachine elasticsearchmachine added v9.1.0 external-contributor Pull request authored by a developer outside the Elasticsearch team labels Apr 15, 2025
@ash-darin ash-darin changed the title Update monitoring-es-mb.json Update monitoring-es-mb.json to correct datatype Apr 15, 2025
Add documentation file as per build enviromnent request
@ash-darin ash-darin marked this pull request as ready for review April 15, 2025 12:47
@ash-darin ash-darin requested a review from a team as a code owner April 15, 2025 12:47
@elasticsearchmachine elasticsearchmachine added the needs:triage Requires assignment of a team area label label Apr 15, 2025
@elasticsearchmachine elasticsearchmachine added the Team:Data Management Meta label for data/management team label Apr 15, 2025
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-data-management (Team:Data Management)

@elasticsearchmachine elasticsearchmachine removed the needs:triage Requires assignment of a team area label label Apr 15, 2025
@consulthys
Copy link
Contributor

consulthys commented Apr 15, 2025

Thanks for your contribution @ash-darin
Can you add to the description how this PR should be tested? We're especially interested in what happens when the monitoring data stream rolls over and the old index has keyword fields and the new one has unsigned_long. Does the Stack Monitoring UI keep working as expected? Are any alerting rules impacted?

@ash-darin
Copy link
Author

@consulthys Of course this breaks the dataview by creating a conflict but I see no way around it. This will stay broken till the old mappings rotate out.
To my knowledge these fields are not used in any dashboards but I can make no exhaustive search. As they are text fields, using them for any graphing or math would have been impossible anyway beyond simple display / reporting functions. The Stack monitoring UI for elasticsearch does not show memory usage based on cgroups. The dashboards of the elasticsearch integration do not show memory based on cgroups. This mismatch only showed up because I created custom dashboards, trying to make use of these values as these seem to be the only ones reflecting memory use of my cluster. I have to note that all other uses of byte values in the ECS are long. So them being keyword makes no sense to begin with. In comparison:

beat.stats.cgroup.memory.mem.usage.bytes

is of type long. The only reason these might be keyword is if long would not have been enough to store the number value but 2^63-1 bytes is about 9 Exabytes by my calculation, so that can't be it. Thinking about it now, making it unsigned is actually not necessary.

@consulthys
Copy link
Contributor

Thanks for the details @ash-darin
First of all, I totally agree that those fields being keywords is a bug. I'll try to get to the genesis of it and get back to you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Data Management/Monitoring external-contributor Pull request authored by a developer outside the Elasticsearch team Team:Data Management Meta label for data/management team Team:Stack Monitoring v9.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Wrong datatype for monitoring value
3 participants