Skip to content

Commit 9d67f9a

Browse files
tcarmeli1maimorag
authored andcommitted
Add logs to xql query (#38097)
* add logs * add rn * fix log
1 parent b523492 commit 9d67f9a

File tree

7 files changed

+24
-3
lines changed

7 files changed

+24
-3
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#### Scripts
2+
3+
##### CoreXQLApiModule
4+
5+
Added logs to the module.

Packs/ApiModules/Scripts/CoreXQLApiModule/CoreXQLApiModule.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -648,6 +648,7 @@ def start_xql_query_polling_command(client: CoreClient, args: dict) -> Union[Com
648648
raise DemistoException('Please provide a query name')
649649
execution_id = start_xql_query(client, args)
650650
if execution_id == 'FAILURE':
651+
demisto.debug("Did not succeed to start query, retrying.")
651652
# the 'start_xql_query' function failed because it reached the maximum allowed number of parallel running queries.
652653
# running the command again using polling with an interval of 'interval_in_secs' seconds.
653654
command_results = CommandResults()
@@ -661,6 +662,7 @@ def start_xql_query_polling_command(client: CoreClient, args: dict) -> Union[Com
661662

662663
if not execution_id:
663664
raise DemistoException('Failed to start query\n')
665+
demisto.debug(f"Succeeded to start query with {execution_id=}.")
664666
args['query_id'] = execution_id
665667
args['command_name'] = demisto.command()
666668

@@ -703,12 +705,14 @@ def get_xql_query_results_polling_command(client: CoreClient, args: dict) -> Uni
703705

704706
# if status is pending, the command will be called again in the next run until success.
705707
if outputs.get('status') == 'PENDING':
708+
demisto.debug(f"Returned status 'PENDING' for {args.get('query_id', '')}.")
706709
scheduled_command = ScheduledCommand(command='xdr-xql-get-query-results', next_run_in_seconds=interval_in_secs,
707710
args=args, timeout_in_seconds=600)
708711
command_results.scheduled_command = scheduled_command
709712
command_results.readable_output = 'Query is still running, it may take a little while...'
710713
return command_results
711714

715+
demisto.debug(f"Returned status '{outputs.get('status')}' for {args.get('query_id', '')}.")
712716
results_to_format = outputs.pop('results')
713717
# create Human Readable output
714718
query = args.get('query', '')

Packs/ApiModules/pack_metadata.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "ApiModules",
33
"description": "API Modules",
44
"support": "xsoar",
5-
"currentVersion": "2.2.37",
5+
"currentVersion": "2.2.38",
66
"author": "Cortex XSOAR",
77
"url": "https://www.paloaltonetworks.com/cortex",
88
"email": "",

Packs/Core/ReleaseNotes/3_2_19.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2+
#### Integrations
3+
4+
##### XQL Query Engine
5+
6+
Documentation and metadata improvements.

Packs/Core/pack_metadata.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "Core - Investigation and Response",
33
"description": "Automates incident response",
44
"support": "xsoar",
5-
"currentVersion": "3.2.18",
5+
"currentVersion": "3.2.19",
66
"author": "Cortex XSOAR",
77
"url": "https://www.paloaltonetworks.com/cortex",
88
"email": "",

Packs/CortexXDR/ReleaseNotes/6_2_6.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2+
#### Integrations
3+
4+
##### Cortex XDR - XQL Query Engine
5+
6+
Documentation and metadata improvements.

Packs/CortexXDR/pack_metadata.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "Cortex XDR by Palo Alto Networks",
33
"description": "Automates Cortex XDR incident response, and includes custom Cortex XDR incident views and layouts to aid analyst investigations.",
44
"support": "xsoar",
5-
"currentVersion": "6.2.5",
5+
"currentVersion": "6.2.6",
66
"author": "Cortex XSOAR",
77
"url": "https://www.paloaltonetworks.com/cortex",
88
"email": "",

0 commit comments

Comments
 (0)