Skip to content

[Infra][Hosts] Fix inventory Network Inbound and Outbound alert rules#251855

Merged
crespocarlos merged 6 commits into
elastic:mainfrom
crespocarlos:251854-fix-network-alerts
Feb 11, 2026
Merged

[Infra][Hosts] Fix inventory Network Inbound and Outbound alert rules#251855
crespocarlos merged 6 commits into
elastic:mainfrom
crespocarlos:251854-fix-network-alerts

Conversation

@crespocarlos
Copy link
Copy Markdown
Contributor

@crespocarlos crespocarlos commented Feb 5, 2026

fixes #251854

Summary

This PR fixes the network inbound and outbound alert executors. There were basically 2 issues:

  • OTel multi-dimension aggregation: The alert was not handling the filter-wrapped aggregation pattern used by rxV2/txV2 metrics, causing the query to fail.
  • Missing bits-to-bytes conversion: The threshold conversion (÷8) was implemented for rx/tx but missing for rxV2/txV2, causing threshold comparisons to be off by 8x.

Otel
image

ECS
image

how to test

Comment on lines +24 to +25
txV2: (n) => Number(n) / 8,
rxV2: (n) => Number(n) / 8,
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

For ECS, rxV2 and txV2 used the same fields as rx and tx, and we missed this conversion.
For Semconv, system.network.io is in bytes, but users set up these alerts in bits/s, so this conversion is also needed.

@crespocarlos
Copy link
Copy Markdown
Contributor Author

@elasticmachine merge upstream

@crespocarlos crespocarlos added Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas t// release_note:skip Skip the PR/issue when compiling release notes backport:version Backport to applied version labels v9.2.0 v9.3.0 v9.4.0 labels Feb 5, 2026
@crespocarlos crespocarlos marked this pull request as ready for review February 5, 2026 15:43
@crespocarlos crespocarlos requested review from a team as code owners February 5, 2026 15:43
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/kibana-presentation (Team:Presentation)

@crespocarlos
Copy link
Copy Markdown
Contributor Author

@elasticmachine merge upstream

@elasticmachine
Copy link
Copy Markdown
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #11 / "before all" hook in "{root}"

Metrics [docs]

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
metricsDataAccess 152 154 +2

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
metricsDataAccess 40.7KB 40.8KB +78.0B
Unknown metric groups

API count

id before after diff
metricsDataAccess 152 154 +2

History

Copy link
Copy Markdown
Contributor

@MiriamAparicio MiriamAparicio left a comment

Choose a reason for hiding this comment

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

Good catch, and thanks for the quick fix

@crespocarlos
Copy link
Copy Markdown
Contributor Author

@elasticmachine merge upstream

@crespocarlos crespocarlos enabled auto-merge (squash) February 9, 2026 08:48
auto-merge was automatically disabled February 9, 2026 08:52

Pull Request is not mergeable

Copy link
Copy Markdown
Contributor

@benakansara benakansara left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for the fix!

@crespocarlos
Copy link
Copy Markdown
Contributor Author

@elasticmachine merge upstream

@crespocarlos crespocarlos enabled auto-merge (squash) February 11, 2026 09:54
@crespocarlos crespocarlos merged commit c3c9c78 into elastic:main Feb 11, 2026
16 checks passed
@kibanamachine
Copy link
Copy Markdown
Contributor

Starting backport for target branches: 9.2, 9.3

https://github.com/elastic/kibana/actions/runs/21903137171

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Feb 11, 2026
…elastic#251855)

fixes elastic#251854

## Summary

This PR fixes the network inbound and outbound alert executors. There
were basically 2 issues:

- OTel multi-dimension aggregation: The alert was not handling the
filter-wrapped aggregation pattern used by `rxV2`/`txV2` metrics,
causing the query to fail.
- Missing bits-to-bytes conversion: The threshold conversion (÷8) was
implemented for `rx`/`tx` but missing for `rxV2`/`txV2`, causing
threshold comparisons to be off by 8x.

Otel
<img width="800" height="702" alt="image"
src="https://github.com/user-attachments/assets/14481a73-3481-4605-b554-64bf645810ee"
/>

ECS
<img width="800" height="813" alt="image"
src="https://github.com/user-attachments/assets/82096690-ea1a-4372-a3de-65565fe35b9d"
/>

### how to test

