<?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 apache virtual hosts - custom field? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/apache-virtual-hosts-custom-field/m-p/148652#M30269</link>
    <description>&lt;P&gt;I have several virtual hosts per Apache server, and I want to be able to report on them individually. I envision that I need to add a custom field, somehow, to each input for the indexer?&lt;/P&gt;

&lt;P&gt;How could I achieve this?  I would prefer all of this happen on the universalforwarder.&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
    <pubDate>Tue, 19 Nov 2013 22:18:30 GMT</pubDate>
    <dc:creator>jgauthier</dc:creator>
    <dc:date>2013-11-19T22:18:30Z</dc:date>
    <item>
      <title>apache virtual hosts - custom field?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/apache-virtual-hosts-custom-field/m-p/148652#M30269</link>
      <description>&lt;P&gt;I have several virtual hosts per Apache server, and I want to be able to report on them individually. I envision that I need to add a custom field, somehow, to each input for the indexer?&lt;/P&gt;

&lt;P&gt;How could I achieve this?  I would prefer all of this happen on the universalforwarder.&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 19 Nov 2013 22:18:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/apache-virtual-hosts-custom-field/m-p/148652#M30269</guid>
      <dc:creator>jgauthier</dc:creator>
      <dc:date>2013-11-19T22:18:30Z</dc:date>
    </item>
    <item>
      <title>Re: apache virtual hosts - custom field?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/apache-virtual-hosts-custom-field/m-p/148653#M30270</link>
      <description>&lt;P&gt;how is your log configured right now?&lt;/P&gt;

&lt;P&gt;CustomLog ${APACHE_LOG_DIR}/myvirtualhost/access.log&lt;/P&gt;

&lt;P&gt;For example, if logs from a virtual host are organized under ${APACHE_LOG_DIR}/myvirtualhost, you can add the following line to your input.conf&lt;/P&gt;

&lt;P&gt;[monitor:///var/log/apache/myvirtualhost]&lt;BR /&gt;
host_segment = 4&lt;/P&gt;

&lt;P&gt;That way, "myvirtualhost" will be the host name for all log files that live under myvirtualhost. &lt;/P&gt;

&lt;P&gt;Sorry If i misunderstood your question.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 15:19:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/apache-virtual-hosts-custom-field/m-p/148653#M30270</guid>
      <dc:creator>bchoi_splunk</dc:creator>
      <dc:date>2020-09-28T15:19:11Z</dc:date>
    </item>
    <item>
      <title>Re: apache virtual hosts - custom field?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/apache-virtual-hosts-custom-field/m-p/148654#M30271</link>
      <description>&lt;P&gt;That could work, but I actually want to retain the host information as the server it comes from. It could be multiple servers.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Nov 2013 01:06:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/apache-virtual-hosts-custom-field/m-p/148654#M30271</guid>
      <dc:creator>jgauthier</dc:creator>
      <dc:date>2013-11-20T01:06:59Z</dc:date>
    </item>
    <item>
      <title>Re: apache virtual hosts - custom field?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/apache-virtual-hosts-custom-field/m-p/148655#M30272</link>
      <description>&lt;P&gt;how about adding a field? you can add the following to your search:&lt;/P&gt;

&lt;P&gt;&lt;YOUR_SEARCH&gt; | rex field=host /log/var/(?&lt;VHOST_NAME&gt;.*)/&lt;/VHOST_NAME&gt;&lt;/YOUR_SEARCH&gt;&lt;/P&gt;

&lt;P&gt;you can also add it to your field extractor. Would this work?&lt;/P&gt;</description>
      <pubDate>Wed, 20 Nov 2013 02:17:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/apache-virtual-hosts-custom-field/m-p/148655#M30272</guid>
      <dc:creator>bchoi_splunk</dc:creator>
      <dc:date>2013-11-20T02:17:06Z</dc:date>
    </item>
    <item>
      <title>Re: apache virtual hosts - custom field?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/apache-virtual-hosts-custom-field/m-p/148656#M30273</link>
      <description>&lt;P&gt;Oh yeah, that makes a ton of sense! I'll see what I can do with that. Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 20 Nov 2013 02:32:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/apache-virtual-hosts-custom-field/m-p/148656#M30273</guid>
      <dc:creator>jgauthier</dc:creator>
      <dc:date>2013-11-20T02:32:07Z</dc:date>
    </item>
  </channel>
</rss>

