Enhanced Security Measures in Place:   To ensure a safer experience, we’ve implemented additional, temporary security measures for all users.

Ingest DHCP logs using XDR collector

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements

Ingest DHCP logs using XDR collector

L0 Member

Hi,

 

I am having issues with ingesting DHCP log from our DCs. We are using the XDR Collector app. I suspect that the issue is with the filebeat.yml file but cannot figure out what the problem is. I have tried and followed the guide below and copy-paste the example code but no logs are showing up. The yml has been checked and the syntax is correct. 

 

https://docs.paloaltonetworks.com/cortex/cortex-xdr/cortex-xdr-pro-admin/cortex-xdr-collectors/add-a...

 

Is there anyone that has successfully managed to ingest those logs? 

 

Thanks!

1 accepted solution

Accepted Solutions

Hi @bbarmanroy Thank you for your reply. The path is valid but there is something in the filebeat configuraion that is causing it to inactivate the service. I have been doing some labs on this and found out that this configuration is giving an acceptable result: 

 

filebeat.inputs:
  - type: log
    enabled: true
    paths:
      - c:\Windows\System32\dhcp\DhcpSrvLog*.log
processors:
  - add_fields:
      fields: 
        vendor: "microsoft"
        product: "dhcp"
  - drop_event.when.not.regexp.message: "^[0-9]+,.*"
  - dissect: 
      tokenizer: "%{id},%{date},%{time},%{description},%{ipAddress},%{hostName},%{macAddress},%{userName},%{transactionID},%{qResult},%{probationTime},%{correlationID},%{dhcid},%{vendorClassHex},%{vendorClassASCII},%{userClassHex},%{userClassASCII},%{relayAgentInformation},%{dnsRegError}"
 
This will store the information in dataset microsoft_dhcp_raw and the content will be split into fields defined in the tokenizer statement. 
 
Best regards,
Peter
 

View solution in original post

11 REPLIES 11

L5 Sessionator

Hi @PeterBengtslin have you checked if the path to the DHCP logs are valid? Is the issue persistent if you use a filebeat collector?

Hi @bbarmanroy Thank you for your reply. The path is valid but there is something in the filebeat configuraion that is causing it to inactivate the service. I have been doing some labs on this and found out that this configuration is giving an acceptable result: 

 

filebeat.inputs:
  - type: log
    enabled: true
    paths:
      - c:\Windows\System32\dhcp\DhcpSrvLog*.log
processors:
  - add_fields:
      fields: 
        vendor: "microsoft"
        product: "dhcp"
  - drop_event.when.not.regexp.message: "^[0-9]+,.*"
  - dissect: 
      tokenizer: "%{id},%{date},%{time},%{description},%{ipAddress},%{hostName},%{macAddress},%{userName},%{transactionID},%{qResult},%{probationTime},%{correlationID},%{dhcid},%{vendorClassHex},%{vendorClassASCII},%{userClassHex},%{userClassASCII},%{relayAgentInformation},%{dnsRegError}"
 
This will store the information in dataset microsoft_dhcp_raw and the content will be split into fields defined in the tokenizer statement. 
 
Best regards,
Peter
 

L2 Linker

Hi, I found the problem causing service inactivation. There is a \n inserted between "tokenizer:" and its parameter that has to be removed. The result has to be on one line.

L1 Bithead

Hi Peter,

 

I had this issue with the the collector as well and thought it was the yml file also.

I thought when you install the collector it installs the file beat service with it but it dosent.

I had to go to C: > Program data>XDR Collector > Content > filebeat-windows-x86_64  run the install-service-filebeat from powershell and then start the service from powershell as well.

Once i did that it worked for me. 

L2 Linker

Hello,
I created XDR collector package and installed it on my windows server. But it does not show up on Administration tab where i am supposed to see all xdr collector agent lists. What can be the reason for this? 

Hello @JahidAliyev 

this looks like communication issue - server (XDR collector on the server) is not able to reach XDR management console. Try to check FW outbound rules (local FW on the server and any FW in the path to XDR management). 

L2 Linker

When I am in organization network, it cannot communicate. When I am using my own internet, it directly connected. If I switch to my organization network, will it be disconnected again?

L2 Linker

And, do I need to write parsing rules or Cortex XDR will automatically bring DHCP logs under "dhcp" dataset?

@Honza_Linhart If you answer these two, I would be so happy

For proper function, you need XDR collector connected to XDR management console all the time. You're using this connection to ingest data from on-premise server to cloud data lake. So yes, if you put it back to the network that doesn't allow connection, it will be disconnected again.

If you will have your XDR collector up and connected, use config file mentioned in this thread and you will get your DHCP logs into new dataset in Cortex XDR. There is no need to write your own parsers. 

 

 

@Honza_Linhart Surprisingly, when I connect back to my organzition network, it does not become disconnected. 

If I use this as config file, what will be the name of dataset if I want to look at these logs on queries?

And, is it okey to install this collector agent on any windows or we need to install it on DC and DHCP server? Because I simply installed it on usual endpoint which is not DC or DHCP server.

  • 1 accepted solution
  • 5383 Views
  • 11 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!