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

Increase maximum Osquery timeout to 24 hours #207276

Merged
merged 3 commits into from
Jan 31, 2025

Conversation

mjwolf
Copy link
Contributor

@mjwolf mjwolf commented Jan 21, 2025

Summary

Some Osquery queries are expected to be long running. To accommodate this, increase the maximum timeout in the query creation UI to 24 hours (86400 seconds).

24 hours should allow most long-running queries, while still having a limit that ensures misbehaving queries do not block others for an extremely long time.

Relates to elastic/beats#42352. Osquerybeat will also increase its timeout limit to 24h, this change will allow the higher timeout to be set by users in Kibana.

Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

  • [ ] Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n support
  • [ ] Documentation was added for features that require explanation or tutorials
  • Unit or functional tests were updated or added to match the most common scenarios
  • ~~[ ] If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the docker list
  • This was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The release_note:breaking label should be applied in these situations.
  • Flaky Test Runner was used on any tests changed
  • The PR description includes the appropriate Release Notes section, and the correct release_note:* label is applied per the guidelines

Identify risks

This needs to go with the Beats PR to increase the max timeout in osquerybeat. This should be done by releasing both changes in the same versions (targeting 9.0 and 8.18).

But if it's not done, and Kibana or Beats/Agent do not get the same matching changes, there should be no serious problems. If Kibana isn't changed, it won't be able to configure a max timeout higher than what osquerybeat supports. If osquerybeat is not changed, it has logic that will lower any set timeout above it's max timeout to its max timeout, so the higher timeout from Kibana will not apply, but the query will not break.

@mjwolf mjwolf requested a review from a team as a code owner January 21, 2025 00:24
@mjwolf mjwolf added the backport:prev-major Backport to (8.x, 8.18, 8.17, 8.16) the previous major branch and other branches in development label Jan 21, 2025
@paul-tavares paul-tavares requested review from tomsonpl and removed request for paul-tavares January 21, 2025 13:55
@mjwolf mjwolf force-pushed the osquery_increase_timeout branch from 6591976 to 4a4b53c Compare January 21, 2025 17:48
Some Osquery queries are expected to be long running. To accommodate
this, increase the maximum timeout in the query creation UI to 24 hours
(86400 seconds).

24 hours should allow most long-running queries, while still having a
limit that ensures misbehaving queries do not block others for an
extremely long time.
Copy link
Contributor

@tomsonpl tomsonpl left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@mjwolf mjwolf enabled auto-merge (squash) January 30, 2025 22:52
@mjwolf mjwolf merged commit 81a57e0 into elastic:main Jan 31, 2025
9 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.16, 8.17, 8.18, 8.x

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

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Page load bundle

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

id before after diff
osquery 44.7KB 44.7KB +2.0B

History

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Jan 31, 2025
Some Osquery queries are expected to be long running. To accommodate
this, increase the maximum timeout in the query creation UI to 24 hours
(86400 seconds).

24 hours should allow most long-running queries, while still having a
limit that ensures misbehaving queries do not block others for an
extremely long time.

Relates to elastic/beats#42352. Osquerybeat
will also increase its timeout limit to 24h, this change will allow the
higher timeout to be set by users in Kibana.

(cherry picked from commit 81a57e0)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Jan 31, 2025
Some Osquery queries are expected to be long running. To accommodate
this, increase the maximum timeout in the query creation UI to 24 hours
(86400 seconds).

24 hours should allow most long-running queries, while still having a
limit that ensures misbehaving queries do not block others for an
extremely long time.

Relates to elastic/beats#42352. Osquerybeat
will also increase its timeout limit to 24h, this change will allow the
higher timeout to be set by users in Kibana.

(cherry picked from commit 81a57e0)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Jan 31, 2025
Some Osquery queries are expected to be long running. To accommodate
this, increase the maximum timeout in the query creation UI to 24 hours
(86400 seconds).

24 hours should allow most long-running queries, while still having a
limit that ensures misbehaving queries do not block others for an
extremely long time.

