<?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 see www* as host from secure.log and access.log ? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-see-www-as-host-from-secure-log-and-access-log/m-p/282555#M54003</link>
    <description>&lt;P&gt;Hi Pankaj,&lt;/P&gt;

&lt;P&gt;I followed this method to remove the events and reindex the same logs.&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;Used &lt;STRONG&gt;|delete&lt;/STRONG&gt; to delete all the events on Search Head&lt;/LI&gt;
&lt;LI&gt;On each Indexer use ./splunk stop and then ./splunk clean eventdata -index _fishbucket&lt;/LI&gt;
&lt;LI&gt;On a Universal-Forwarder rm -rf /opt/splunkforwarder/var/lib/splunk/fishbucket/*&lt;/LI&gt;
&lt;LI&gt;Put the stanza as u mention on Deployment Server and done ./splunk reload deploy-server to reflect it on UF.&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;[monitor:///opt/log/www*/secure.log]&lt;BR /&gt;
disabled = 0&lt;BR /&gt;
host_segment = 3&lt;BR /&gt;
sourcetype = secure.log&lt;BR /&gt;
index = main&lt;/P&gt;

&lt;P&gt;[monitor:///opt/log/www*/access.log]&lt;BR /&gt;
disabled = 0&lt;BR /&gt;
host_segment = 3&lt;BR /&gt;
sourcetype = access.log&lt;BR /&gt;
index = web&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;On Indexer done ./splunk start&lt;/LI&gt;
&lt;/OL&gt;</description>
    <pubDate>Tue, 20 Dec 2016 12:17:01 GMT</pubDate>
    <dc:creator>princemanto2580</dc:creator>
    <dc:date>2016-12-20T12:17:01Z</dc:date>
    <item>
      <title>How to see www* as host from secure.log and access.log ?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-see-www-as-host-from-secure-log-and-access-log/m-p/282547#M53995</link>
      <description>&lt;P&gt;Hello Splunkers,&lt;/P&gt;

&lt;P&gt;I am forwarding logs from Universal Forwarder, to a Search Peer (Standalone Inderxer) and doing the search from a standalone Search Head. I have done as far from my understanding. &lt;STRONG&gt;How can I see access.log and secure.log from host www1 -www9.&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;Below is the inputs.conf of my UF: (log path:- /opt/logs/www1 - www9)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[default]
host = UF-01-248

[monitor:///opt/log/www*/secure.log]
disabled = 0
host_segment = 5
sourcetype = secure.log
index = main

[monitor:///opt/log/www*/access.log]
disabled = 0
host_segment = 9
sourcetype = access.log
index = web
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 15 Dec 2016 15:52:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-see-www-as-host-from-secure-log-and-access-log/m-p/282547#M53995</guid>
      <dc:creator>princemanto2580</dc:creator>
      <dc:date>2016-12-15T15:52:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to see www* as host from secure.log and access.log ?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-see-www-as-host-from-secure-log-and-access-log/m-p/282548#M53996</link>
      <description>&lt;P&gt;Try setting host_segment (which is basically on what level the host is available in file path/source) to 3 for both. Seems like 3rd portion of the path is what you want as host. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;In /opt/log/www*/ : opt-1st, log-2nd, www*-3rd
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 15 Dec 2016 16:53:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-see-www-as-host-from-secure-log-and-access-log/m-p/282548#M53996</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-12-15T16:53:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to see www* as host from secure.log and access.log ?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-see-www-as-host-from-secure-log-and-access-log/m-p/282549#M53997</link>
      <description>&lt;P&gt;Thanks for reviewing my post. You mean to say like below,&lt;/P&gt;

&lt;P&gt;[default]&lt;BR /&gt;
 host = UF-01-248&lt;/P&gt;

&lt;P&gt;[monitor:///opt/log/www*/secure*]&lt;BR /&gt;
 disabled = 0&lt;BR /&gt;
 host_segment = 5&lt;BR /&gt;
 sourcetype = secure.log&lt;BR /&gt;
 index = main&lt;/P&gt;

&lt;P&gt;[monitor:///opt/log/www*/access*]&lt;BR /&gt;
 disabled = 0&lt;BR /&gt;
 host_segment = 9&lt;BR /&gt;
 sourcetype = access.log&lt;BR /&gt;
 index = web&lt;/P&gt;

&lt;P&gt;My requirement is to see www1, www2 etc as individual host from Search Head with individual access.log or secure.log&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 12:08:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-see-www-as-host-from-secure-log-and-access-log/m-p/282549#M53997</guid>
      <dc:creator>princemanto2580</dc:creator>
      <dc:date>2020-09-29T12:08:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to see www* as host from secure.log and access.log ?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-see-www-as-host-from-secure-log-and-access-log/m-p/282550#M53998</link>
      <description>&lt;P&gt;You can use the &lt;CODE&gt;host_segment&lt;/CODE&gt; attribute to choose any segment of the monitored path to be the host value. For example, a &lt;CODE&gt;host_segment=3&lt;/CODE&gt; setting should pick up the "www*" value from your above monitored path. Also, you can use regular expression with the &lt;CODE&gt;host_regex&lt;/CODE&gt; attribute for more advanced ways to dynamically set the host value.&lt;/P&gt;

&lt;P&gt;Here is the documentation and examples on how to dynamically setup the host value.&lt;BR /&gt;
&lt;A href="https://docs.splunk.com/Documentation/Splunk/6.5.1/Data/Setadefaulthostforaninput#Dynamically_set_the_default_host_value"&gt;https://docs.splunk.com/Documentation/Splunk/6.5.1/Data/Setadefaulthostforaninput#Dynamically_set_the_default_host_value&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Dec 2016 00:32:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-see-www-as-host-from-secure-log-and-access-log/m-p/282550#M53998</guid>
      <dc:creator>nkwong_splunk</dc:creator>
      <dc:date>2016-12-20T00:32:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to see www* as host from secure.log and access.log ?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-see-www-as-host-from-secure-log-and-access-log/m-p/282551#M53999</link>
      <description>&lt;P&gt;Thanks for the update, but I achieved 50% as per my requirement. As I would like to send this access.log into index = web.&lt;/P&gt;

&lt;P&gt;Below changes, will work ?&lt;/P&gt;

&lt;P&gt;[monitor:///opt/log/]&lt;BR /&gt;
disabled = 0&lt;BR /&gt;
host_segment = 3&lt;/P&gt;

&lt;P&gt;[monitor:///opt/log/]&lt;BR /&gt;
disabled = 0&lt;BR /&gt;
host_segment = 3&lt;BR /&gt;
sourcetype = access.log&lt;BR /&gt;
index = web&lt;/P&gt;</description>
      <pubDate>Tue, 20 Dec 2016 06:04:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-see-www-as-host-from-secure-log-and-access-log/m-p/282551#M53999</guid>
      <dc:creator>princemanto2580</dc:creator>
      <dc:date>2016-12-20T06:04:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to see www* as host from secure.log and access.log ?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-see-www-as-host-from-secure-log-and-access-log/m-p/282552#M54000</link>
      <description>&lt;P&gt;Try this:&lt;/P&gt;

&lt;P&gt;[monitor:///opt/log/www*/secure.log]&lt;BR /&gt;
 disabled = 0&lt;BR /&gt;
 host_segment = 3&lt;BR /&gt;
 sourcetype = secure.log&lt;BR /&gt;
 index = main&lt;/P&gt;

&lt;P&gt;[monitor:///opt/log/www*/access.log]&lt;BR /&gt;
 disabled = 0&lt;BR /&gt;
 host_segment = 3&lt;BR /&gt;
 sourcetype = access.log&lt;BR /&gt;
 index = web&lt;/P&gt;

&lt;P&gt;Let me know if that doesn't work.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Dec 2016 10:04:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-see-www-as-host-from-secure-log-and-access-log/m-p/282552#M54000</guid>
      <dc:creator>pjvarjani</dc:creator>
      <dc:date>2016-12-20T10:04:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to see www* as host from secure.log and access.log ?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-see-www-as-host-from-secure-log-and-access-log/m-p/282553#M54001</link>
      <description>&lt;P&gt;Sorry, I tried it earlier but didn't work.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Dec 2016 11:34:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-see-www-as-host-from-secure-log-and-access-log/m-p/282553#M54001</guid>
      <dc:creator>princemanto2580</dc:creator>
      <dc:date>2016-12-20T11:34:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to see www* as host from secure.log and access.log ?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-see-www-as-host-from-secure-log-and-access-log/m-p/282554#M54002</link>
      <description>&lt;P&gt;I tried this in my environment and its working perfectly&lt;/P&gt;

&lt;P&gt;[monitor:///opt/log/www*/access.log]&lt;BR /&gt;
index = web&lt;BR /&gt;
host_segment = 3&lt;/P&gt;

&lt;P&gt;[monitor:///opt/log/www*/secure.log]&lt;BR /&gt;
host_segment = 3&lt;/P&gt;

&lt;P&gt;Can you clear the fishbucket and try indexing the data again?&lt;/P&gt;

&lt;P&gt;Thanks,&lt;BR /&gt;
Pankaj&lt;/P&gt;</description>
      <pubDate>Tue, 20 Dec 2016 11:46:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-see-www-as-host-from-secure-log-and-access-log/m-p/282554#M54002</guid>
      <dc:creator>pjvarjani</dc:creator>
      <dc:date>2016-12-20T11:46:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to see www* as host from secure.log and access.log ?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-see-www-as-host-from-secure-log-and-access-log/m-p/282555#M54003</link>
      <description>&lt;P&gt;Hi Pankaj,&lt;/P&gt;

&lt;P&gt;I followed this method to remove the events and reindex the same logs.&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;Used &lt;STRONG&gt;|delete&lt;/STRONG&gt; to delete all the events on Search Head&lt;/LI&gt;
&lt;LI&gt;On each Indexer use ./splunk stop and then ./splunk clean eventdata -index _fishbucket&lt;/LI&gt;
&lt;LI&gt;On a Universal-Forwarder rm -rf /opt/splunkforwarder/var/lib/splunk/fishbucket/*&lt;/LI&gt;
&lt;LI&gt;Put the stanza as u mention on Deployment Server and done ./splunk reload deploy-server to reflect it on UF.&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;[monitor:///opt/log/www*/secure.log]&lt;BR /&gt;
disabled = 0&lt;BR /&gt;
host_segment = 3&lt;BR /&gt;
sourcetype = secure.log&lt;BR /&gt;
index = main&lt;/P&gt;

&lt;P&gt;[monitor:///opt/log/www*/access.log]&lt;BR /&gt;
disabled = 0&lt;BR /&gt;
host_segment = 3&lt;BR /&gt;
sourcetype = access.log&lt;BR /&gt;
index = web&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;On Indexer done ./splunk start&lt;/LI&gt;
&lt;/OL&gt;</description>
      <pubDate>Tue, 20 Dec 2016 12:17:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-see-www-as-host-from-secure-log-and-access-log/m-p/282555#M54003</guid>
      <dc:creator>princemanto2580</dc:creator>
      <dc:date>2016-12-20T12:17:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to see www* as host from secure.log and access.log ?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-see-www-as-host-from-secure-log-and-access-log/m-p/282556#M54004</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/2246iB93D6AA6C841A793/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/2247i58292937C389780B/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Dec 2016 13:56:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-see-www-as-host-from-secure-log-and-access-log/m-p/282556#M54004</guid>
      <dc:creator>princemanto2580</dc:creator>
      <dc:date>2016-12-20T13:56:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to see www* as host from secure.log and access.log ?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-see-www-as-host-from-secure-log-and-access-log/m-p/282557#M54005</link>
      <description>&lt;P&gt;During search when I putting index=web, it shows all individual host for access.log. But from Welcome screen, I can not see sourcetype as access.log.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Dec 2016 06:08:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-see-www-as-host-from-secure-log-and-access-log/m-p/282557#M54005</guid>
      <dc:creator>princemanto2580</dc:creator>
      <dc:date>2016-12-22T06:08:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to see www* as host from secure.log and access.log ?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-see-www-as-host-from-secure-log-and-access-log/m-p/282558#M54006</link>
      <description>&lt;P&gt;Yes they will. &lt;/P&gt;</description>
      <pubDate>Thu, 22 Dec 2016 09:26:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-see-www-as-host-from-secure-log-and-access-log/m-p/282558#M54006</guid>
      <dc:creator>esix_splunk</dc:creator>
      <dc:date>2016-12-22T09:26:32Z</dc:date>
    </item>
  </channel>
</rss>

