XQL Query - Event logs of a particular host

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Please sign in to see details of an important advisory in our Customer Advisories area.

XQL Query - Event logs of a particular host

L2 Linker

Hi All,

 

Can someone tell me how do we query all event logs for a particular hostname using XQL ?

 

Thanks!!

 

Cortex XDR 

1 accepted solution

Accepted Solutions

L5 Sessionator

*Editing the snippet*

 

Hi @MithunKT ,

 

Try using this if you want the xdr logs from the specific endpoints :

 

dataset = xdr_data
| filter agent_hostname = "<hostname>"

 

If your requirement is for eventlogs only then you can use the code below:

 

dataset = xdr_data
| filter agent_hostname = "<hostname>" and event_type = ENUM.EVENT_LOG

 

Please mark this answer "Accept as Solution" if this answers your question.

 

Regards

View solution in original post

3 REPLIES 3

L5 Sessionator

*Editing the snippet*

 

Hi @MithunKT ,

 

Try using this if you want the xdr logs from the specific endpoints :

 

dataset = xdr_data
| filter agent_hostname = "<hostname>"

 

If your requirement is for eventlogs only then you can use the code below:

 

dataset = xdr_data
| filter agent_hostname = "<hostname>" and event_type = ENUM.EVENT_LOG

 

Please mark this answer "Accept as Solution" if this answers your question.

 

Regards

Hi @neelrohit 

 

I appreciate for giving me the XQL query; it works great. But now I'm having trouble exporting the results (1000000 results). I would like to have these findings in tsv or spreadsheet format, but I cannot do so as it takes a lot of time, and after some time download goes to an error state.

Would you like to suggest a different method for exporting these results into a tsv or excel file?

 

Thanks!!
Cortex XDR 

@MithunKT , 

 

Thanks for reaching out.  Cortex XDR can show a maximum of 1000000 results only and it really is more on the microsoft excel download format issue than on the XDR. I would suggest lowering down the timeframe for the query to lower limits(maybe 6 or 12 hours to get the results and export them.)

 

If you want the query itself to be designated with a custom timeframe then you may add config timeframe syntax to the above.

 

Example:

 

config timeframe = 2h//run the query for the last 2 hours of timeframe
|dataset = xdr_data
| filter agent_hostname = "<hostname>" and event_type = ENUM.EVENT_LOG

 

Hope this solves your problem.

 

Please mark the answer as "Accepted as Solution" if it solved your query

 

Regards.

  • 1 accepted solution
  • 2840 Views
  • 3 replies
  • 0 Likes
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

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!