Skip to content

[Carbon Black Cloud] - Make rows_per_page in alerts_v7 data stream configurable and cap it at a maximum value of 10000 - #16960

Merged
ShourieG merged 3 commits into
elastic:mainfrom
ShourieG:bugfix/carbon_balck_6762
Jan 15, 2026
Merged

[Carbon Black Cloud] - Make rows_per_page in alerts_v7 data stream configurable and cap it at a maximum value of 10000#16960
ShourieG merged 3 commits into
elastic:mainfrom
ShourieG:bugfix/carbon_balck_6762

Conversation

@ShourieG

@ShourieG ShourieG commented Jan 14, 2026

Copy link
Copy Markdown
Contributor

Type of change

  • Enhancement

Proposed commit message

carbon_black_cloud: Make rows_per_page in alerts_v7 data stream configurable 
and cap it at a maximum value of 10000.

Added configurable rows_per_page setting to Carbon Black Cloud alert_v7 data stream 
with default of 100. Values exceeding the API maximum of 10000 are automatically capped. 
Having this option configurable helps us avoid scenarios where we encounter errors related 
to CEL executions due to having a large volume of alerts.

NOTE:

According to official docs, the max value of rows_per_page is 10000.

Checklist

  • I have reviewed tips for building integrations and this pull request is aligned with them.
  • I have verified that all data streams collect metrics or logs.
  • I have added an entry to my package's changelog.yml file.
  • I have verified that Kibana version constraints are current according to guidelines.
  • I have verified that any added dashboard complies with Kibana's Dashboard good practices

Author's Checklist

  • [ ]

How to test this PR locally

Related issues

Screenshots

@ShourieG ShourieG self-assigned this Jan 14, 2026
@ShourieG ShourieG added Integration:carbon_black_cloud VMware Carbon Black Cloud enhancement New feature or request Team:Security-Service Integrations Security Service Integrations team [elastic/security-service-integrations] labels Jan 14, 2026
@ShourieG
ShourieG marked this pull request as ready for review January 14, 2026 13:51
@ShourieG
ShourieG requested a review from a team as a code owner January 14, 2026 13:51
@elasticmachine

Copy link
Copy Markdown

Pinging @elastic/security-service-integrations (Team:Security-Service Integrations)

}),
"rows": state.rows_per_page,
// Cap rows_per_page to maximum value of 10000.
"rows": (state.rows_per_page > 10000) ? 10000 : state.rows_per_page,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It seems that the indentation of this variable is making system tests fail with:

ERROR: could not add data stream config to policy: could not add package to policy; API status code = 400; response body = {"statusCode":400,"error":"Bad Request","message":"tab characters must not be used in indentation (68:1)\n\n 65 |   →→→→→→)\n 66 |   →→→→→:\n 67 |   →→→→→→state.?cursor.last_back ...\n 68 | →→→→},\n------^\n 69 | →→→→\"want_more\": body.num_found ...\n 70 |   →→→}"}

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.

did a celfmt format, should fix the tab issue as well as have better code formatting

@elastic-vault-github-plugin-prod

Copy link
Copy Markdown
Contributor

🚀 Benchmarks report

Package carbon_black_cloud 👍(2) 💚(2) 💔(1)

Expand to view
Data stream Previous EPS New EPS Diff (%) Result
asset_vulnerability_summary 15384.62 11363.64 -4020.98 (-26.14%) 💔

To see the full report comment with /test benchmark fullreport

@elasticmachine

Copy link
Copy Markdown

💚 Build Succeeded

History

cc @ShourieG

@chemamartinez chemamartinez left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@ShourieG
ShourieG merged commit 9e058db into elastic:main Jan 15, 2026
8 checks passed
@ShourieG
ShourieG deleted the bugfix/carbon_balck_6762 branch January 15, 2026 08:06
@elastic-vault-github-plugin-prod

Copy link
Copy Markdown
Contributor

Package carbon_black_cloud - 4.2.0 containing this change is available at https://epr.elastic.co/package/carbon_black_cloud/4.2.0/

jakubgalecki0 pushed a commit to jakubgalecki0/integrations that referenced this pull request Feb 19, 2026
…nfigurable and cap it at a maximum value of 10000 (elastic#16960)

carbon_black_cloud: Make rows_per_page in alerts_v7 data stream configurable 
and cap it at a maximum value of 10000.

Added configurable rows_per_page setting to Carbon Black Cloud alert_v7 data stream 
with default of 100. Values exceeding the API maximum of 10000 are automatically capped. 
Having this option configurable helps us avoid scenarios where we encounter errors related 
to CEL executions due to having a large volume of alerts.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request Integration:carbon_black_cloud VMware Carbon Black Cloud Team:Security-Service Integrations Security Service Integrations team [elastic/security-service-integrations]

3 participants