Make elasticsearch/node_stats metricset work for Stack Monitoring without xpack.enabled flag#19747
Make elasticsearch/node_stats metricset work for Stack Monitoring without xpack.enabled flag#19747ycombinator merged 32 commits intoelastic:feature-stack-monitoring-mb-ecsfrom ycombinator:poc-mb-es-ecs
Conversation
|
Script used for automatically generating field aliases YAML, to be added to |
|
Pinging @elastic/integrations-services (Team:Services) |
|
I tried to run this locally and I'm seeing this error in the metricbeat log: |
|
@chrisronline Thanks for reporting the errors. The latest two commits should take care of them. |
|
I'm running this successfully now (no errors in the metricbeat log) in a fresh environment and I'm not seeing ->
|
|
@chrisronline Awesome! And, just to confirm, you're seeing the equivalent of |
|
Where did we land on the |
|
Also, for
|
I'm seeing a top-level |
|
Also, I just realized we're going to run into a blocker eventually. For this POC we can alias the top-level However, once we try to handle Logstash monitoring data of |
|
@chrisronline I added the aliases you requested for |
I'm confused. Logstash only has |
Ah yes, I was mis-remembering 🤦. We should be good then. Sorry for causing confusion. |
|
What about
|
Yes, fixed now. Apparently I forgot to alias a bunch of top-level fields 🤦 🤦. |
I'm confused about the |
Yes, good point. I'm still trying to figure out where in the Beats codebase that field is coming from. It feels like a bug to me so perhaps we could have it removed, even in a minor. But let's assume we can't remove it. What would our alternatives be? How is the |
No action needed, just wanted to post an update about this. I've narrowed it down to Metricbeat: Still figuring out exactly what in Metricbeat is injecting this top-level |
|
@chrisronline Thinking about our Zoom discussion a few minutes ago:
|
BTW, just to stress the need to reduce the fields in the mapping to just the ones we actually need, here's a blocker we found on the Filebeat side with mappings being too large: #19965. So we'd want to try and avoid this with the Metricbeat mapping. |
|
@ycombinator It'd be nice to have |
@chrisronline Then lets go ahead with changing the queries. Beats won't allow duplicate definitions of the same field in the mappings (makes sense!) and I don't feel comfortable redefining the existing |
|
@sayden Good catches re: Re: feature branch, yes, I still need to create it and re-target this PR to it. But first I want to get CI green on this PR. |
|
Feature branch is created: https://github.com/elastic/beats/tree/feature-stack-monitoring-mb-ecs. Will re-target this PR to it as soon as CI goes green. |
|
Travis CI failures look unrelated (generator failures) and Jenkins CI is green on this PR. Re-targeting to feature branch... |
|
Didn't realize Jenkins CI would run again when I re-targeted the PR to the feature branch. I will let it run and, when it passes, merge this PR. |
…hout xpack.enabled flag (elastic#19747) * Make node_stats ignore xpack.enabled: true for the POC * Index more fields * WIP: add fields to fields.yml * Fleshing out alias fields * Adding more fields to mapping * Marking optional fields * Fixing datatypes * Fixing formatting * Fixing alias field definitions * More field fixes * Making cgroups metrics collection optional * Marking os.load_avg as optional for Windows * Aliasing type => metricset.name * Aliasing source_node fields * Aliasing timestamp => @timestamp * Removing field alias mappings for unused fields * Removing unnecessary fields from mapping * Updating generated files * Reducing visibility of isMaster function * Adding methods to metricset * Refactoring for testability * Fixing formatting * Making indices.bulk and thread_pool.write fields optional for BC * Deleting sample file from unsupported ES version * Remove xpack.enabled code path!!! * Updating xpack unit test * Updating python system tests for xpack * Remove top-level type field * Removing data-xpack.json * Updating data.json * Not collecting unmapped fields * Fixing formatting
What does this PR do
This PR prepares the
elasticsearch/node_statsmetricset (without settingxpack.enabled: true) to collect and index data for the Stack Monitoring UI. Concretely, it does the following:xpack.enabledomitted. In 8.0 the aliases will be removed and the Stack Monitoring UI code will have to be overhauled to reference the new fields directly.data_xpack.gofile implementing thexpack.enabled: truecode path for thenode_statsmetricset. Going forward, thenode_statsmetricset will simply ignore the value of thexpack.enabledsetting.Testing this PR
Build Metricbeat with this PR checked out.
Enable the
elasticsearch-xpackmodule.Optionally, disable the
systemmodule. This will reduce "noise" inmetricbeat-*indices, should you needs to inspect them.Run Metricbeat (assumes output is being sent to Elasticsearch running at localhost:9200).
Authors checklist
elasticsearch/node_stats/_meta/fields.ymldata.goto collect necessary additional metrics and index them into new fields.elasticsearch/_meta/fields.yml