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

[Marketplace Contribution] XQLDSHelper #37968

Conversation

xsoar-bot
Copy link
Contributor

Status

  • In Progress
  • Ready
  • In Hold - (Reason for hold)

Contributor

@spearmin10

Description

Run an XQL query and creates an entry for the General Purpose Dynamic Section to display a graph or table widget based on the results. The query is executed by the xdr-xql-generic-query command.

Auto-Generated Documentation Requiring Modification

Video Link

パスコード: 1Q8$AzL4=whttps://paloaltonetworks.zoom.us/rec/share/SY1BApnqiRxHh2XVIKfNbeqTRDRewffOSRVrzZbB5fR6AaXWY5ZdCI6Frv_7CPR_.alyDA9k25UZZ5Yfx

@CLAassistant
Copy link

CLAassistant commented Jan 7, 2025

CLA assistant check
All committers have signed the CLA.

@content-bot content-bot added Contribution Thank you! Contributions are always welcome! External PR Community Support Level Indicates that the contribution is for Community supported pack labels Jan 7, 2025
@content-bot content-bot changed the base branch from master to contrib/xsoar-contrib_spearmin10-contrib-XQLDSHelper January 7, 2025 07:17
@content-bot content-bot requested a review from talzich January 7, 2025 07:17
@content-bot
Copy link
Collaborator

Thank you for your contribution. Your generosity and caring are unrivaled! Rest assured - our content wizard @talzich will very shortly look over your proposed changes.
For your convenience, here is a link to the contributions SLAs document.

@content-bot
Copy link
Collaborator

Thanks for contributing to the XSOAR marketplace. To receive credit for your generous contribution, please ask the reviewer to update your information in the pack contributors file. See more information here link

@content-bot content-bot added the Contribution Form Filled Whether contribution form filled or not. label Jan 7, 2025
@spearmin10
Copy link
Contributor

Hi @talzich I've fixed them. Could you please review again?

@talzich
Copy link
Contributor

talzich commented Jan 26, 2025

@spearmin10 I think we had a misunderstanding. I don't see the the query time limitation mechanism we discussed. To be clear, I was talking about limiting the overall time all the queries take. e.g if you run 2 queries, the first takes 5 seconds and the second takes 6 seconds, a third try should not be executed.

If that indeed what you implemented and I missed it, please let me know so I could take another look.

@spearmin10
Copy link
Contributor

spearmin10 commented Jan 26, 2025

@spearmin10 I think we had a misunderstanding. I don't see the the query time limitation mechanism we discussed. To be clear, I was talking about limiting the overall time all the queries take. e.g if you run 2 queries, the first takes 5 seconds and the second takes 6 seconds, a third try should not be executed.

If that indeed what you implemented and I missed it, please let me know so I could take another look.

@talzich I'm not sure if this is what you meant, but I've added Query Execution Timeout and Retry Limits section in the readme to make it clear. Is it correct?

@spearmin10
Copy link
Contributor

@talzich I misunderstood. I've modified the script to set a maximum duration for the query.

@talzich
Copy link
Contributor

talzich commented Jan 27, 2025

Yes, your latest change is what I meant. However, 180 seconds is too much. Do you believe this is the time required to complete all the queries? If so, we will need to have a different solution

@spearmin10
Copy link
Contributor

@talzich I set it to 180 seconds, as it matches the default timeout value of 180 seconds in XSOAR. It can be adjusted by the argument parameter if needed. The actual time it takes depends on things like how many times the script is run in parallel and the amount of data being queried, so it’s difficult to estimate. I think if a user sets 5 or fewer widgets on a single dashboard, 60 seconds should be enough. However, if more widgets are added to the dashboard, it will likely take more time.

@spearmin10
Copy link
Contributor

@talzich I set the default query duration timeout to 60 seconds.

@talzich talzich merged commit 5c8bffd into demisto:contrib/xsoar-contrib_spearmin10-contrib-XQLDSHelper Jan 28, 2025
14 checks passed
Copy link

Thank you for your contribution. Your external PR has been merged and the changes are now included in an internal PR for further review. The internal PR will be merged to the master branch within 3 business days.

talzich added a commit that referenced this pull request Jan 28, 2025
* [Marketplace Contribution] XQLDSHelper (#37968)

* "pack contribution initial commit"

* Added test cases and update README

* Added CONTRIBUTORS.json

* Fixed

* Added README and doc_files

* Fixed CONTRIBUTORS

* Fixed README

* Fixed README

* Fixed test

* Fixed README

* Fixed pack_metadata.json

* Fixed

* Fixed

* Fixed

* Fixed

* Fixed

* Fixed for pylint

* Fixed

* Fixed for pylint

* Fixed for pylint

* Fixed for pylint

* Fixed for pylint

* Fixed for pylint

* Fixed for pylint

* Fixed for pylint

* Fixed for pylint

* Fixed for pylint

* Fixed for pylint

* Fixed for pylint

* Fixed for pylint

* Fixed for pylint

* Fixed for pylint

* Fixed for pylint

* Fixed for pylint

* Fixed for pylint

* Fixed for pylint

* Fixed for pylint

* Fixed for pylint

* Fixed for pylint

* Fiexed for pylint

* Fixed README

* Fixed README

* Fixed README

* Fixed README

* Fixed README

* Fixed README

* Fixed README

* Fixed README

* Fixed README

* Update README

* Update README

* Update README

* Update README

* Update README

* Update for more elegance

* Small changes

* Small changes

* Small changes

* Added test cases

* Added the xql.conditions feature

* Update test scripts

* Update test cases

* Update README

* Update .query.conditions

* Update test cases and fixed scripts

* Fixed file permissions

* Fixed samples

* Fixed issues where the record set could not retrieve more than 1000 records

* Fixed test script

* Comment out debug prints

* Added a new argument parameter, `triple_quotes_to_string`, to write XQL in a readable format within a template.

* Fixed

* Fixed

* Update docker image

* blind fix

* blind fix

* blind fix

* Update docker image

* revert

* Update

* pre-commit

* remove unnecessary files

* Update

* Update for new feature

* Update

* Fixed for pylint

* Update README

* Added query_timeout_duration

* Set default query_timeout_duration to 60 seconds.

---------

Co-authored-by: spearmin10 <[email protected]>
Co-authored-by: Masahiko Inoue <[email protected]>
Co-authored-by: Tal Zichlinsky <[email protected]>

* Fix validation

---------

Co-authored-by: xsoar-bot <[email protected]>
Co-authored-by: spearmin10 <[email protected]>
Co-authored-by: Masahiko Inoue <[email protected]>
Co-authored-by: Tal Zichlinsky <[email protected]>
Co-authored-by: TalZich <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Community Support Level Indicates that the contribution is for Community supported pack Contribution Form Filled Whether contribution form filled or not. Contribution Thank you! Contributions are always welcome! docs-approved External PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants