We use SA-ldapsearch to pull Active Directory data into the ES Assets & Identity framework. We do not currently ingest DHCP logs, but the IP address last seen for an AD computer is pulled in as part of the ldapsearch lookup gen search (below). Having recently updated to ES 6 and Splunk 8, I'm noticing that workstations are being combined in the Asset KV stores (assets_by_str) if they share an IP address. Since IP addresses change at different times and many of our users work from home with or without VPN, this is a common occurrence. This leads to ridiculous results in investigation in which the "source_hostname" ends up being mapped from the source (DHCP) IP address in the search result to an MV field of 50-60 hostnames all of which at some point or another in history had that IP address.
I know that I can turn Asset correlation OFF in the ES configuration for Data Enrichment, but I don't want that, since hostnames are accurately resolved to user identities in many cases; also, old data is better than no data. I have considered conditionally eliminating IP addresses from our DHCP ranges by simply conditionally removing the IP record from the lookup gen search (below), but what I'm really looking for is a best practice. Is Splunk ES 6 designed to handle DHCP in some other way I'm not seeing? If not, this change seems asinine. No one could ever want the asset data for DHCP endpoints to be handled in this way.
| ldapsearch domain=default search="(&(objectClass=computer))"
| eval city=""
| eval country="US"
| eval priority="medium"
| eval category="normal"
| eval dns=dNSHostName
| eval owner=description
| rex field=sAMAccountName mode=sed "s/\$//g"
| eval nt_host=sAMAccountName
| makemv delim="," dn
| rex field=dn "(OU|CN)\=(?<bunit>.+)"
| eval requires_av="true"
| eval should_update="true"
| lookup dnslookup clienthost as dns OUTPUT clientip as ip
| join managedBy
[| ldapsearch search="(&(objectClass=user))"
| rename distinguishedName AS managedBy, sAMAccountName AS managed_by_user
| table managedBy managed_by_user]
| table ip,mac,nt_host,dns,owner,managed_by_user,priority,lat,long,city,country,bunit,category,pci_domain,is_expected,should_timesync,should_update,requires_av
| outputlookup ad_assets.csv
... View more