<?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: How to correlate fields value from different indexer? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-correlate-fields-value-from-different-indexer/m-p/587965#M204769</link>
    <description>&lt;P&gt;Thankyou for the reply. We did try adding the | where isnotnull(Hostaname) , but then the Total Bandwidth column will be empty. Thats how the result messed up.&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 08 Mar 2022 08:21:23 GMT</pubDate>
    <dc:creator>syazwani</dc:creator>
    <dc:date>2022-03-08T08:21:23Z</dc:date>
    <item>
      <title>How to correlate fields value from different indexer?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-correlate-fields-value-from-different-indexer/m-p/587953#M204762</link>
      <description>&lt;P&gt;Hi, we would to correlate data between 2 idx, but we cant seem to find the right query.&lt;BR /&gt;&lt;BR /&gt;Examples&lt;BR /&gt;&lt;BR /&gt;Index= Firewall&lt;BR /&gt;Sourcetype = A&lt;BR /&gt;Field = Bytes, SourceIP&lt;BR /&gt;&lt;BR /&gt;Index=AD&lt;BR /&gt;Sourcetype=B&lt;BR /&gt;Field=SourceIP, Hostname&lt;BR /&gt;&lt;BR /&gt;We would like to calculate the byte in firewall index, and display the Hostname of SourceIP by correlating with AD index.&lt;BR /&gt;&lt;BR /&gt;Here is example of our query which not work well.&lt;/P&gt;&lt;PRE&gt;(index=Firewall OR index=AD) sourcetype=A OR sourcetype=B&lt;BR /&gt;| eval TotalBandwidth = round((Bytes)/1024/1204,2)&lt;BR /&gt;| stats sum(TotalBandwidth) as "Total Bandwidth", latest(Hostname) as Hostname by SourceIP&lt;BR /&gt;| sort 10 - "Total Bandwidth"&lt;/PRE&gt;&lt;P&gt;When we run the above query, we able to display the as what we what, but some the result consist of unwanted Hostname. We tried to filter the Hostname by using&lt;STRONG&gt; | where Hostname!=" " ,&amp;nbsp;&amp;nbsp;&lt;/STRONG&gt;but the result is messed up. Other query that we have generate is;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;BR /&gt;(index=Firewall sourcetype=A SourceIP=* Bytes=*) OR (index=AD sourcetype=B SourceIP=* Hostname=*)&lt;BR /&gt;| fields index SourceIP Bytes SourceIP Hostname&lt;BR /&gt;| eval SourceIPNew=coalesce(SourceIP, SourceIP)&lt;BR /&gt;| eval TotalBandwidth = round((Bytes)/1024/1204,2)&lt;BR /&gt;| stats sum(TotalBandwidth) as "Total Bandwidth", values(Hostname) as Hostname by SourceIPNew&amp;nbsp;&amp;nbsp;&lt;/PRE&gt;&lt;P&gt;This also not working&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":frowning_face:"&gt;☹️&lt;/span&gt;. Please advise us. Thankyou.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Mar 2022 07:54:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-correlate-fields-value-from-different-indexer/m-p/587953#M204762</guid>
      <dc:creator>syazwani</dc:creator>
      <dc:date>2022-03-08T07:54:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to correlate fields value from different indexer?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-correlate-fields-value-from-different-indexer/m-p/587962#M204767</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/238134"&gt;@syazwani&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;your second search, for my knowledge is correct, I'd modify only a little thing:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;(index=Firewall sourcetype=A SourceIP=* Bytes=*) OR (index=AD sourcetype=B SourceIP=* Hostname=*)
| stats sum(Bytes) AS TotalBandwidth values(Hostname) AS Hostname BY SourceIP 
| eval TotalBandwidth = round(TotalBandwidth/1024/1204,2)&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Mar 2022 08:12:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-correlate-fields-value-from-different-indexer/m-p/587962#M204767</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-03-08T08:12:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to correlate fields value from different indexer?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-correlate-fields-value-from-different-indexer/m-p/587963#M204768</link>
      <description>&lt;P&gt;In what way is the Hostname unwanted/messed up?&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;(index=Firewall AND sourcetype=A) OR (index=AD AND sourcetype=B)
| eval TotalBandwidth = round((Bytes)/1024/1204,2)
| stats sum(TotalBandwidth) as "Total Bandwidth", latest(Hostname) as Hostname by SourceIP
| sort 10 - "Total Bandwidth"&lt;/LI-CODE&gt;&lt;P&gt;Is it that the Hostname is not found in the AD index?&lt;/P&gt;&lt;P&gt;You could try adding&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| where isnotnull(Hostname)&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 08 Mar 2022 08:13:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-correlate-fields-value-from-different-indexer/m-p/587963#M204768</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-03-08T08:13:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to correlate fields value from different indexer?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-correlate-fields-value-from-different-indexer/m-p/587965#M204769</link>
      <description>&lt;P&gt;Thankyou for the reply. We did try adding the | where isnotnull(Hostaname) , but then the Total Bandwidth column will be empty. Thats how the result messed up.&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Mar 2022 08:21:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-correlate-fields-value-from-different-indexer/m-p/587965#M204769</guid>
      <dc:creator>syazwani</dc:creator>
      <dc:date>2022-03-08T08:21:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to correlate fields value from different indexer?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-correlate-fields-value-from-different-indexer/m-p/587967#M204771</link>
      <description>&lt;P&gt;Thank you for the reply. Its still the same&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":pensive_face:"&gt;😔&lt;/span&gt;. Could the field name (SourceIP) is same for both idx would be an issue?&lt;/P&gt;</description>
      <pubDate>Tue, 08 Mar 2022 08:25:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-correlate-fields-value-from-different-indexer/m-p/587967#M204771</guid>
      <dc:creator>syazwani</dc:creator>
      <dc:date>2022-03-08T08:25:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to correlate fields value from different indexer?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-correlate-fields-value-from-different-indexer/m-p/587968#M204772</link>
      <description>&lt;P&gt;It sounds like your SourceIP addresses don't correlate - can you share some sample events from your indexes?&lt;/P&gt;</description>
      <pubDate>Tue, 08 Mar 2022 08:26:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-correlate-fields-value-from-different-indexer/m-p/587968#M204772</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-03-08T08:26:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to correlate fields value from different indexer?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-correlate-fields-value-from-different-indexer/m-p/587975#M204774</link>
      <description>&lt;P&gt;A typical question when something that's supposed to be calculating OK returns an empty value - is your "Bytes" field (from which you're calculating the bandwidth further down the pipeline) a numeric field? If it is not, summing over it will not produce results and you have to firstly convert it to a number using something like&lt;/P&gt;&lt;PRE&gt;| eval numbytes=tonumber(Bytes)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Mar 2022 09:00:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-correlate-fields-value-from-different-indexer/m-p/587975#M204774</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2022-03-08T09:00:13Z</dc:date>
    </item>
  </channel>
</rss>

