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

[O11y][Salesforce] Add support of the interval parameter in Salesforce setupaudittrail-rest fileset. #35938

Merged

Conversation

kush-elastic
Copy link
Collaborator

@kush-elastic kush-elastic commented Jun 28, 2023

Urgency

  • High

Activity Type

  • Enhancement

What does this PR do?

  • Add support of the interval parameter in Salesforce setupaudittrail-rest fileset.
  • Improve documentation for the same to explain more in detail how salesforce data collection frequency works for setupaudittrail-rest fileset.

Checklist

  • My code follows the style guidelines of this project
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.

Related issues

@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Jun 28, 2023
@kush-elastic kush-elastic self-assigned this Jun 28, 2023
@mergify
Copy link
Contributor

mergify bot commented Jun 28, 2023

This pull request does not have a backport label.
If this is a bug or security fix, could you label this PR @kush-elastic? 🙏.
For such, you'll need to label your PR with:

  • The upcoming major version of the Elastic Stack
  • The upcoming minor version of the Elastic Stack (if you're not pushing a breaking change)

To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-v8./d.0 is the label to automatically backport to the 8./d branch. /d is the digit

@kush-elastic kush-elastic added enhancement Filebeat Filebeat and removed needs_team Indicates that the issue/PR needs a Team:* label labels Jun 28, 2023
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Jun 28, 2023
@elasticmachine
Copy link
Collaborator

elasticmachine commented Jun 28, 2023

💚 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: 2023-08-14T06:36:39.011+0000

  • Duration: 81 min 46 sec

Test stats 🧪

Test Results
Failed 0
Passed 8156
Skipped 755
Total 8911

💚 Flaky test report

Tests succeeded.

🤖 GitHub comments

Expand to view the 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.

  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@mergify
Copy link
Contributor

mergify bot commented Jun 28, 2023

This pull request is now in conflicts. Could you fix it? 🙏
To fixup this pull request, you can check out it locally. See documentation: https://help.github.com/articles/checking-out-pull-requests-locally/

git fetch upstream
git checkout -b salesforce-setupaudittrail-interval upstream/salesforce-setupaudittrail-interval
git merge upstream/main
git push upstream salesforce-setupaudittrail-interval

@kush-elastic kush-elastic marked this pull request as ready for review June 29, 2023 05:15
@kush-elastic kush-elastic requested review from a team as code owners June 29, 2023 05:15
Copy link
Contributor

@agithomas agithomas left a comment

Choose a reason for hiding this comment

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

LGTM!

@lalit-satapathy
Copy link
Contributor

@kush-elastic,

  • Is there any error check in beats code, if user provide a bad value/syntax for the var.interval or salesforce will give error and the module with exit gracefully? Can you provide the exact errors for this scenario.
  • the default value of interval is 1h? Can we make that explicit in the document?
  • Still concerned, what happens if user gives low value or very high values? Could not find any specific recommendation in this doc for var.limit

@kush-elastic
Copy link
Collaborator Author

kush-elastic commented Jul 17, 2023

@kush-elastic,

  • Is there any error check in beats code, if user provide a bad value/syntax for the var.interval or salesforce will give error and the module with exit gracefully? Can you provide the exact errors for this scenario.

Yes, there is an error check in inbuilt beats code. If a user provides a bad value/syntax error for the var.interval. User can see the error.message in the logs.

Error message: Exiting: Failed to start crawler: creating module reloader failed: error checking input configuration: runner factory could not check config: time: invalid duration "1hrs" accessing 'interval'
  • the default value of interval is 1h? Can we make that explicit in the document?
  • Still concerned, what happens if user gives low value or very high values? Could not find any specific recommendation in this doc for var.limit

We can provide the Note in the document itself. Let me know if the following Note will resolve your concerns so we can update it accordingly.

Note: The default value of `var.interval` is 1h. It is important to exercise caution when reducing the interval, as it directly affects the API rate limit of the Salesforce instance. Salesforce API rate limit is ~1000 API calls per hour. Hence if user goes with lower limit of var.interval, the Salesforce API rate limit will exceed and any additional API requests beyond the limit will result in an error response from the Salesforce API. The error message will typically indicate that the rate limit has been exceeded.. Please refer to the following link for the https://developer.salesforce.com/docs/atlas.en-us.salesforce_app_limits_cheatsheet.meta/salesforce_app_limits_cheatsheet/salesforce_app_limits_platform_api.htm [Salesforce API Rate Limit].

@lalit-satapathy
Copy link
Contributor

Note: The default value of var.interval is 1h. It is important to exercise caution when reducing the interval, as it directly affects the API rate limit of the Salesforce instance. Salesforce API rate limit is ~1000 API calls per hour. Hence if user goes with lower limit of var.interval, the Salesforce API rate limit will exceed and any additional API requests beyond the limit will result in an error response from the Salesforce API. The error message will typically indicate that the rate limit has been exceeded.. Please refer to the following link for the https://developer.salesforce.com/docs/atlas.en-us.salesforce_app_limits_cheatsheet.meta/salesforce_app_limits_cheatsheet/salesforce_app_limits_platform_api.htm [Salesforce API Rate Limit].

Yes this is better.

Copy link
Contributor

@lalit-satapathy lalit-satapathy left a comment

Choose a reason for hiding this comment

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

LGTM

@lalit-satapathy
Copy link
Contributor

@kush-elastic, Lets raise a seprate PR to update the CODEOWNER for the beats module: /x-pack/filebeat/module/salesforce to @elastic/obs-infraobs-integrations

@kush-elastic kush-elastic requested a review from a team as a code owner July 26, 2023 08:30
@mergify
Copy link
Contributor

mergify bot commented Aug 13, 2023

This pull request is now in conflicts. Could you fix it? 🙏
To fixup this pull request, you can check out it locally. See documentation: https://help.github.com/articles/checking-out-pull-requests-locally/

git fetch upstream
git checkout -b salesforce-setupaudittrail-interval upstream/salesforce-setupaudittrail-interval
git merge upstream/main
git push upstream salesforce-setupaudittrail-interval

@pierrehilbert pierrehilbert added the Team:Elastic-Agent Label for the Agent team label Aug 14, 2023
@elasticmachine
Copy link
Collaborator

Pinging @elastic/elastic-agent (Team:Elastic-Agent)

@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Aug 14, 2023
Copy link
Collaborator

@pierrehilbert pierrehilbert left a comment

Choose a reason for hiding this comment

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

Please remove the CHANGELOG.asciidoc entry and I will approve the PR

CHANGELOG.asciidoc Outdated Show resolved Hide resolved
Copy link
Collaborator

@pierrehilbert pierrehilbert left a comment

Choose a reason for hiding this comment

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

LGTM

@kush-elastic kush-elastic merged commit c7d587c into elastic:main Aug 14, 2023
28 checks passed
Scholar-Li pushed a commit to Scholar-Li/beats that referenced this pull request Feb 5, 2024
…rce `setupaudittrail-rest` fileset. (elastic#35938)

* add interval for setupaudittrail fileset

* add changelog.asciidoc entry

* add changelog.next.asciidoc entry

* run make check command

* run make update command

* update note as per review comment

* make check command

* remove CHANGELOG.asciidoc entry
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Filebeat Filebeat Team:Elastic-Agent Label for the Agent team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Filebeat][Salesforce] Add support of interval parameter in Salesforce setupaudittrail-rest fileset
6 participants