<?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: Multiple hosts with two interesting fields in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Multiple-hosts-with-two-interesting-fields/m-p/499261#M85106</link>
    <description>&lt;P&gt;So I have this query but it's not showing the hosts I know for a fact are only sending internal IP's. If I remove the other hosts and only keep the one that is sending internal IP's it works.&lt;/P&gt;

&lt;P&gt;Index=IIS (host=Host1 OR host=Host2 OR host=Host3 OR host=Host4&lt;BR /&gt;
| eval theIP=if(isnull(Client_IP), c_ip, Client_IP)&lt;BR /&gt;
| eval isExternal=if(cidrmatch("192.0.0.0/8",theIP), "internal", "external")&lt;BR /&gt;
| stats count AS "Total" by isExternal, host&lt;BR /&gt;
| where isExternal="external" AND Total &amp;lt;0&lt;/P&gt;</description>
    <pubDate>Wed, 30 Sep 2020 04:45:29 GMT</pubDate>
    <dc:creator>alexrod03</dc:creator>
    <dc:date>2020-09-30T04:45:29Z</dc:date>
    <item>
      <title>Multiple hosts with two interesting fields</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Multiple-hosts-with-two-interesting-fields/m-p/499244#M85089</link>
      <description>&lt;P&gt;Hi, I am trying to bring back two interesting fields from multiple hosts. My search looks like this.&lt;/P&gt;

&lt;P&gt;index=IIS (host=Host1 OR host=Host2 OR host=Host3 OR host=Host4) c_ip=Range OR Client_IP=Range&lt;/P&gt;

&lt;P&gt;This search is only bringing back c_ip results not Client_IP results. It should be bringing back both. &lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 04:41:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Multiple-hosts-with-two-interesting-fields/m-p/499244#M85089</guid>
      <dc:creator>alexrod03</dc:creator>
      <dc:date>2020-09-30T04:41:06Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple hosts with two interesting fields</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Multiple-hosts-with-two-interesting-fields/m-p/499245#M85090</link>
      <description>&lt;P&gt;Hi @alexrod03,&lt;BR /&gt;
at first use the Parenthesis also in the second part of the main search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=IIS (host=Host1 OR host=Host2 OR host=Host3 OR host=Host4) (c_ip=Range OR Client_IP=Range)
| ...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;then check if you have events with this field: you can check this running a search without the last part and see in the interesting fields if there's this field, eventually enlarging the time period.&lt;/P&gt;

&lt;P&gt;Ciao.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Mon, 23 Mar 2020 16:13:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Multiple-hosts-with-two-interesting-fields/m-p/499245#M85090</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2020-03-23T16:13:30Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple hosts with two interesting fields</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Multiple-hosts-with-two-interesting-fields/m-p/499246#M85091</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;  thanks for that. My end result would be to figure out which hosts are sending only internal address for a 24 hour period. These hosts send both internal and external address in the c_ip and Client_IP field. &lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 04:41:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Multiple-hosts-with-two-interesting-fields/m-p/499246#M85091</guid>
      <dc:creator>alexrod03</dc:creator>
      <dc:date>2020-09-30T04:41:08Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple hosts with two interesting fields</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Multiple-hosts-with-two-interesting-fields/m-p/499247#M85092</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/212122"&gt;@alexrod03&lt;/a&gt;,&lt;BR /&gt;
Sorry but I don't understand your need:&lt;BR /&gt;
you have the destination IP in field c_ip or in field Client_IP&lt;BR /&gt;
i think that you're using an internal IP addressing different than the external,&lt;BR /&gt;
Is this correct?&lt;BR /&gt;
If yes, you could use this IP addresses to filter your logs in both the fields.&lt;/P&gt;

&lt;P&gt;If the addresses are too many, you could put them in a lookup and use it to filter your logs.&lt;/P&gt;

&lt;P&gt;Ciao.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 04:41:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Multiple-hosts-with-two-interesting-fields/m-p/499247#M85092</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2020-09-30T04:41:11Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple hosts with two interesting fields</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Multiple-hosts-with-two-interesting-fields/m-p/499248#M85093</link>
      <description>&lt;P&gt;So these hosts send internal and external IP address in the c_ip and Client_IP field. Is there a way to filter out which hosts are only sending internal address for a 24 hour period?&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 04:41:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Multiple-hosts-with-two-interesting-fields/m-p/499248#M85093</guid>
      <dc:creator>alexrod03</dc:creator>
      <dc:date>2020-09-30T04:41:14Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple hosts with two interesting fields</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Multiple-hosts-with-two-interesting-fields/m-p/499249#M85094</link>
      <description>&lt;P&gt;Try running your search in &lt;CODE&gt;verbose mode&lt;/CODE&gt; or add something like this to the end to force other modes to handle the fields:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | fillnull value="&amp;lt;MISSING&amp;gt;" c_ip results Client_IP
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 23 Mar 2020 16:48:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Multiple-hosts-with-two-interesting-fields/m-p/499249#M85094</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2020-03-23T16:48:53Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple hosts with two interesting fields</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Multiple-hosts-with-two-interesting-fields/m-p/499250#M85095</link>
      <description>&lt;P&gt;Hi @alexrod03,&lt;BR /&gt;
is there an IP addressing plan in your company (e.g. all the internal addresses start with 10: e.g. 10.x.x.x)?&lt;BR /&gt;
If not, the only way is to have a list of internal IP ranges (in a lookup or from another search) and use it to filter events. &lt;/P&gt;

&lt;P&gt;Ciao.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Mon, 23 Mar 2020 16:51:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Multiple-hosts-with-two-interesting-fields/m-p/499250#M85095</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2020-03-23T16:51:16Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple hosts with two interesting fields</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Multiple-hosts-with-two-interesting-fields/m-p/499251#M85096</link>
      <description>&lt;P&gt;Yes there is an internal range. So in essence c_ip=InternalRange OR Client_IP=InternalRange. But I want to alert when c_ip or Client_IP are ONLY sending internal range for 24 hour period. Normally c_ip and Client_IP send a mixture of and internal range and external IP's. Hopefully this makes sense.  &lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 04:41:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Multiple-hosts-with-two-interesting-fields/m-p/499251#M85096</guid>
      <dc:creator>alexrod03</dc:creator>
      <dc:date>2020-09-30T04:41:16Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple hosts with two interesting fields</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Multiple-hosts-with-two-interesting-fields/m-p/499252#M85097</link>
      <description>&lt;P&gt;Hi @alexrod03,&lt;BR /&gt;
yes now it more clear:&lt;BR /&gt;
you have to distinguish internal from external ranges,&lt;BR /&gt;
try something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=IIS (host=Host1 OR host=Host2 OR host=Host3 OR host=Host4)
| eval ip=coalesce(c_ip,Client_IP)
| eval kind=if(ip=Internal_Range,"Internal","External")
| stats values(kind) AS kind BY host
| where kind=Internal
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Ciao.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Mon, 23 Mar 2020 17:23:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Multiple-hosts-with-two-interesting-fields/m-p/499252#M85097</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2020-03-23T17:23:31Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple hosts with two interesting fields</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Multiple-hosts-with-two-interesting-fields/m-p/499253#M85098</link>
      <description>&lt;P&gt;I am getting an error. Error in 'eval' command:The number "range" is invalid&lt;/P&gt;</description>
      <pubDate>Mon, 23 Mar 2020 17:54:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Multiple-hosts-with-two-interesting-fields/m-p/499253#M85098</guid>
      <dc:creator>alexrod03</dc:creator>
      <dc:date>2020-03-23T17:54:06Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple hosts with two interesting fields</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Multiple-hosts-with-two-interesting-fields/m-p/499254#M85099</link>
      <description>&lt;P&gt;have you single IPs or IP ranges?&lt;BR /&gt;
Ciao.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Mon, 23 Mar 2020 17:57:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Multiple-hosts-with-two-interesting-fields/m-p/499254#M85099</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2020-03-23T17:57:26Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple hosts with two interesting fields</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Multiple-hosts-with-two-interesting-fields/m-p/499255#M85100</link>
      <description>&lt;P&gt;Doing a range. Example 192.0.0.0/8&lt;/P&gt;</description>
      <pubDate>Mon, 23 Mar 2020 17:59:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Multiple-hosts-with-two-interesting-fields/m-p/499255#M85100</guid>
      <dc:creator>alexrod03</dc:creator>
      <dc:date>2020-03-23T17:59:44Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple hosts with two interesting fields</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Multiple-hosts-with-two-interesting-fields/m-p/499256#M85101</link>
      <description>&lt;P&gt;try with quotes, e.g.  "10.0.0.0/8":&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=IIS (host=Host1 OR host=Host2 OR host=Host3 OR host=Host4)
| eval ip=coalesce(c_ip,Client_IP)
| eval kind=if(ip="10.0.0.0/8","Internal","External")
| stats values(kind) AS kind BY host
| where kind=Internal
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Ciao.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Mon, 23 Mar 2020 18:04:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Multiple-hosts-with-two-interesting-fields/m-p/499256#M85101</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2020-03-23T18:04:43Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple hosts with two interesting fields</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Multiple-hosts-with-two-interesting-fields/m-p/499257#M85102</link>
      <description>&lt;P&gt;That worked no errors but no results. So basically I want know if one of those hosts is only sending 192.0.0.0/8 ip's under the c_ip and Client_IP field. &lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 04:41:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Multiple-hosts-with-two-interesting-fields/m-p/499257#M85102</guid>
      <dc:creator>alexrod03</dc:creator>
      <dc:date>2020-09-30T04:41:20Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple hosts with two interesting fields</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Multiple-hosts-with-two-interesting-fields/m-p/499258#M85103</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;index=IIS (host=Host1 OR host=Host2 OR host=Host3 OR host=Host4) c_ip="192.0.0.0/8" OR Client_IP="192.0.0.0/8"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Searching accepts CIDR prefix.&lt;/P&gt;

&lt;P&gt;but your first search doesn't have &lt;CODE&gt;Client_ip&lt;/CODE&gt; result. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index=IIS (host=Host1 OR host=Host2 OR host=Host3 OR host=Host4) 
| stats count by Cleint_IP
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;What's this result? Is there ip addresses within 192.0.0.0/8?&lt;/P&gt;</description>
      <pubDate>Mon, 23 Mar 2020 19:43:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Multiple-hosts-with-two-interesting-fields/m-p/499258#M85103</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-03-23T19:43:59Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple hosts with two interesting fields</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Multiple-hosts-with-two-interesting-fields/m-p/499259#M85104</link>
      <description>&lt;P&gt;I think I may have figured it out. &lt;/P&gt;

&lt;P&gt;index=IIS (host=Host1 OR host=Host2 OR host=Host3 OR host=Host4) &lt;BR /&gt;
| eval theIP=if(isnull(Client_IP), c_ip, Client_IP)&lt;BR /&gt;
| eval isExternal=if(cidrmatch("192.0.0.0",theIP), "internal", "external")&lt;BR /&gt;
| stats count AS "Total" by isExternal, host&lt;BR /&gt;
| where isExternal="external" AND Total &amp;lt;30&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 04:41:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Multiple-hosts-with-two-interesting-fields/m-p/499259#M85104</guid>
      <dc:creator>alexrod03</dc:creator>
      <dc:date>2020-09-30T04:41:25Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple hosts with two interesting fields</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Multiple-hosts-with-two-interesting-fields/m-p/499260#M85105</link>
      <description>&lt;P&gt;To debug, choose an IP that is surely present and check if the search gives results.&lt;BR /&gt;
If yes try with star (e.g.: "10.0.0.*") &lt;BR /&gt;
if not, use the first two rows and see which values there are in the ip field, probably this is the problem.&lt;/P&gt;

&lt;P&gt;Ciao.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Tue, 24 Mar 2020 07:16:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Multiple-hosts-with-two-interesting-fields/m-p/499260#M85105</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2020-03-24T07:16:00Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple hosts with two interesting fields</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Multiple-hosts-with-two-interesting-fields/m-p/499261#M85106</link>
      <description>&lt;P&gt;So I have this query but it's not showing the hosts I know for a fact are only sending internal IP's. If I remove the other hosts and only keep the one that is sending internal IP's it works.&lt;/P&gt;

&lt;P&gt;Index=IIS (host=Host1 OR host=Host2 OR host=Host3 OR host=Host4&lt;BR /&gt;
| eval theIP=if(isnull(Client_IP), c_ip, Client_IP)&lt;BR /&gt;
| eval isExternal=if(cidrmatch("192.0.0.0/8",theIP), "internal", "external")&lt;BR /&gt;
| stats count AS "Total" by isExternal, host&lt;BR /&gt;
| where isExternal="external" AND Total &amp;lt;0&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 04:45:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Multiple-hosts-with-two-interesting-fields/m-p/499261#M85106</guid>
      <dc:creator>alexrod03</dc:creator>
      <dc:date>2020-09-30T04:45:29Z</dc:date>
    </item>
  </channel>
</rss>

