[system][process] Add metric_type metadata for object fields, set stack restriction to 8.9.0 version#7660
Conversation
…8.9.0 version Signed-off-by: Tetiana Kravchenko <tetiana.kravchenko@elastic.co>
🌐 Coverage report
|
packages/system/changelog.yml
Outdated
| - version: "1.39.0" | ||
| changes: | ||
| - description: Add metric_type metadata for object fields, set stack restriction to 8.9.0 version | ||
| type: bugfix |
| description: > | ||
| The number of times that the memory limit (kmem_tcp.limit.bytes) was reached. | ||
|
|
||
| - name: stats.* |
There was a problem hiding this comment.
@tetianakravchenko, Any reason we are removing the mapping in multiple places for stats.* and we are only keeping the ones with stats.*.bytes
How will be the following field be mapped: system.process.cgroup.memory.stats.page_faults
Can we check the mapping of all the stats group under system.process ?
There was a problem hiding this comment.
@lalit-satapathy I am not sure why we initially had stats.* format.
all metrics that includes * in the name are included now in dynamic_templates:

How will be the following field be mapped: system.process.cgroup.memory.stats.page_faults
system.process.cgroup.memory.stats.page_faults is defined here -
integrations/packages/system/data_stream/process/fields/fields.yml
Lines 602 to 606 in 87e0e38
mapping for this field:
Can we check the mapping of all the stats group under system.process ?
Stats object mapping under `system.process.cgroup.memory`
"stats": {
"properties": {
"active_anon": {
"properties": {
"bytes": {
"type": "long",
"time_series_metric": "gauge"
}
}
},
"active_file": {
"properties": {
"bytes": {
"type": "long",
"time_series_metric": "gauge"
}
}
},
"anon": {
"properties": {
"bytes": {
"type": "long",
"time_series_metric": "gauge"
}
}
},
"anon_thp": {
"properties": {
"bytes": {
"type": "long",
"time_series_metric": "gauge"
}
}
},
"cache": {
"properties": {
"bytes": {
"type": "long",
"time_series_metric": "gauge"
}
}
},
"file": {
"properties": {
"bytes": {
"type": "long",
"time_series_metric": "gauge"
}
}
},
"file_dirty": {
"properties": {
"bytes": {
"type": "long",
"time_series_metric": "gauge"
}
}
},
"file_mapped": {
"properties": {
"bytes": {
"type": "long",
"time_series_metric": "gauge"
}
}
},
"file_thp": {
"properties": {
"bytes": {
"type": "long",
"time_series_metric": "gauge"
}
}
},
"file_writeback": {
"properties": {
"bytes": {
"type": "long",
"time_series_metric": "gauge"
}
}
},
"hierarchical_memory_limit": {
"properties": {
"bytes": {
"type": "long",
"time_series_metric": "gauge"
}
}
},
"hierarchical_memsw_limit": {
"properties": {
"bytes": {
"type": "long",
"time_series_metric": "gauge"
}
}
},
"htp_collapse_alloc": {
"type": "long"
},
"inactive_anon": {
"properties": {
"bytes": {
"type": "long",
"time_series_metric": "gauge"
}
}
},
"inactive_file": {
"properties": {
"bytes": {
"type": "long",
"time_series_metric": "gauge"
}
}
},
"kernel_stack": {
"properties": {
"bytes": {
"type": "long",
"time_series_metric": "gauge"
}
}
},
"major_page_faults": {
"type": "long",
"time_series_metric": "counter"
},
"mapped_file": {
"properties": {
"bytes": {
"type": "long",
"time_series_metric": "gauge"
}
}
},
"page_activate": {
"type": "long"
},
"page_deactivate": {
"type": "long"
},
"page_faults": {
"type": "long",
"time_series_metric": "counter"
},
"page_lazy_free": {
"type": "long"
},
"page_lazy_freed": {
"type": "long"
},
"page_refill": {
"type": "long"
},
"page_scan": {
"type": "long"
},
"page_steal": {
"type": "long"
},
"page_tables": {
"properties": {
"bytes": {
"type": "long",
"time_series_metric": "gauge"
}
}
},
"pages_in": {
"type": "long",
"time_series_metric": "counter"
},
"pages_out": {
"type": "long",
"time_series_metric": "counter"
},
"per_cpu": {
"properties": {
"bytes": {
"type": "long",
"time_series_metric": "gauge"
}
}
},
"rss": {
"properties": {
"bytes": {
"type": "long",
"time_series_metric": "gauge"
}
}
},
"rss_huge": {
"properties": {
"bytes": {
"type": "long",
"time_series_metric": "gauge"
}
}
},
"shmem": {
"properties": {
"bytes": {
"type": "long",
"time_series_metric": "gauge"
}
}
},
"shmem_thp": {
"properties": {
"bytes": {
"type": "long",
"time_series_metric": "gauge"
}
}
},
"slab": {
"properties": {
"bytes": {
"type": "long",
"time_series_metric": "gauge"
}
}
},
"slab_reclaimable": {
"properties": {
"bytes": {
"type": "long",
"time_series_metric": "gauge"
}
}
},
"slab_unreclaimable": {
"properties": {
"bytes": {
"type": "long",
"time_series_metric": "gauge"
}
}
},
"sock": {
"properties": {
"bytes": {
"type": "long",
"time_series_metric": "gauge"
}
}
},
"swap": {
"properties": {
"bytes": {
"type": "long",
"time_series_metric": "gauge"
}
}
},
"swap_cached": {
"properties": {
"bytes": {
"type": "long",
"time_series_metric": "gauge"
}
}
},
"thp_fault_alloc": {
"type": "long"
},
"unevictable": {
"properties": {
"bytes": {
"type": "long",
"time_series_metric": "gauge"
}
}
},
"workingset_activate_anon": {
"type": "long"
},
"workingset_activate_file": {
"type": "long"
},
"workingset_node_reclaim": {
"type": "long"
},
"workingset_refault_anon": {
"type": "long"
},
"workingset_refault_file": {
"type": "long"
},
"workingset_restore_anon": {
"type": "long"
},
"workingset_restore_file": {
"type": "long"
}
}
}
One thing I noticed that some fields are not defined in the fields folder and for this reason they are missing time_series_metric. I think it is fields that were added in this PR - elastic/beats#27242.
I think there should be another PR for adding missing fields, to not mix it up in this PR
There was a problem hiding this comment.
Hey @fearful-symmetry I see that this field was introduced in this PR - #1539 by you, could you please check if I am missing here something? I don't really understand why this was initially introduced, in addition to the stats.*.bytes - https://github.com/elastic/integrations/pull/1539/files#diff-c594e593105a59a8530cec1e0670442dbe7b2cc59074900a65b96e6b4f95352fR481-R483
It will be good, if we confirm that no fields are left un-mapped because we removed |
Signed-off-by: Tetiana Kravchenko <tetiana.kravchenko@elastic.co>
can you please explain how do you want me to confirm it? I've checked the latest system package version running in cloud (so without my changes): so fields On my local setup with the version that include changes in this PR: you can see that both mentioned fields are present as well - |
|
Package system - 1.40.0 containing this change is available at https://epr.elastic.co/search?package=system |


What does this PR do?
It is a follow up of this PR comment - #6493 (review)
to add all missing metric_type.
Checklist
changelog.ymlfile.Author's Checklist
How to test this PR locally
Related issues
Screenshots