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] api tests for logstash #145351

Merged
merged 5 commits into from
Nov 21, 2022

Conversation

klacabane
Copy link
Contributor

@klacabane klacabane commented Nov 16, 2022

Summary

Part of #119658

Add api integration tests for logstash routes to validate behavior when reading data ingested by elastic-agent.

We currently have a testing suite for legacy and another one for metricbeat. Since metricbeat and agent documents only differ in their metadata, for example agent will populate a data_stream.* property to identify the document types while metricbeat uses metricset.*, the tests assertion validating business data should pass regardless of the documents source. With this in mind the metricbeat tests were updated to run the tests twice, one time with metricbeat data and a second time with package data.

To generate the archives the metrics-* mappings were extracted with esArchiver from an elasticsearch with the package installed, and the documents were transformed from the metricbeat documents with this script.

@klacabane klacabane self-assigned this Nov 16, 2022
@klacabane klacabane added Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services Feature:Stack Monitoring release_note:skip Skip the PR/issue when compiling release notes labels Nov 16, 2022
@klacabane klacabane marked this pull request as ready for review November 16, 2022 12:56
@klacabane klacabane requested a review from a team as a code owner November 16, 2022 12:56
@elasticmachine
Copy link
Contributor

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

@crespocarlos
Copy link
Contributor

@elasticmachine merge upstream

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Unknown metric groups

ESLint disabled in files

id before after diff
osquery 1 2 +1

ESLint disabled line counts

id before after diff
enterpriseSearch 19 21 +2
fleet 59 65 +6
osquery 109 115 +6
securitySolution 442 448 +6
total +20

Total ESLint disabled count

id before after diff
enterpriseSearch 20 22 +2
fleet 67 73 +6
osquery 110 117 +7
securitySolution 519 525 +6
total +21

History

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

cc @klacabane

Copy link
Contributor

@crespocarlos crespocarlos left a comment

Choose a reason for hiding this comment

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

LGTM!

@klacabane klacabane merged commit 9cb4950 into elastic:main Nov 21, 2022
@kibanamachine kibanamachine added v8.7.0 backport:skip This commit does not require backporting labels Nov 21, 2022
crespocarlos added a commit that referenced this pull request Feb 7, 2023
## Summary

closes #142642

This PR fixes the expected result for the node_detail_mb test. 

One of the possible reasons why it failed is because this [PR changed
the cpu load_average fields type to
`half_float`](elastic/beats@7ba1426),
making the `logstash_os_load` metrics to be different from the expected
results.

This problem doesn't happen in 8.7, because, [among other things, this
PR updated the expected result, with the correct
values](#145351)


### How to test

```bash
node scripts/functional_test_runner --config x-pack/test/api_integration/config.ts --include x-pack/test/api_integration/apis/monitoring/logstash/node_detail_mb.js 
```

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
backport:skip This commit does not require backporting Feature:Stack Monitoring 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.7.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants