- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
07-29-2022 04:25 PM
Hi Peeps,
So XQL has this call function to fetch results from a saved query in the query library. Lets take this for example:
call "All appdata executions for the past 30 days"
Now, the problem is that my saved query is waiting for a parameter "$hostname". Anyone have any ideas how to pass that parameter through XQL?
Or probably point me to a KB of some sorts.
Thanks a lot,
Jill
07-29-2022 04:26 PM
Sorry
XQL "call" functions from query library I mean
07-31-2022 10:33 PM - edited 07-31-2022 10:33 PM
Go to Query library, and paste the XQL query in the thread here for us to replicate and advise accordingly. I believe this might not be created by Palo Alto Networks.
08-01-2022 11:43 AM
Hi Bbamanroy,
Yeah.. this one I created myself. Take this for example
=====
config case_sensitive = false timeframe = 7d
| preset = host_inventory_auto_runs
| filter endpoint_name = $Hostname and cmd in ("*appdata*","c:\users*")
=====
I'm taking $Hostname as a parameter for the query.
I have multiple saved queries in the library that requires a hostname to be passed and I wanted to be able to call them and probably use join/union to merge the results.
Sure I can use both join/union in the query but I want to make them flexible like:
I will use w, x, y, and z queries for a certain event
w, x, and y for another
and so on..
Appreciate the response!
08-01-2022 07:19 PM
This works for me:
call "Host Inventory Autorun" Hostname="Bisma"
08-02-2022 07:02 AM
Weird.. I tried something similar but anyways thank you!
Works for me too.
Click Accept as Solution to acknowledge that the answer to your question has been provided.
The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!
These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!
The LIVEcommunity thanks you for your participation!