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

Agent: Allow custom response properties in the action response #28575

Merged
merged 3 commits into from
Oct 21, 2021

Conversation

aleksmaus
Copy link
Member

What does this PR do?

Allow custom response properties in the action response

This allows to store a small payload from the beat/app action response if needed.
Currently this feature is needed for endpoint and could be useful for osquerybeat actions.

The endpoint team is hoping to get this into 7.16 if possible.

Related issues

Screenshots

Confirmed mapping is created:
Screen Shot 2021-10-20 at 4 10 34 PM

Confirmed the data is indexed and searchable with osquerybeat that now provides the number of rows returned by the query:
Screen Shot 2021-10-20 at 4 10 58 PM

@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Oct 20, 2021
@aleksmaus aleksmaus requested a review from kevinlog October 20, 2021 20:42
@mergify
Copy link
Contributor

mergify bot commented Oct 20, 2021

This pull request does not have a backport label. Could you fix it @aleksmaus? 🙏
To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-v./d./d./d is the label to automatically backport to the 7./d branch. /d is the digit

NOTE: backport-skip has been added to this pull request.

@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Oct 20, 2021
@mergify mergify bot added the backport-skip Skip notification from the automated backport with mergify label Oct 20, 2021
@aleksmaus aleksmaus added backport-v7.16.0 Automated backport with mergify needs_team Indicates that the issue/PR needs a Team:* label v7.16.0 and removed backport-skip Skip notification from the automated backport with mergify labels Oct 20, 2021
@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Oct 20, 2021
@botelastic
Copy link

botelastic bot commented Oct 20, 2021

This pull request doesn't have a Team:<team> label.

@aleksmaus aleksmaus changed the title Allow custom response properties in the action response Agent: Allow custom response properties in the action response Oct 20, 2021
@elasticmachine
Copy link
Collaborator

elasticmachine commented Oct 20, 2021

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2021-10-21T18:27:03.695+0000

  • Duration: 12 min 17 sec

  • Commit: 95295a6

❕ Flaky test report

No test was executed to be analysed.

🤖 GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

  • /package : Generate the packages and run the E2E tests.

  • /beats-tester : Run the installation tests with beats-tester.

Copy link
Contributor

@lykkin lykkin left a comment

Choose a reason for hiding this comment

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

LGTM

seems like there could be some use for selectively copying response values over (i.e. configurable excludeActionResponseFields set), but cross that bridge when/if we get there.

@aleksmaus
Copy link
Member Author

/test

@aleksmaus
Copy link
Member Author

/test

@aleksmaus aleksmaus merged commit 7b162dc into elastic:master Oct 21, 2021
mergify bot pushed a commit that referenced this pull request Oct 21, 2021
* Allow custom response properties in the action response

* ActionApp.Response is optional

(cherry picked from commit 7b162dc)
aleksmaus added a commit that referenced this pull request Oct 22, 2021
… (#28594)

* Allow custom response properties in the action response

* ActionApp.Response is optional

(cherry picked from commit 7b162dc)

Co-authored-by: Aleksandr Maus <[email protected]>
v1v added a commit to v1v/beats that referenced this pull request Oct 26, 2021
…urnalbeat-ci

* upstream/master: (49 commits)
  [CI]: use the downstream packaging pipeline for branches/tags (elastic#28589)
  fix: use declarative style for complete variant of the elastic-agent (elastic#28526)
  x-pack/auditbeat/tracing: fix regexp for kprobe description line (elastic#28609)
  docs: Update `api_key` example on elasticsearch output (elastic#28606)
  chore: add build scripts to CODEOWNERS (elastic#28615)
  Osquerybeat: Fix host_processes missing cmdline arguments (elastic#28622)
  Add note about changes to regexp package in Golang (elastic#28616)
  CI: nightly/weekly builds for 7.x targeting 7.16 instead (elastic#28612)
  Osquerybeat: Fix extenstion unable to start on windows (elastic#28598)
  Osquerybeat: Return the query result count with the action response (elastic#28576)
  Agent: Allow custom response properties in the action response (elastic#28575)
  [Heartbeat] Only setuid in elastic-agent image (elastic#28577)
  Fix formatting of `mapStateJSON` and `layerListJSON` in dashboard assets (elastic#28530)
  CI: refactor the run e2e build (elastic#28502)
  Use fsnotify with long windows name-safe changes (elastic#28517)
  Remove unneeded mergify config
  backport: Add 7.16 branch (elastic#28560)
  Add proxy_url support to threatintel module's malwarebazaar fileset (elastic#28533)
  Osquerybeat: Implement host_users, host_groups, host_processes tables as a part of our osquery_extension. (elastic#28434)
  [Heartbeat] Make run_once syntax a boolean (elastic#28548)
  ...
Icedroid pushed a commit to Icedroid/beats that referenced this pull request Nov 1, 2021
…ic#28575)

* Allow custom response properties in the action response

* ActionApp.Response is optional
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants