Skip to content
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

[Stack monitoring] logstash - read from correct aggregation #122443

Merged
merged 16 commits into from
Jan 17, 2022

Conversation

klacabane
Copy link
Contributor

@klacabane klacabane commented Jan 6, 2022

Summary

In logstash paths that need to query the pipelines nested property we have to set two aggregations, one for each of legacy and metricbeat properties (see context).
This change fixes a bug where we would exclusively read the legacy aggregation and ignore the metricbeat one, failing to compute the processing time of the vertices when the latter contains the data.

Testing

  • Added legacy and metricbeat functional test for the pipeline viewer. The legacy archive already included the necessary documents but I had to port one logstash_state document to the metricbeat archive (see document details)

@klacabane
Copy link
Contributor Author

@elasticmachine merge upstream

@klacabane
Copy link
Contributor Author

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

expected head sha didn’t match current head ref.

@klacabane klacabane self-assigned this Jan 11, 2022
@klacabane klacabane added auto-backport Deprecated - use backport:version if exact versions are needed backport-v8.0.0 Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services v8.0.0 v8.1.0 labels Jan 11, 2022
@klacabane klacabane marked this pull request as ready for review January 11, 2022 17:25
@klacabane klacabane requested a review from a team as a code owner January 11, 2022 17:25
@elasticmachine
Copy link
Contributor

Pinging @elastic/infra-monitoring-ui (Team:Infra Monitoring UI)

@klacabane klacabane changed the title Sm logstash pipeline test [Stack monitoring] logstash - read from correct aggregation Jan 11, 2022
@klacabane klacabane added the release_note:skip Skip the PR/issue when compiling release notes label Jan 11, 2022
@matschaffer
Copy link
Contributor

I had to port one logstash_state document to the metricbeat archive

Did that go in another PR? Curious why I'm not seeing a diff to x-pack/test/functional/es_archives/monitoring/logstash_pipelines_mb here

@klacabane
Copy link
Contributor Author

klacabane commented Jan 12, 2022

There's a diff for x-pack/test/functional/es_archives/monitoring/logstash_pipelines_mb/data.json.gz where the document was added but the gzipped content won't show up in gh diff, so I added it to a separate non-gzipped file before the final commit for tracking purpose - https://github.com/elastic/kibana/blob/da890dc14e62d6ddf3110db311fdf7e4bcb86520/x-pack/test/functional/es_archives/monitoring/logstash_pipelines_mb/node_stats

@klacabane
Copy link
Contributor Author

@elasticmachine merge upstream

@matschaffer
Copy link
Contributor

@elasticmachine merge upstream

Copy link
Contributor

@matschaffer matschaffer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had a few thoughts/questions but overall this looks like an improvement to me so merge when ready!

@@ -76,6 +76,17 @@ export function _enrichStateWithStatsAggregation(
statsAggregation: any,
timeseriesIntervalInSeconds: number
) {
// we could have data in both legacy and metricbeat collection, we pick the bucket most filled
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wonder if we should consider plotting both? I'd guess this will mean a break in the graph when moving from internal collection to metricbeat.

Since the pipeline stack monitoring is beta though, maybe that's okay.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That could be an option. We could also merge the aggregations and ensure we only consider a single datasource per node, since a pipeline can run on multiple nodes if we receive both legacy and metricbeat monitoring for a pipeline-node tuple there is duplication that we should ignore

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a really good point. I opened #123191 to capture the improvement for later.

const SUBJ_PIPELINE_SECTION_PREFIX = 'pipelineViewerSection_';
const PIPELINE_SECTION_ITEM_CLS = 'monPipelineViewer__listItem';

return new (class LogstashPipelineViewer {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The return new class pattern is really interesting. Not sure why we do it that way, but indeed this fits with the rest of the monitoring test services.

}
}

throw new Error(`pipeline with id ${id} not found`);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just nit picking but, seems like this is the pipeline "name" rather than "id". Pretty sure pipelines get a unique id number as well as a string name.

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
monitoring 445.7KB 445.7KB +43.0B

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @klacabane

@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.0

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Jan 17, 2022
…122443)

* add test-subj to pipeline viewer section

* pipeline viewer service

* clickPipeline

* pipeline viewer_mb test

* lint

* lint

* update component snapshot

* fix get_pipeline bucket selection

* align metricbeat pipeline data with internal monitoring

* collect filters

* fix pipeline viewer test

* clean logstash_pipelines_mb archive

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit 6c6a2ed)
kibanamachine added a commit that referenced this pull request Jan 17, 2022
…#123149)

* add test-subj to pipeline viewer section

* pipeline viewer service

* clickPipeline

* pipeline viewer_mb test

* lint

* lint

* update component snapshot

* fix get_pipeline bucket selection

* align metricbeat pipeline data with internal monitoring

* collect filters

* fix pipeline viewer test

* clean logstash_pipelines_mb archive

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit 6c6a2ed)

Co-authored-by: Kevin Lacabane <klacabane@gmail.com>
ogupte pushed a commit to ogupte/kibana that referenced this pull request Jan 28, 2022
…122443)

* add test-subj to pipeline viewer section

* pipeline viewer service

* clickPipeline

* pipeline viewer_mb test

* lint

* lint

* update component snapshot

* fix get_pipeline bucket selection

* align metricbeat pipeline data with internal monitoring

* collect filters

* fix pipeline viewer test

* clean logstash_pipelines_mb archive

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Deprecated - use backport:version if exact versions are needed release_note:skip Skip the PR/issue when compiling release notes Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services v8.0.0 v8.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants