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

[Infra] Add observability feature id to host request #192898

Merged
merged 2 commits into from
Sep 17, 2024

Conversation

Bluefinger
Copy link
Contributor

@Bluefinger Bluefinger commented Sep 13, 2024

Summary

Fixes the Hosts view for serverless by enabling the observability feature id for the /api/metrics/infra/{assetType} request.

Closes #191078

How to test

  • Go to Infrastructure -> Hosts
  • Go to Alerts & Rules, Infrastructure Rules and create a new Inventory Rule, something like alert on cpu usage above certain %.
  • Allow the rule/alert to run
  • Go back to Infrastructure -> Hosts view
  • Hosts table should have a column with alert icons now visible for all hosts with alerts active on them.

This should be tested against serverless + stateful versions of the Observability product.

Screen.Recording.2024-09-16.115240.mp4

@Bluefinger Bluefinger added release_note:skip Skip the PR/issue when compiling release notes backport:skip This commit does not require backporting 8.0 candidate Team:obs-ux-infra_services Observability Infrastructure & Services User Experience Team labels Sep 13, 2024
@obltmachine
Copy link

🤖 GitHub comments

Expand to view the GitHub comments

Just comment with:

  • /oblt-deploy : Deploy a Kibana instance using the Observability test environments.
  • run docs-build : Re-trigger the docs validation. (use unformatted text in the comment!)

@Bluefinger
Copy link
Contributor Author

@elasticmachine merge upstream

@Bluefinger Bluefinger marked this pull request as ready for review September 16, 2024 10:16
@Bluefinger Bluefinger requested a review from a team as a code owner September 16, 2024 10:16
@elasticmachine
Copy link
Contributor

Pinging @elastic/obs-ux-infra_services-team (Team:obs-ux-infra_services)

@Bluefinger Bluefinger added backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) v8.15.0 v8.16.0 and removed backport:skip This commit does not require backporting labels Sep 16, 2024
@kibana-ci
Copy link
Collaborator

💛 Build succeeded, but was flaky

Failed CI Steps

Metrics [docs]

✅ unchanged

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

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!

@botelastic botelastic bot added the ci:project-deploy-observability Create an Observability project label Sep 17, 2024
@Bluefinger Bluefinger merged commit 3062292 into elastic:main Sep 17, 2024
25 checks passed
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Sep 17, 2024
## Summary

Fixes the Hosts view for serverless by enabling the `observability`
feature id for the `/api/metrics/infra/{assetType}` request.

Closes elastic#191078

## How to test

- Go to Infrastructure -> Hosts
- Go to Alerts & Rules, Infrastructure Rules and create a new Inventory
Rule, something like alert on cpu usage above certain %.
- Allow the rule/alert to run
- Go back to Infrastructure -> Hosts view
- Hosts table should have a column with alert icons now visible for all
hosts with alerts active on them.

This should be tested against serverless + stateful versions of the
Observability product.

https://github.com/user-attachments/assets/8e0b36e0-30e6-4176-8190-592b3aaf2732

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
(cherry picked from commit 3062292)
@kibanamachine
Copy link
Contributor

💔 Some backports could not be created

Status Branch Result
8.15 Backport failed because of merge conflicts
8.x

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

Manual backport

To create the backport manually run:

