-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
fix logstash cgroup mapping #33131
fix logstash cgroup mapping #33131
Conversation
This pull request does not have a backport label.
To fixup this pull request, you need to add the backport labels for the needed
|
- docs/fields.asciidoc - module/logstash/fields.go
/test |
Thanks for digging into this @rpasche - I'll see if I can first find a v1 cgroups setup I can use to test this directly. If not I'll have to build a container that includes elastic/logstash#14537. The mappings for these indices live in https://github.com/elastic/elasticsearch/blob/main/x-pack/plugin/core/src/main/resources/monitoring-logstash.json (for logstash internal collection) and https://github.com/elastic/elasticsearch/blob/main/x-pack/plugin/core/src/main/resources/monitoring-logstash-mb.json (for metricbeat collection). |
Update: I found a cgroup v1 setup I can use and got basic reporting via logstash & metricbeat going. Seeing if I can get the ES templates updated. I'll open a master issue to track the stack monitoring bug (separate from the lack of cgroup v2 support on logtash). |
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 works for me. It wasn't clear to me what was causing the github actions to fail, but I've updated the branch. If it passes, I'll merge it.
I'll keep the issue open until both this and the corresponding mapping change in ES are done.
Thanks for the contribution! 🧡
Guessing it's the lint checks making it looks like I need to |
* fix logstash cgroup mapping * ran make update and added changed files - docs/fields.asciidoc - module/logstash/fields.go * Add changelog entry * lint Co-authored-by: Mat Schaffer <[email protected]> (cherry picked from commit 543e1f2)
* fix logstash cgroup mapping * ran make update and added changed files - docs/fields.asciidoc - module/logstash/fields.go * Add changelog entry * lint Co-authored-by: Mat Schaffer <[email protected]> (cherry picked from commit 543e1f2) Co-authored-by: Robert Paschedag <[email protected]>
* fix logstash cgroup mapping * ran make update and added changed files - docs/fields.asciidoc - module/logstash/fields.go * Add changelog entry * lint Co-authored-by: Mat Schaffer <[email protected]>
Related to elastic/kibana#142179
What does this PR do?
It fixes the the mapping of
.monitoring-logstash-8-mb
, so that Stack Monitoring for Logstash is working again.I noticed, that the mapping of
logstash
is broken. Thealiases
of thecgroup
object are allocated on the wronglevel
.Today, the aliases is located at
logstash_stats.os.cpu.stat
, but it should be located atlogstash_stats.os.cgroup.cpu.stat
. So that thepath
of the alias are again matching.Additionally, the metric for
cfs_quota_micros
was not fetched by thenode_stats
oflogstash
. But this metric is also used withih Kibana to calculate another metric. (see example at https://github.com/elastic/kibana/blob/main/x-pack/plugins/monitoring/server/lib/metrics/logstash/metrics.ts#L265 and https://github.com/elastic/kibana/blob/main/x-pack/plugins/monitoring/server/lib/metrics/logstash/metrics.ts#L355)Why is it important?
It is needed to fix Stack Monitoring to show correct graphs again.
Checklist
No "code" checks have been done. My only "code" change I used was to add the
cfs_quota_micros
within thenode_stats/data.go
file (to unmarshal that field from JSON object). The changes to themapping
have only been done by me - so far - manually directly within a dev cluster (within the.monitoring-logstash-8-mb
index template. (see screenshots below)Sorry... nothing from below.
CHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.Author's Checklist
How to test this PR locally
Related issues
Issues and PR from within Logstash
Use cases
Screenshots
new field cfs_quota_micros added
aliases moved (here, only the new added)
Results in Stack Monitoring (tested in 8.4.1)
CPU Utilization shown again
CGroup stats showing real values (and not
N/A
)Logs