<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Mapping syslog events with IP adresses through DHCP events in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Mapping-syslog-events-with-IP-adresses-through-DHCP-events/m-p/105499#M22232</link>
    <description>&lt;P&gt;Thanks Ziegfried for your fast response! &lt;BR /&gt;
With the query showed below Splunk makes a correct mapping altough I am going to try as well to use Lookups with CSV files to map the different events as the subsearch has a bad influence on the loading performance.&lt;/P&gt;

&lt;P&gt;index=syslog | join src_mac usetime=true earlier=true [ search index=main sourcetype=dhcp_log src_ip= src_mac= | fields _time src_ip src_mac ]&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 11:36:46 GMT</pubDate>
    <dc:creator>Stefan_van_de_R</dc:creator>
    <dc:date>2020-09-28T11:36:46Z</dc:date>
    <item>
      <title>Mapping syslog events with IP adresses through DHCP events</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Mapping-syslog-events-with-IP-adresses-through-DHCP-events/m-p/105497#M22230</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I'm indexing DHCP and Syslog events. To make it for the network administrators a lot easier when they have to know the physical location on a host based on the IP address, I want to make a mapping in Splunk. They both have a MAC Adress (src_mac) so it should be possible to extract the IP address out of the DHCP index.&lt;/P&gt;

&lt;P&gt;The search query I made so far does an left join on the dhcp index but it returns a wrong IP address. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=syslog | join type=left [search index=main sourcetype=dhcp_log src_ip != '' AND src_mac != '' earliest=-8h | sort -_time| fields + src_ip]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Can someone gives me some tips how to make it valid?&lt;/P&gt;

&lt;P&gt;Thanks! &lt;BR /&gt;
- Stefan&lt;/P&gt;</description>
      <pubDate>Fri, 30 Mar 2012 15:02:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Mapping-syslog-events-with-IP-adresses-through-DHCP-events/m-p/105497#M22230</guid>
      <dc:creator>Stefan_van_de_R</dc:creator>
      <dc:date>2012-03-30T15:02:17Z</dc:date>
    </item>
    <item>
      <title>Re: Mapping syslog events with IP adresses through DHCP events</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Mapping-syslog-events-with-IP-adresses-through-DHCP-events/m-p/105498#M22231</link>
      <description>&lt;P&gt;You should join on a common field for both searches (the outer and the sub-search). Here's an example that would work if both searches provide the src_ip field. If the fields have different names you can either use a FIELDALIAS (in props.conf) or use eval or rename to normalize it.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=syslog | join src_ip usetime=true ealier=true [ search index=main sourcetype=dhcp_log src_ip=* src_mac=* | fields _time src_ip src_mac ]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Additionally I added the usetime modifier for the join command as this probably makes sense for this kind of use-case.&lt;/P&gt;</description>
      <pubDate>Fri, 30 Mar 2012 15:26:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Mapping-syslog-events-with-IP-adresses-through-DHCP-events/m-p/105498#M22231</guid>
      <dc:creator>ziegfried</dc:creator>
      <dc:date>2012-03-30T15:26:01Z</dc:date>
    </item>
    <item>
      <title>Re: Mapping syslog events with IP adresses through DHCP events</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Mapping-syslog-events-with-IP-adresses-through-DHCP-events/m-p/105499#M22232</link>
      <description>&lt;P&gt;Thanks Ziegfried for your fast response! &lt;BR /&gt;
With the query showed below Splunk makes a correct mapping altough I am going to try as well to use Lookups with CSV files to map the different events as the subsearch has a bad influence on the loading performance.&lt;/P&gt;

&lt;P&gt;index=syslog | join src_mac usetime=true earlier=true [ search index=main sourcetype=dhcp_log src_ip= src_mac= | fields _time src_ip src_mac ]&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 11:36:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Mapping-syslog-events-with-IP-adresses-through-DHCP-events/m-p/105499#M22232</guid>
      <dc:creator>Stefan_van_de_R</dc:creator>
      <dc:date>2020-09-28T11:36:46Z</dc:date>
    </item>
  </channel>
</rss>

