<?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 get the host IP address from the search? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-get-the-host-IP-address-from-the-search/m-p/431788#M75547</link>
    <description>&lt;P&gt;I agree with dflodstrom, if the IP address is not being placed into a field already, you can use rex to do it:&lt;BR /&gt;
    | rex "info\slogger:\s[.[^]]+][.[^]]+]\s(?&lt;HOST_IP&gt;.[^\s]+)"&lt;BR /&gt;
    | table source host host_ip&lt;/HOST_IP&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 30 May 2018 18:11:46 GMT</pubDate>
    <dc:creator>jodyfsu</dc:creator>
    <dc:date>2018-05-30T18:11:46Z</dc:date>
    <item>
      <title>How to get the host IP address from the search?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-get-the-host-IP-address-from-the-search/m-p/431784#M75543</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I will like to see the IP address of the host in this search result. I do not know what I am doing wrong. Please help and advise&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="f5_syslog" sourcetype=syslog source dest=* unix_category=all_hosts | table source host host_ip
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;source↕   &lt;/P&gt;

&lt;P&gt; host↕ &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;/opt/data/splunk/gtmwalldmzsp1/2018-06-01.log      gtmwalldmzsp1  
/opt/data/splunk/gtmwalldmzsp1/2018-06-01.log      gtmwalldmzsp1  
/opt/data/splunk/ltmdmzwall01mgmt/2018-06-01.log     ltmdmzwall01mgmt  
/opt/data/splunk/ltmdmzwall01mgmt/2018-06-01.log     ltmdmzwall01mgmt 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 30 May 2018 16:16:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-get-the-host-IP-address-from-the-search/m-p/431784#M75543</guid>
      <dc:creator>abassydo2018</dc:creator>
      <dc:date>2018-05-30T16:16:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the host IP address from the search?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-get-the-host-IP-address-from-the-search/m-p/431785#M75544</link>
      <description>&lt;P&gt;Is the host ip being logged in your raw data/events? Could you share some sample log entry (mask anything that's sensitive like IP address, host names etc).&lt;/P&gt;</description>
      <pubDate>Wed, 30 May 2018 16:27:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-get-the-host-IP-address-from-the-search/m-p/431785#M75544</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2018-05-30T16:27:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the host IP address from the search?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-get-the-host-IP-address-from-the-search/m-p/431786#M75545</link>
      <description>&lt;P&gt;Yes, I think so.&lt;/P&gt;

&lt;P&gt;2018-05-30T06:20:12-04:00 gtmwalldmzsp1 info logger: [ssl_req][30/May/2018:06:20:12 -0400] 192.168.137.64 TLSv1.2 ECDHE-RSA-AES128-GCM-SHA256 "/cgi-bin/view-source" 199&lt;/P&gt;

&lt;P&gt;host =  gtmwalldmzsp1&lt;BR /&gt;&lt;BR /&gt;
    source =    /opt/data/splunk/gtmwalldmzsp1/2018-06-01.log&lt;BR /&gt;&lt;BR /&gt;
    sourcetype =    syslog      &lt;/P&gt;</description>
      <pubDate>Wed, 30 May 2018 16:38:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-get-the-host-IP-address-from-the-search/m-p/431786#M75545</guid>
      <dc:creator>abassydo2018</dc:creator>
      <dc:date>2018-05-30T16:38:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the host IP address from the search?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-get-the-host-IP-address-from-the-search/m-p/431787#M75546</link>
      <description>&lt;P&gt;The IP address appears in the raw event but is it being parsed out into a field? In your search you're making a table with these fields &lt;CODE&gt;| table source host host_ip&lt;/CODE&gt; If you're not seing any values in host_ip perhaps the field has a different name.&lt;/P&gt;</description>
      <pubDate>Wed, 30 May 2018 17:59:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-get-the-host-IP-address-from-the-search/m-p/431787#M75546</guid>
      <dc:creator>dflodstrom</dc:creator>
      <dc:date>2018-05-30T17:59:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the host IP address from the search?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-get-the-host-IP-address-from-the-search/m-p/431788#M75547</link>
      <description>&lt;P&gt;I agree with dflodstrom, if the IP address is not being placed into a field already, you can use rex to do it:&lt;BR /&gt;
    | rex "info\slogger:\s[.[^]]+][.[^]]+]\s(?&lt;HOST_IP&gt;.[^\s]+)"&lt;BR /&gt;
    | table source host host_ip&lt;/HOST_IP&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 30 May 2018 18:11:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-get-the-host-IP-address-from-the-search/m-p/431788#M75547</guid>
      <dc:creator>jodyfsu</dc:creator>
      <dc:date>2018-05-30T18:11:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the host IP address from the search?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-get-the-host-IP-address-from-the-search/m-p/431789#M75548</link>
      <description>&lt;P&gt;I got the result I wanted. I needed to go into the LB to check for the pool-name adn the status of the members of the LB. Then I added the values to the field and I got the Result I wanted.&lt;/P&gt;

&lt;P&gt;index="device_name" unix_category=all_hosts pool_name="pool-name" | spath address | table host address session_status status_reason&lt;/P&gt;

&lt;P&gt;Thank you guys, I really appreciate your help and support. You guys are just too great.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 19:47:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-get-the-host-IP-address-from-the-search/m-p/431789#M75548</guid>
      <dc:creator>abassydo2018</dc:creator>
      <dc:date>2020-09-29T19:47:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the host IP address from the search?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-get-the-host-IP-address-from-the-search/m-p/431790#M75549</link>
      <description>&lt;P&gt;@abassydo2018, I have converted your comment to Answer. Please accept the same to mark this question as answered and benefit other users facing similar issue in future!&lt;/P&gt;</description>
      <pubDate>Wed, 30 May 2018 19:07:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-get-the-host-IP-address-from-the-search/m-p/431790#M75549</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2018-05-30T19:07:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the host IP address from the search?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-get-the-host-IP-address-from-the-search/m-p/431791#M75550</link>
      <description>&lt;P&gt;Thank you NiketNilay&lt;/P&gt;</description>
      <pubDate>Wed, 30 May 2018 19:12:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-get-the-host-IP-address-from-the-search/m-p/431791#M75550</guid>
      <dc:creator>abassydo2018</dc:creator>
      <dc:date>2018-05-30T19:12:11Z</dc:date>
    </item>
  </channel>
</rss>