node scripts/backport --pr 192898

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Sep 17, 2024
…193176)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[Infra] Add observability feature id to host request
(#192898)](#192898)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Gonçalo Rica Pais da
Silva","email":"goncalo.rica@elastic.co"},"sourceCommit":{"committedDate":"2024-09-17T14:17:30Z","message":"[Infra]
Add observability feature id to host request (#192898)\n\n##
Summary\r\n\r\nFixes the Hosts view for serverless by enabling the
`observability`\r\nfeature id for the `/api/metrics/infra/{assetType}`
request.\r\n\r\nCloses #191078 \r\n\r\n## How to test\r\n\r\n- Go to
Infrastructure -> Hosts\r\n- Go to Alerts & Rules, Infrastructure Rules
and create a new Inventory\r\nRule, something like alert on cpu usage
above certain %.\r\n- Allow the rule/alert to run\r\n- Go back to
Infrastructure -> Hosts view\r\n- Hosts table should have a column with
alert icons now visible for all\r\nhosts with alerts active on
them.\r\n\r\nThis should be tested against serverless + stateful
versions of the\r\nObservability
product.\r\n\r\n\r\nhttps://github.com/user-attachments/assets/8e0b36e0-30e6-4176-8190-592b3aaf2732\r\n\r\nCo-authored-by:
Elastic Machine
<elasticmachine@users.noreply.github.com>","sha":"30622923f6aacfbf5f97838a2a8751e9dbc81812","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","backport:prev-minor","ci:project-deploy-observability","Team:obs-ux-infra_services","v8.15.0","v8.16.0"],"title":"[Infra]
Add observability feature id to host
request","number":192898,"url":"https://github.com/elastic/kibana/pull/192898","mergeCommit":{"message":"[Infra]
Add observability feature id to host request (#192898)\n\n##
Summary\r\n\r\nFixes the Hosts view for serverless by enabling the
`observability`\r\nfeature id for the `/api/metrics/infra/{assetType}`
request.\r\n\r\nCloses #191078 \r\n\r\n## How to test\r\n\r\n- Go to
Infrastructure -> Hosts\r\n- Go to Alerts & Rules, Infrastructure Rules
and create a new Inventory\r\nRule, something like alert on cpu usage
above certain %.\r\n- Allow the rule/alert to run\r\n- Go back to
Infrastructure -> Hosts view\r\n- Hosts table should have a column with
alert icons now visible for all\r\nhosts with alerts active on
them.\r\n\r\nThis should be tested against serverless + stateful
versions of the\r\nObservability
product.\r\n\r\n\r\nhttps://github.com/user-attachments/assets/8e0b36e0-30e6-4176-8190-592b3aaf2732\r\n\r\nCo-authored-by:
Elastic Machine
<elasticmachine@users.noreply.github.com>","sha":"30622923f6aacfbf5f97838a2a8751e9dbc81812"}},"sourceBranch":"main","suggestedTargetBranches":["8.15","8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/192898","number":192898,"mergeCommit":{"message":"[Infra]
Add observability feature id to host request (#192898)\n\n##
Summary\r\n\r\nFixes the Hosts view for serverless by enabling the
`observability`\r\nfeature id for the `/api/metrics/infra/{assetType}`
request.\r\n\r\nCloses #191078 \r\n\r\n## How to test\r\n\r\n- Go to
Infrastructure -> Hosts\r\n- Go to Alerts & Rules, Infrastructure Rules
and create a new Inventory\r\nRule, something like alert on cpu usage
above certain %.\r\n- Allow the rule/alert to run\r\n- Go back to
Infrastructure -> Hosts view\r\n- Hosts table should have a column with
alert icons now visible for all\r\nhosts with alerts active on
them.\r\n\r\nThis should be tested against serverless + stateful
versions of the\r\nObservability
product.\r\n\r\n\r\nhttps://github.com/user-attachments/assets/8e0b36e0-30e6-4176-8190-592b3aaf2732\r\n\r\nCo-authored-by:
Elastic Machine
<elasticmachine@users.noreply.github.com>","sha":"30622923f6aacfbf5f97838a2a8751e9dbc81812"}},{"branch":"8.15","label":"v8.15.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.x","label":"v8.16.0","branchLabelMappingKey":"^v8.16.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Gonçalo Rica Pais da Silva <goncalo.rica@elastic.co>
@Bluefinger
Copy link
Contributor Author

💚 All backports created successfully

Status Branch Result
8.15

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

Questions ?

Please refer to the Backport tool documentation

Bluefinger added a commit to Bluefinger/kibana that referenced this pull request Sep 18, 2024
## Summary

Fixes the Hosts view for serverless by enabling the `observability`
feature id for the `/api/metrics/infra/{assetType}` request.

Closes elastic#191078

## How to test

- Go to Infrastructure -> Hosts
- Go to Alerts & Rules, Infrastructure Rules and create a new Inventory
Rule, something like alert on cpu usage above certain %.
- Allow the rule/alert to run
- Go back to Infrastructure -> Hosts view
- Hosts table should have a column with alert icons now visible for all
hosts with alerts active on them.

This should be tested against serverless + stateful versions of the
Observability product.

https://github.com/user-attachments/assets/8e0b36e0-30e6-4176-8190-592b3aaf2732

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
(cherry picked from commit 3062292)

# Conflicts:
#	x-pack/plugins/observability_solution/infra/server/routes/infra/lib/host/get_hosts_alerts_count.ts
Bluefinger added a commit that referenced this pull request Sep 18, 2024
…#193260)

# Backport

This will backport the following commits from `main` to `8.15`:
- [[Infra] Add observability feature id to host request
(#192898)](#192898)

<!--- Backport version: 8.9.8 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Gonçalo Rica Pais da
Silva","email":"goncalo.rica@elastic.co"},"sourceCommit":{"committedDate":"2024-09-17T14:17:30Z","message":"[Infra]
Add observability feature id to host request (#192898)\n\n##
Summary\r\n\r\nFixes the Hosts view for serverless by enabling the
`observability`\r\nfeature id for the `/api/metrics/infra/{assetType}`
request.\r\n\r\nCloses #191078 \r\n\r\n## How to test\r\n\r\n- Go to
Infrastructure -> Hosts\r\n- Go to Alerts & Rules, Infrastructure Rules
and create a new Inventory\r\nRule, something like alert on cpu usage
above certain %.\r\n- Allow the rule/alert to run\r\n- Go back to
Infrastructure -> Hosts view\r\n- Hosts table should have a column with
alert icons now visible for all\r\nhosts with alerts active on
them.\r\n\r\nThis should be tested against serverless + stateful
versions of the\r\nObservability
product.\r\n\r\n\r\nhttps://github.com/user-attachments/assets/8e0b36e0-30e6-4176-8190-592b3aaf2732\r\n\r\nCo-authored-by:
Elastic Machine
<elasticmachine@users.noreply.github.com>","sha":"30622923f6aacfbf5f97838a2a8751e9dbc81812","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","backport:prev-minor","ci:project-deploy-observability","Team:obs-ux-infra_services","v8.15.0","v8.16.0"],"number":192898,"url":"https://github.com/elastic/kibana/pull/192898","mergeCommit":{"message":"[Infra]
Add observability feature id to host request (#192898)\n\n##
Summary\r\n\r\nFixes the Hosts view for serverless by enabling the
`observability`\r\nfeature id for the `/api/metrics/infra/{assetType}`
request.\r\n\r\nCloses #191078 \r\n\r\n## How to test\r\n\r\n- Go to
Infrastructure -> Hosts\r\n- Go to Alerts & Rules, Infrastructure Rules
and create a new Inventory\r\nRule, something like alert on cpu usage
above certain %.\r\n- Allow the rule/alert to run\r\n- Go back to
Infrastructure -> Hosts view\r\n- Hosts table should have a column with
alert icons now visible for all\r\nhosts with alerts active on
them.\r\n\r\nThis should be tested against serverless + stateful
versions of the\r\nObservability
product.\r\n\r\n\r\nhttps://github.com/user-attachments/assets/8e0b36e0-30e6-4176-8190-592b3aaf2732\r\n\r\nCo-authored-by:
Elastic Machine
<elasticmachine@users.noreply.github.com>","sha":"30622923f6aacfbf5f97838a2a8751e9dbc81812"}},"sourceBranch":"main","suggestedTargetBranches":["8.15"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","labelRegex":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/192898","number":192898,"mergeCommit":{"message":"[Infra]
Add observability feature id to host request (#192898)\n\n##
Summary\r\n\r\nFixes the Hosts view for serverless by enabling the
`observability`\r\nfeature id for the `/api/metrics/infra/{assetType}`
request.\r\n\r\nCloses #191078 \r\n\r\n## How to test\r\n\r\n- Go to
Infrastructure -> Hosts\r\n- Go to Alerts & Rules, Infrastructure Rules
and create a new Inventory\r\nRule, something like alert on cpu usage
above certain %.\r\n- Allow the rule/alert to run\r\n- Go back to
Infrastructure -> Hosts view\r\n- Hosts table should have a column with
alert icons now visible for all\r\nhosts with alerts active on
them.\r\n\r\nThis should be tested against serverless + stateful
versions of the\r\nObservability
product.\r\n\r\n\r\nhttps://github.com/user-attachments/assets/8e0b36e0-30e6-4176-8190-592b3aaf2732\r\n\r\nCo-authored-by:
Elastic Machine
<elasticmachine@users.noreply.github.com>","sha":"30622923f6aacfbf5f97838a2a8751e9dbc81812"}},{"branch":"8.15","label":"v8.15.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.x","label":"v8.16.0","labelRegex":"^v8.16.0$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/193176","number":193176,"state":"MERGED","mergeCommit":{"sha":"13a392a54f80e14fbf7400cc9af175b6eb1aec71","message":"[8.x]
[Infra] Add observability feature id to host request (#192898)
(#193176)\n\n# Backport\n\nThis will backport the following commits from
`main` to `8.x`:\n- [[Infra] Add observability feature id to host
request\n(#192898)](https://github.com/elastic/kibana/pull/192898)\n\n<!---
Backport version: 9.4.3 -->\n\n### Questions ?\nPlease refer to the
[Backport
tool\ndocumentation](https://github.com/sqren/backport)\n\n<!--BACKPORT
[{\"author\":{\"name\":\"Gonçalo Rica Pais
da\nSilva\",\"email\":\"goncalo.rica@elastic.co\"},\"sourceCommit\":{\"committedDate\":\"2024-09-17T14:17:30Z\",\"message\":\"[Infra]\nAdd
observability feature id to host request
(#192898)\\n\\n##\nSummary\\r\\n\\r\\nFixes the Hosts view for
serverless by enabling the\n`observability`\\r\\nfeature id for the
`/api/metrics/infra/{assetType}`\nrequest.\\r\\n\\r\\nCloses #191078
\\r\\n\\r\\n## How to test\\r\\n\\r\\n- Go to\nInfrastructure ->
Hosts\\r\\n- Go to Alerts & Rules, Infrastructure Rules\nand create a
new Inventory\\r\\nRule, something like alert on cpu usage\nabove
certain %.\\r\\n- Allow the rule/alert to run\\r\\n- Go back
to\nInfrastructure -> Hosts view\\r\\n- Hosts table should have a column
with\nalert icons now visible for all\\r\\nhosts with alerts active
on\nthem.\\r\\n\\r\\nThis should be tested against serverless +
stateful\nversions of
the\\r\\nObservability\nproduct.\\r\\n\\r\\n\\r\\nhttps://github.com/user-attachments/assets/8e0b36e0-30e6-4176-8190-592b3aaf2732\\r\\n\\r\\nCo-authored-by:\nElastic
Machine\n<elasticmachine@users.noreply.github.com>\",\"sha\":\"30622923f6aacfbf5f97838a2a8751e9dbc81812\",\"branchLabelMapping\":{\"^v9.0.0$\":\"main\",\"^v8.16.0$\":\"8.x\",\"^v(\\\\d+).(\\\\d+).\\\\d+$\":\"$1.$2\"}},\"sourcePullRequest\":{\"labels\":[\"release_note:skip\",\"v9.0.0\",\"backport:prev-minor\",\"ci:project-deploy-observability\",\"Team:obs-ux-infra_services\",\"v8.15.0\",\"v8.16.0\"],\"title\":\"[Infra]\nAdd
observability feature id to
host\nrequest\",\"number\":192898,\"url\":\"https://github.com/elastic/kibana/pull/192898\",\"mergeCommit\":{\"message\":\"[Infra]\nAdd
observability feature id to host request
(#192898)\\n\\n##\nSummary\\r\\n\\r\\nFixes the Hosts view for
serverless by enabling the\n`observability`\\r\\nfeature id for the
`/api/metrics/infra/{assetType}`\nrequest.\\r\\n\\r\\nCloses #191078
\\r\\n\\r\\n## How to test\\r\\n\\r\\n- Go to\nInfrastructure ->
Hosts\\r\\n- Go to Alerts & Rules, Infrastructure Rules\nand create a
new Inventory\\r\\nRule, something like alert on cpu usage\nabove
certain %.\\r\\n- Allow the rule/alert to run\\r\\n- Go back
to\nInfrastructure -> Hosts view\\r\\n- Hosts table should have a column
with\nalert icons now visible for all\\r\\nhosts with alerts active
on\nthem.\\r\\n\\r\\nThis should be tested against serverless +
stateful\nversions of
the\\r\\nObservability\nproduct.\\r\\n\\r\\n\\r\\nhttps://github.com/user-attachments/assets/8e0b36e0-30e6-4176-8190-592b3aaf2732\\r\\n\\r\\nCo-authored-by:\nElastic
Machine\n<elasticmachine@users.noreply.github.com>\",\"sha\":\"30622923f6aacfbf5f97838a2a8751e9dbc81812\"}},\"sourceBranch\":\"main\",\"suggestedTargetBranches\":[\"8.15\",\"8.x\"],\"targetPullRequestStates\":[{\"branch\":\"main\",\"label\":\"v9.0.0\",\"branchLabelMappingKey\":\"^v9.0.0$\",\"isSourceBranch\":true,\"state\":\"MERGED\",\"url\":\"https://github.com/elastic/kibana/pull/192898\",\"number\":192898,\"mergeCommit\":{\"message\":\"[Infra]\nAdd
observability feature id to host request
(#192898)\\n\\n##\nSummary\\r\\n\\r\\nFixes the Hosts view for
serverless by enabling the\n`observability`\\r\\nfeature id for the
`/api/metrics/infra/{assetType}`\nrequest.\\r\\n\\r\\nCloses #191078
\\r\\n\\r\\n## How to test\\r\\n\\r\\n- Go to\nInfrastructure ->
Hosts\\r\\n- Go to Alerts & Rules, Infrastructure Rules\nand create a
new Inventory\\r\\nRule, something like alert on cpu usage\nabove
certain %.\\r\\n- Allow the rule/alert to run\\r\\n- Go back
to\nInfrastructure -> Hosts view\\r\\n- Hosts table should have a column
with\nalert icons now visible for all\\r\\nhosts with alerts active
on\nthem.\\r\\n\\r\\nThis should be tested against serverless +
stateful\nversions of
the\\r\\nObservability\nproduct.\\r\\n\\r\\n\\r\\nhttps://github.com/user-attachments/assets/8e0b36e0-30e6-4176-8190-592b3aaf2732\\r\\n\\r\\nCo-authored-by:\nElastic
Machine\n<elasticmachine@users.noreply.github.com>\",\"sha\":\"30622923f6aacfbf5f97838a2a8751e9dbc81812\"}},{\"branch\":\"8.15\",\"label\":\"v8.15.0\",\"branchLabelMappingKey\":\"^v(\\\\d+).(\\\\d+).\\\\d+$\",\"isSourceBranch\":false,\"state\":\"NOT_CREATED\"},{\"branch\":\"8.x\",\"label\":\"v8.16.0\",\"branchLabelMappingKey\":\"^v8.16.0$\",\"isSourceBranch\":false,\"state\":\"NOT_CREATED\"}]}]\nBACKPORT-->\n\nCo-authored-by:
Gonçalo Rica Pais da Silva <goncalo.rica@elastic.co>"}}]}] BACKPORT-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) ci:project-deploy-observability Create an Observability project release_note:skip Skip the PR/issue when compiling release notes Team:obs-ux-infra_services Observability Infrastructure & Services User Experience Team v8.15.0 v8.15.2 v8.16.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Infra] Host Alert counts don't show in serverless in Hosts Table
6 participants