- Otel:
- Run: `./forge --dataset hosts --format otel --interval 30s`
(https://github.com/simianhacker/simian-forge)
   - Create Network Inbound and Outbound metrics in the Infra UI
- ECS:
   - Run `node scripts/synthtrace infra_hosts_ecs.ts --live`
   - Create Network Inbound and Outbound metrics in the Infra UI

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
(cherry picked from commit c3c9c78)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Feb 11, 2026
…elastic#251855)

fixes elastic#251854

## Summary

This PR fixes the network inbound and outbound alert executors. There
were basically 2 issues:

- OTel multi-dimension aggregation: The alert was not handling the
filter-wrapped aggregation pattern used by `rxV2`/`txV2` metrics,
causing the query to fail.
- Missing bits-to-bytes conversion: The threshold conversion (÷8) was
implemented for `rx`/`tx` but missing for `rxV2`/`txV2`, causing
threshold comparisons to be off by 8x.

Otel
<img width="800" height="702" alt="image"
src="https://github.com/user-attachments/assets/14481a73-3481-4605-b554-64bf645810ee"
/>

ECS
<img width="800" height="813" alt="image"
src="https://github.com/user-attachments/assets/82096690-ea1a-4372-a3de-65565fe35b9d"
/>

### how to test

- Otel:
- Run: `./forge --dataset hosts --format otel --interval 30s`
(https://github.com/simianhacker/simian-forge)
   - Create Network Inbound and Outbound metrics in the Infra UI
- ECS:
   - Run `node scripts/synthtrace infra_hosts_ecs.ts --live`
   - Create Network Inbound and Outbound metrics in the Infra UI

---------

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

💚 All backports created successfully

Status Branch Result
9.2
9.3

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

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Feb 11, 2026
… rules (#251855) (#252691)

# Backport

This will backport the following commits from `main` to `9.2`:
- [[Infra][Hosts] Fix inventory Network Inbound and Outbound alert rules
(#251855)](#251855)

<!--- Backport version: 9.6.6 -->

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

<!--BACKPORT [{"author":{"name":"Carlos
Crespo","email":"crespocarlos@users.noreply.github.com"},"sourceCommit":{"committedDate":"2026-02-11T11:23:12Z","message":"[Infra][Hosts]
Fix inventory Network Inbound and Outbound alert rules
(#251855)\n\nfixes https://github.com/elastic/kibana/issues/251854\n\n##
Summary\n\nThis PR fixes the network inbound and outbound alert
executors. There\nwere basically 2 issues:\n\n- OTel multi-dimension
aggregation: The alert was not handling the\nfilter-wrapped aggregation
pattern used by `rxV2`/`txV2` metrics,\ncausing the query to fail.\n-
Missing bits-to-bytes conversion: The threshold conversion (÷8)
was\nimplemented for `rx`/`tx` but missing for `rxV2`/`txV2`,
causing\nthreshold comparisons to be off by 8x.\n\nOtel\n<img
width=\"800\" height=\"702\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/14481a73-3481-4605-b554-64bf645810ee\"\n/>\n\nECS\n<img
width=\"800\" height=\"813\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/82096690-ea1a-4372-a3de-65565fe35b9d\"\n/>\n\n###
how to test\n\n- Otel: \n- Run: `./forge --dataset hosts --format otel
--interval 30s`\n(https://github.com/simianhacker/simian-forge)\n -
Create Network Inbound and Outbound metrics in the Infra UI \n- ECS:\n -
Run `node scripts/synthtrace infra_hosts_ecs.ts --live`\n - Create
Network Inbound and Outbound metrics in the Infra
UI\n\n---------\n\nCo-authored-by: Elastic Machine
<elasticmachine@users.noreply.github.com>","sha":"c3c9c78fdd5b12c4abf7784e1521557e712a4c22","branchLabelMapping":{"^v9.4.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Presentation","release_note:skip","backport:version","v9.2.0","v9.3.0","v9.4.0"],"title":"[Infra][Hosts]
Fix inventory Network Inbound and Outbound alert
rules","number":251855,"url":"https://github.com/elastic/kibana/pull/251855","mergeCommit":{"message":"[Infra][Hosts]
Fix inventory Network Inbound and Outbound alert rules
(#251855)\n\nfixes https://github.com/elastic/kibana/issues/251854\n\n##
Summary\n\nThis PR fixes the network inbound and outbound alert
executors. There\nwere basically 2 issues:\n\n- OTel multi-dimension
aggregation: The alert was not handling the\nfilter-wrapped aggregation
pattern used by `rxV2`/`txV2` metrics,\ncausing the query to fail.\n-
Missing bits-to-bytes conversion: The threshold conversion (÷8)
was\nimplemented for `rx`/`tx` but missing for `rxV2`/`txV2`,
causing\nthreshold comparisons to be off by 8x.\n\nOtel\n<img
width=\"800\" height=\"702\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/14481a73-3481-4605-b554-64bf645810ee\"\n/>\n\nECS\n<img
width=\"800\" height=\"813\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/82096690-ea1a-4372-a3de-65565fe35b9d\"\n/>\n\n###
how to test\n\n- Otel: \n- Run: `./forge --dataset hosts --format otel
--interval 30s`\n(https://github.com/simianhacker/simian-forge)\n -
Create Network Inbound and Outbound metrics in the Infra UI \n- ECS:\n -
Run `node scripts/synthtrace infra_hosts_ecs.ts --live`\n - Create
Network Inbound and Outbound metrics in the Infra
UI\n\n---------\n\nCo-authored-by: Elastic Machine
<elasticmachine@users.noreply.github.com>","sha":"c3c9c78fdd5b12c4abf7784e1521557e712a4c22"}},"sourceBranch":"main","suggestedTargetBranches":["9.2","9.3"],"targetPullRequestStates":[{"branch":"9.2","label":"v9.2.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.3","label":"v9.3.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.4.0","branchLabelMappingKey":"^v9.4.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/251855","number":251855,"mergeCommit":{"message":"[Infra][Hosts]
Fix inventory Network Inbound and Outbound alert rules
(#251855)\n\nfixes https://github.com/elastic/kibana/issues/251854\n\n##
Summary\n\nThis PR fixes the network inbound and outbound alert
executors. There\nwere basically 2 issues:\n\n- OTel multi-dimension
aggregation: The alert was not handling the\nfilter-wrapped aggregation
pattern used by `rxV2`/`txV2` metrics,\ncausing the query to fail.\n-
Missing bits-to-bytes conversion: The threshold conversion (÷8)
was\nimplemented for `rx`/`tx` but missing for `rxV2`/`txV2`,
causing\nthreshold comparisons to be off by 8x.\n\nOtel\n<img
width=\"800\" height=\"702\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/14481a73-3481-4605-b554-64bf645810ee\"\n/>\n\nECS\n<img
width=\"800\" height=\"813\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/82096690-ea1a-4372-a3de-65565fe35b9d\"\n/>\n\n###
how to test\n\n- Otel: \n- Run: `./forge --dataset hosts --format otel
--interval 30s`\n(https://github.com/simianhacker/simian-forge)\n -
Create Network Inbound and Outbound metrics in the Infra UI \n- ECS:\n -
Run `node scripts/synthtrace infra_hosts_ecs.ts --live`\n - Create
Network Inbound and Outbound metrics in the Infra
UI\n\n---------\n\nCo-authored-by: Elastic Machine
<elasticmachine@users.noreply.github.com>","sha":"c3c9c78fdd5b12c4abf7784e1521557e712a4c22"}}]}]
BACKPORT-->

Co-authored-by: Carlos Crespo <crespocarlos@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
kibanamachine added a commit that referenced this pull request Feb 11, 2026
… rules (#251855) (#252692)

# Backport

This will backport the following commits from `main` to `9.3`:
- [[Infra][Hosts] Fix inventory Network Inbound and Outbound alert rules
(#251855)](#251855)

<!--- Backport version: 9.6.6 -->

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

<!--BACKPORT [{"author":{"name":"Carlos
Crespo","email":"crespocarlos@users.noreply.github.com"},"sourceCommit":{"committedDate":"2026-02-11T11:23:12Z","message":"[Infra][Hosts]
Fix inventory Network Inbound and Outbound alert rules
(#251855)\n\nfixes https://github.com/elastic/kibana/issues/251854\n\n##
Summary\n\nThis PR fixes the network inbound and outbound alert
executors. There\nwere basically 2 issues:\n\n- OTel multi-dimension
aggregation: The alert was not handling the\nfilter-wrapped aggregation
pattern used by `rxV2`/`txV2` metrics,\ncausing the query to fail.\n-
Missing bits-to-bytes conversion: The threshold conversion (÷8)
was\nimplemented for `rx`/`tx` but missing for `rxV2`/`txV2`,
causing\nthreshold comparisons to be off by 8x.\n\nOtel\n<img
width=\"800\" height=\"702\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/14481a73-3481-4605-b554-64bf645810ee\"\n/>\n\nECS\n<img
width=\"800\" height=\"813\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/82096690-ea1a-4372-a3de-65565fe35b9d\"\n/>\n\n###
how to test\n\n- Otel: \n- Run: `./forge --dataset hosts --format otel
--interval 30s`\n(https://github.com/simianhacker/simian-forge)\n -
Create Network Inbound and Outbound metrics in the Infra UI \n- ECS:\n -
Run `node scripts/synthtrace infra_hosts_ecs.ts --live`\n - Create
Network Inbound and Outbound metrics in the Infra
UI\n\n---------\n\nCo-authored-by: Elastic Machine
<elasticmachine@users.noreply.github.com>","sha":"c3c9c78fdd5b12c4abf7784e1521557e712a4c22","branchLabelMapping":{"^v9.4.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Presentation","release_note:skip","backport:version","v9.2.0","v9.3.0","v9.4.0"],"title":"[Infra][Hosts]
Fix inventory Network Inbound and Outbound alert
rules","number":251855,"url":"https://github.com/elastic/kibana/pull/251855","mergeCommit":{"message":"[Infra][Hosts]
Fix inventory Network Inbound and Outbound alert rules
(#251855)\n\nfixes https://github.com/elastic/kibana/issues/251854\n\n##
Summary\n\nThis PR fixes the network inbound and outbound alert
executors. There\nwere basically 2 issues:\n\n- OTel multi-dimension
aggregation: The alert was not handling the\nfilter-wrapped aggregation
pattern used by `rxV2`/`txV2` metrics,\ncausing the query to fail.\n-
Missing bits-to-bytes conversion: The threshold conversion (÷8)
was\nimplemented for `rx`/`tx` but missing for `rxV2`/`txV2`,
causing\nthreshold comparisons to be off by 8x.\n\nOtel\n<img
width=\"800\" height=\"702\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/14481a73-3481-4605-b554-64bf645810ee\"\n/>\n\nECS\n<img
width=\"800\" height=\"813\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/82096690-ea1a-4372-a3de-65565fe35b9d\"\n/>\n\n###
how to test\n\n- Otel: \n- Run: `./forge --dataset hosts --format otel
--interval 30s`\n(https://github.com/simianhacker/simian-forge)\n -
Create Network Inbound and Outbound metrics in the Infra UI \n- ECS:\n -
Run `node scripts/synthtrace infra_hosts_ecs.ts --live`\n - Create
Network Inbound and Outbound metrics in the Infra
UI\n\n---------\n\nCo-authored-by: Elastic Machine
<elasticmachine@users.noreply.github.com>","sha":"c3c9c78fdd5b12c4abf7784e1521557e712a4c22"}},"sourceBranch":"main","suggestedTargetBranches":["9.2","9.3"],"targetPullRequestStates":[{"branch":"9.2","label":"v9.2.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.3","label":"v9.3.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.4.0","branchLabelMappingKey":"^v9.4.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/251855","number":251855,"mergeCommit":{"message":"[Infra][Hosts]
Fix inventory Network Inbound and Outbound alert rules
(#251855)\n\nfixes https://github.com/elastic/kibana/issues/251854\n\n##
Summary\n\nThis PR fixes the network inbound and outbound alert
executors. There\nwere basically 2 issues:\n\n- OTel multi-dimension
aggregation: The alert was not handling the\nfilter-wrapped aggregation
pattern used by `rxV2`/`txV2` metrics,\ncausing the query to fail.\n-
Missing bits-to-bytes conversion: The threshold conversion (÷8)
was\nimplemented for `rx`/`tx` but missing for `rxV2`/`txV2`,
causing\nthreshold comparisons to be off by 8x.\n\nOtel\n<img
width=\"800\" height=\"702\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/14481a73-3481-4605-b554-64bf645810ee\"\n/>\n\nECS\n<img
width=\"800\" height=\"813\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/82096690-ea1a-4372-a3de-65565fe35b9d\"\n/>\n\n###
how to test\n\n- Otel: \n- Run: `./forge --dataset hosts --format otel
--interval 30s`\n(https://github.com/simianhacker/simian-forge)\n -
Create Network Inbound and Outbound metrics in the Infra UI \n- ECS:\n -
Run `node scripts/synthtrace infra_hosts_ecs.ts --live`\n - Create
Network Inbound and Outbound metrics in the Infra
UI\n\n---------\n\nCo-authored-by: Elastic Machine
<elasticmachine@users.noreply.github.com>","sha":"c3c9c78fdd5b12c4abf7784e1521557e712a4c22"}}]}]
BACKPORT-->

Co-authored-by: Carlos Crespo <crespocarlos@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:version Backport to applied version labels release_note:skip Skip the PR/issue when compiling release notes Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas t// v9.2.0 v9.2.6 v9.3.0 v9.4.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Infra][Hosts] Network inbound and outbound metrics don't work

5 participants