<?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: Correlating different types of data from different sources in Knowledge Management</title>
    <link>https://community.splunk.com/t5/Knowledge-Management/Correlating-different-types-of-data-from-different-sources/m-p/472170#M8172</link>
    <description>&lt;P&gt;Give this a try:&lt;BR /&gt;
your_search_with_ipaddress_field | join left=L right=R where L.ipaddress=R.host [search your_search_with_host] | stats count by location loglevel&lt;/P&gt;</description>
    <pubDate>Wed, 30 Sep 2020 03:28:49 GMT</pubDate>
    <dc:creator>mydog8it</dc:creator>
    <dc:date>2020-09-30T03:28:49Z</dc:date>
    <item>
      <title>Correlating different types of data from different sources</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Correlating-different-types-of-data-from-different-sources/m-p/472169#M8171</link>
      <description>&lt;P&gt;Hi, is there a "standard" way of correlating data from different sources? For example, I have a metadata source and an event source. The metadata source has data such as "ServiceName" or "Location", and an IP address. The event source are logs which have a host, and I would like to get some aggregation data based on the metadata source...&lt;/P&gt;

&lt;P&gt;meta:&lt;BR /&gt;
&lt;CODE&gt;ipaddress=1.2.3.4,location=xyz,service=foo&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;event:&lt;BR /&gt;
&lt;CODE&gt;host=1.2.3.4,loglevel=WARN,message="something"&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;If i wanted to get chart the count of different log levels by location, what would the best approach be? have tried sub-searches but that works for filtering, would i need some sort of dynamic lookup?&lt;/P&gt;</description>
      <pubDate>Mon, 23 Dec 2019 18:37:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Correlating-different-types-of-data-from-different-sources/m-p/472169#M8171</guid>
      <dc:creator>brettcave</dc:creator>
      <dc:date>2019-12-23T18:37:48Z</dc:date>
    </item>
    <item>
      <title>Re: Correlating different types of data from different sources</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Correlating-different-types-of-data-from-different-sources/m-p/472170#M8172</link>
      <description>&lt;P&gt;Give this a try:&lt;BR /&gt;
your_search_with_ipaddress_field | join left=L right=R where L.ipaddress=R.host [search your_search_with_host] | stats count by location loglevel&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 03:28:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Correlating-different-types-of-data-from-different-sources/m-p/472170#M8172</guid>
      <dc:creator>mydog8it</dc:creator>
      <dc:date>2020-09-30T03:28:49Z</dc:date>
    </item>
    <item>
      <title>Re: Correlating different types of data from different sources</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Correlating-different-types-of-data-from-different-sources/m-p/472171#M8173</link>
      <description>&lt;P&gt;Is there a reason a standard &lt;CODE&gt;stats&lt;/CODE&gt; search wouldn't work for you? Something like&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(index=index1 sourcetype=...) OR (index=index2, sourcetype=...) 
|eval groupingIP = coalesce(ipaddress,host)
| stats values(location) as location, values(loglevel) as loglevel by groupingIP, someOtherUniqueField
| stats count by location, loglevel
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This will work for you if you can come up with "someOtherUniqueField" to tie a meta log to an event log, otherwise &lt;CODE&gt;values&lt;/CODE&gt; will take in duplicate issues and not know how to handle them, and &lt;CODE&gt;list&lt;/CODE&gt; also isn't a great option because you're leaning on weird multivalue fields as opposed to creating one true "event issue" to be counted. This could be a _time field, some other unique ID, etc. &lt;/P&gt;

&lt;P&gt;Essentially, you pull in all of your logs, create a field to "join" on (although &lt;CODE&gt;join&lt;/CODE&gt; isn't great given how splunk is architected), in this case I call it groupingIP and I use a &lt;CODE&gt;coalesce&lt;/CODE&gt; statement, it could also have been an &lt;CODE&gt;if&lt;/CODE&gt; or &lt;CODE&gt;case&lt;/CODE&gt; statement, group them together, take the values (unique list of values) of location and loglevel by IP, uniqueGroupField, and then count by location and loglevel.&lt;/P&gt;

&lt;P&gt;Hope this helps!&lt;/P&gt;</description>
      <pubDate>Mon, 23 Dec 2019 20:06:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Correlating-different-types-of-data-from-different-sources/m-p/472171#M8173</guid>
      <dc:creator>aberkow</dc:creator>
      <dc:date>2019-12-23T20:06:06Z</dc:date>
    </item>
  </channel>
</rss>