Relates to elastic/beats#42352. Osquerybeat
will also increase its timeout limit to 24h, this change will allow the
higher timeout to be set by users in Kibana.

(cherry picked from commit 81a57e0)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Jan 31, 2025
Some Osquery queries are expected to be long running. To accommodate
this, increase the maximum timeout in the query creation UI to 24 hours
(86400 seconds).

24 hours should allow most long-running queries, while still having a
limit that ensures misbehaving queries do not block others for an
extremely long time.

Relates to elastic/beats#42352. Osquerybeat
will also increase its timeout limit to 24h, this change will allow the
higher timeout to be set by users in Kibana.

(cherry picked from commit 81a57e0)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.16
8.17
8.18
8.x

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 Jan 31, 2025
# Backport

This will backport the following commits from `main` to `8.x`:
- [Increase maximum Osquery timeout to 24 hours
(#207276)](#207276)

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

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

<!--BACKPORT [{"author":{"name":"Michael
Wolf","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-01-31T00:18:47Z","message":"Increase
maximum Osquery timeout to 24 hours (#207276)\n\nSome Osquery queries
are expected to be long running. To accommodate\r\nthis, increase the
maximum timeout in the query creation UI to 24 hours\r\n(86400
seconds).\r\n\r\n24 hours should allow most long-running queries, while
still having a\r\nlimit that ensures misbehaving queries do not block
others for an\r\nextremely long time.\r\n\r\nRelates to
elastic/beats#42352. Osquerybeat\r\nwill also
increase its timeout limit to 24h, this change will allow the\r\nhigher
timeout to be set by users in
Kibana.","sha":"81a57e005ed0a6b72a254056813b1c6ee633da1f","branchLabelMapping":{"^v9.0.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:enhancement","v9.0.0","backport:prev-major"],"title":"Increase
maximum Osquery timeout to 24
hours","number":207276,"url":"https://github.com/elastic/kibana/pull/207276","mergeCommit":{"message":"Increase
maximum Osquery timeout to 24 hours (#207276)\n\nSome Osquery queries
are expected to be long running. To accommodate\r\nthis, increase the
maximum timeout in the query creation UI to 24 hours\r\n(86400
seconds).\r\n\r\n24 hours should allow most long-running queries, while
still having a\r\nlimit that ensures misbehaving queries do not block
others for an\r\nextremely long time.\r\n\r\nRelates to
elastic/beats#42352. Osquerybeat\r\nwill also
increase its timeout limit to 24h, this change will allow the\r\nhigher
timeout to be set by users in
Kibana.","sha":"81a57e005ed0a6b72a254056813b1c6ee633da1f"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/207276","number":207276,"mergeCommit":{"message":"Increase
maximum Osquery timeout to 24 hours (#207276)\n\nSome Osquery queries
are expected to be long running. To accommodate\r\nthis, increase the
maximum timeout in the query creation UI to 24 hours\r\n(86400
seconds).\r\n\r\n24 hours should allow most long-running queries, while
still having a\r\nlimit that ensures misbehaving queries do not block
others for an\r\nextremely long time.\r\n\r\nRelates to
elastic/beats#42352. Osquerybeat\r\nwill also
increase its timeout limit to 24h, this change will allow the\r\nhigher
timeout to be set by users in
Kibana.","sha":"81a57e005ed0a6b72a254056813b1c6ee633da1f"}}]}]
BACKPORT-->

Co-authored-by: Michael Wolf <[email protected]>
kibanamachine added a commit that referenced this pull request Jan 31, 2025
# Backport

This will backport the following commits from `main` to `8.17`:
- [Increase maximum Osquery timeout to 24 hours
(#207276)](#207276)

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

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

<!--BACKPORT [{"author":{"name":"Michael
Wolf","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-01-31T00:18:47Z","message":"Increase
maximum Osquery timeout to 24 hours (#207276)\n\nSome Osquery queries
are expected to be long running. To accommodate\r\nthis, increase the
maximum timeout in the query creation UI to 24 hours\r\n(86400
seconds).\r\n\r\n24 hours should allow most long-running queries, while
still having a\r\nlimit that ensures misbehaving queries do not block
others for an\r\nextremely long time.\r\n\r\nRelates to
elastic/beats#42352. Osquerybeat\r\nwill also
increase its timeout limit to 24h, this change will allow the\r\nhigher
timeout to be set by users in
Kibana.","sha":"81a57e005ed0a6b72a254056813b1c6ee633da1f","branchLabelMapping":{"^v9.0.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:enhancement","v9.0.0","backport:prev-major"],"title":"Increase
maximum Osquery timeout to 24
hours","number":207276,"url":"https://github.com/elastic/kibana/pull/207276","mergeCommit":{"message":"Increase
maximum Osquery timeout to 24 hours (#207276)\n\nSome Osquery queries
are expected to be long running. To accommodate\r\nthis, increase the
maximum timeout in the query creation UI to 24 hours\r\n(86400
seconds).\r\n\r\n24 hours should allow most long-running queries, while
still having a\r\nlimit that ensures misbehaving queries do not block
others for an\r\nextremely long time.\r\n\r\nRelates to
elastic/beats#42352. Osquerybeat\r\nwill also
increase its timeout limit to 24h, this change will allow the\r\nhigher
timeout to be set by users in
Kibana.","sha":"81a57e005ed0a6b72a254056813b1c6ee633da1f"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/207276","number":207276,"mergeCommit":{"message":"Increase
maximum Osquery timeout to 24 hours (#207276)\n\nSome Osquery queries
are expected to be long running. To accommodate\r\nthis, increase the
maximum timeout in the query creation UI to 24 hours\r\n(86400
seconds).\r\n\r\n24 hours should allow most long-running queries, while
still having a\r\nlimit that ensures misbehaving queries do not block
others for an\r\nextremely long time.\r\n\r\nRelates to
elastic/beats#42352. Osquerybeat\r\nwill also
increase its timeout limit to 24h, this change will allow the\r\nhigher
timeout to be set by users in
Kibana.","sha":"81a57e005ed0a6b72a254056813b1c6ee633da1f"}}]}]
BACKPORT-->

Co-authored-by: Michael Wolf <[email protected]>
kibanamachine added a commit that referenced this pull request Jan 31, 2025
# Backport

This will backport the following commits from `main` to `8.16`:
- [Increase maximum Osquery timeout to 24 hours
(#207276)](#207276)

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

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

<!--BACKPORT [{"author":{"name":"Michael
Wolf","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-01-31T00:18:47Z","message":"Increase
maximum Osquery timeout to 24 hours (#207276)\n\nSome Osquery queries
are expected to be long running. To accommodate\r\nthis, increase the
maximum timeout in the query creation UI to 24 hours\r\n(86400
seconds).\r\n\r\n24 hours should allow most long-running queries, while
still having a\r\nlimit that ensures misbehaving queries do not block
others for an\r\nextremely long time.\r\n\r\nRelates to
elastic/beats#42352. Osquerybeat\r\nwill also
increase its timeout limit to 24h, this change will allow the\r\nhigher
timeout to be set by users in
Kibana.","sha":"81a57e005ed0a6b72a254056813b1c6ee633da1f","branchLabelMapping":{"^v9.0.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:enhancement","v9.0.0","backport:prev-major"],"title":"Increase
maximum Osquery timeout to 24
hours","number":207276,"url":"https://github.com/elastic/kibana/pull/207276","mergeCommit":{"message":"Increase
maximum Osquery timeout to 24 hours (#207276)\n\nSome Osquery queries
are expected to be long running. To accommodate\r\nthis, increase the
maximum timeout in the query creation UI to 24 hours\r\n(86400
seconds).\r\n\r\n24 hours should allow most long-running queries, while
still having a\r\nlimit that ensures misbehaving queries do not block
others for an\r\nextremely long time.\r\n\r\nRelates to
elastic/beats#42352. Osquerybeat\r\nwill also
increase its timeout limit to 24h, this change will allow the\r\nhigher
timeout to be set by users in
Kibana.","sha":"81a57e005ed0a6b72a254056813b1c6ee633da1f"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/207276","number":207276,"mergeCommit":{"message":"Increase
maximum Osquery timeout to 24 hours (#207276)\n\nSome Osquery queries
are expected to be long running. To accommodate\r\nthis, increase the
maximum timeout in the query creation UI to 24 hours\r\n(86400
seconds).\r\n\r\n24 hours should allow most long-running queries, while
still having a\r\nlimit that ensures misbehaving queries do not block
others for an\r\nextremely long time.\r\n\r\nRelates to
elastic/beats#42352. Osquerybeat\r\nwill also
increase its timeout limit to 24h, this change will allow the\r\nhigher
timeout to be set by users in
Kibana.","sha":"81a57e005ed0a6b72a254056813b1c6ee633da1f"}}]}]
BACKPORT-->

Co-authored-by: Michael Wolf <[email protected]>
kibanamachine added a commit that referenced this pull request Jan 31, 2025
# Backport

This will backport the following commits from `main` to `8.18`:
- [Increase maximum Osquery timeout to 24 hours
(#207276)](#207276)

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

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

<!--BACKPORT [{"author":{"name":"Michael
Wolf","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-01-31T00:18:47Z","message":"Increase
maximum Osquery timeout to 24 hours (#207276)\n\nSome Osquery queries
are expected to be long running. To accommodate\r\nthis, increase the
maximum timeout in the query creation UI to 24 hours\r\n(86400
seconds).\r\n\r\n24 hours should allow most long-running queries, while
still having a\r\nlimit that ensures misbehaving queries do not block
others for an\r\nextremely long time.\r\n\r\nRelates to
elastic/beats#42352. Osquerybeat\r\nwill also
increase its timeout limit to 24h, this change will allow the\r\nhigher
timeout to be set by users in
Kibana.","sha":"81a57e005ed0a6b72a254056813b1c6ee633da1f","branchLabelMapping":{"^v9.0.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:enhancement","v9.0.0","backport:prev-major"],"title":"Increase
maximum Osquery timeout to 24
hours","number":207276,"url":"https://github.com/elastic/kibana/pull/207276","mergeCommit":{"message":"Increase
maximum Osquery timeout to 24 hours (#207276)\n\nSome Osquery queries
are expected to be long running. To accommodate\r\nthis, increase the
maximum timeout in the query creation UI to 24 hours\r\n(86400
seconds).\r\n\r\n24 hours should allow most long-running queries, while
still having a\r\nlimit that ensures misbehaving queries do not block
others for an\r\nextremely long time.\r\n\r\nRelates to
elastic/beats#42352. Osquerybeat\r\nwill also
increase its timeout limit to 24h, this change will allow the\r\nhigher
timeout to be set by users in
Kibana.","sha":"81a57e005ed0a6b72a254056813b1c6ee633da1f"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/207276","number":207276,"mergeCommit":{"message":"Increase
maximum Osquery timeout to 24 hours (#207276)\n\nSome Osquery queries
are expected to be long running. To accommodate\r\nthis, increase the
maximum timeout in the query creation UI to 24 hours\r\n(86400
seconds).\r\n\r\n24 hours should allow most long-running queries, while
still having a\r\nlimit that ensures misbehaving queries do not block
others for an\r\nextremely long time.\r\n\r\nRelates to
elastic/beats#42352. Osquerybeat\r\nwill also
increase its timeout limit to 24h, this change will allow the\r\nhigher
timeout to be set by users in
Kibana.","sha":"81a57e005ed0a6b72a254056813b1c6ee633da1f"}}]}]
BACKPORT-->

Co-authored-by: Michael Wolf <[email protected]>
@mjwolf mjwolf deleted the osquery_increase_timeout branch February 1, 2025 00:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:prev-major Backport to (8.x, 8.18, 8.17, 8.16) the previous major branch and other branches in development release_note:enhancement v8.16.4 v8.17.2 v8.18.0 v8.19.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants