<?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: Why does Splunk not recognize standard fields in my Apache data forwarded by syslog? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Why-does-Splunk-not-recognize-standard-fields-in-my-Apache-data/m-p/167775#M33970</link>
    <description>&lt;P&gt;However, my data does not normally use key=value pairs, nor is it XML or JSON based, and &lt;CODE&gt;KV_MODE=auto&lt;/CODE&gt; is already the default. My log data is standard, Unix-type syslog data.&lt;/P&gt;</description>
    <pubDate>Wed, 07 Jan 2015 16:34:47 GMT</pubDate>
    <dc:creator>stefanlasiewski</dc:creator>
    <dc:date>2015-01-07T16:34:47Z</dc:date>
    <item>
      <title>Why does Splunk not recognize standard fields in my Apache data forwarded by syslog?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-does-Splunk-not-recognize-standard-fields-in-my-Apache-data/m-p/167764#M33959</link>
      <description>&lt;P&gt;I have over 100 Apache webservers which forward their logs to a syslog-ng server, which then forwards the data a TCP data input on Splunk, as well as forwarding the data to other non-Splunk log-analysis servers.&lt;/P&gt;

&lt;P&gt;In Splunk Search, the data looks like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Dec 16 10:29:59 192.168.99.100 httpd[10583]: site1.example.org 10.4.5.6 - - [16/Dec/2014:10:29:59 -0800] "GET /rest/somepath/12345" HTTP/1.1" 200 105066 "-" "-"
Dec 16 10:29:59 192.168.99.101 httpd[22404]: site2.example.org 4.4.12.15 - someuser [16/Dec/2014:10:29:59 -0800] "GET /wiki/javascript/foo.js" HTTP/1.1" 304 - "https://site2.example.org/wiki/somepage.html" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.71 Safari/537.36"
Dec 16 10:29:59 192.168.6.100 httpd[6380]: site3.example.org 172.16.43.41 - - [16/Dec/2014:10:29:59 -0800] "GET /project/projectA/somescript.cgi?username=spiderman" 200 9048 "-" "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;However, Splunk recognizes only a few default fields in this data. It recognizes the &lt;CODE&gt;host&lt;/CODE&gt;, &lt;CODE&gt;process&lt;/CODE&gt;, &lt;CODE&gt;source&lt;/CODE&gt;, &lt;CODE&gt;sourcetype&lt;/CODE&gt;, &lt;CODE&gt;data_hour&lt;/CODE&gt;, etc. It does not recognize Apache-specific fields like &lt;CODE&gt;clientip&lt;/CODE&gt; &lt;CODE&gt;status&lt;/CODE&gt;, &lt;CODE&gt;method&lt;/CODE&gt;, etc. which are mentioned &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/SearchTutorial/Usefieldstosearch"&gt;in the Splunk tutorial&lt;/A&gt;. It doesn't even recognize string like &lt;CODE&gt;4.4.12.15&lt;/CODE&gt; as an IP address.&lt;/P&gt;

&lt;P&gt;As a result, I need to create a whole bunch of custom field extractions in order to do many useful tasks in Splunk.&lt;/P&gt;

&lt;P&gt;Why does Splunk not recognize fields in my Apache data? How can I transform the data so that Splunk will recognize the data correctly?&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Second question&lt;/STRONG&gt;: Would it help if I used a Splunk Forwarder on our syslog server instead of using TCP for data input?&lt;/P&gt;</description>
      <pubDate>Mon, 05 Jan 2015 19:48:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-does-Splunk-not-recognize-standard-fields-in-my-Apache-data/m-p/167764#M33959</guid>
      <dc:creator>stefanlasiewski</dc:creator>
      <dc:date>2015-01-05T19:48:20Z</dc:date>
    </item>
    <item>
      <title>Re: Why does Splunk not recognize standard fields in my Apache data forwarded by syslog?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-does-Splunk-not-recognize-standard-fields-in-my-Apache-data/m-p/167765#M33960</link>
      <description>&lt;P&gt;The first parts of each line in these events look like syslog data so this data is likely getting seen as a syslog sourcetype. The client IP field above is where it actually starts looking like combined apache access data.  Events consisting of mish-mosh of two different sourcetypes is obviously not going to work with the built-ins so you either need to remove the part of the events that are not part of the pretrained apache access log sourcetype before input or implement a transform that trims all that syslog stuff before the clientip. Another way would be to customize either of the two extraction transforms to perhaps use bits from the other at which point you will have created your own syslog-httpd-access sourcetype. I wanted to share a little background on why it is not working but instead of doing all the work yourself, you might want to look at this:&lt;/P&gt;

&lt;P&gt;&lt;A href="http://wiki.splunk.com/Community:StripSyslog"&gt;http://wiki.splunk.com/Community:StripSyslog&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Jan 2015 21:14:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-does-Splunk-not-recognize-standard-fields-in-my-Apache-data/m-p/167765#M33960</guid>
      <dc:creator>chanfoli</dc:creator>
      <dc:date>2015-01-05T21:14:54Z</dc:date>
    </item>
    <item>
      <title>Re: Why does Splunk not recognize standard fields in my Apache data forwarded by syslog?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-does-Splunk-not-recognize-standard-fields-in-my-Apache-data/m-p/167766#M33961</link>
      <description>&lt;P&gt;Thanks for the help. I made progress, but I'm still not there yet.&lt;/P&gt;

&lt;P&gt;I used &lt;CODE&gt;transforms.conf&lt;/CODE&gt; and &lt;CODE&gt;props.conf&lt;/CODE&gt; as described on that page to transform data from the old format:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Dec 16 10:29:59 192.168.99.100 httpd[10583]: site1.example.org 10.4.5.6 - - [16/Dec/2014:10:29:59 -0800] "GET /rest/somepath/12345" HTTP/1.1" 200 105066 "-" "-"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;To the new format:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;10.4.5.6 - - [16/Dec/2014:10:29:59 -0800] "GET /rest/somepath/12345" HTTP/1.1" 200 105066 "-" "-"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Splunk still doesn't recognize any of the Apache-specific fields such as &lt;CODE&gt;clientip&lt;/CODE&gt; or &lt;CODE&gt;status&lt;/CODE&gt;. Any ideas?&lt;/P&gt;</description>
      <pubDate>Mon, 05 Jan 2015 22:34:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-does-Splunk-not-recognize-standard-fields-in-my-Apache-data/m-p/167766#M33961</guid>
      <dc:creator>stefanlasiewski</dc:creator>
      <dc:date>2015-01-05T22:34:43Z</dc:date>
    </item>
    <item>
      <title>Re: Why does Splunk not recognize standard fields in my Apache data forwarded by syslog?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-does-Splunk-not-recognize-standard-fields-in-my-Apache-data/m-p/167767#M33962</link>
      <description>&lt;P&gt;What sourcetype is the data getting indexed as. The sourcetype on this input might be set to something other than access_common. IIRC splunk determines pretrained sourcetypes based on some of the first data in the input. So you may need to set the sourcetype of the input to access_common.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 18:34:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-does-Splunk-not-recognize-standard-fields-in-my-Apache-data/m-p/167767#M33962</guid>
      <dc:creator>chanfoli</dc:creator>
      <dc:date>2020-09-28T18:34:17Z</dc:date>
    </item>
    <item>
      <title>Re: Why does Splunk not recognize standard fields in my Apache data forwarded by syslog?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-does-Splunk-not-recognize-standard-fields-in-my-Apache-data/m-p/167768#M33963</link>
      <description>&lt;P&gt;The sourcetype is still set to &lt;CODE&gt;syslog&lt;/CODE&gt;. I'm not sure if or how I can change that.&lt;/P&gt;</description>
      <pubDate>Mon, 05 Jan 2015 23:12:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-does-Splunk-not-recognize-standard-fields-in-my-Apache-data/m-p/167768#M33963</guid>
      <dc:creator>stefanlasiewski</dc:creator>
      <dc:date>2015-01-05T23:12:17Z</dc:date>
    </item>
    <item>
      <title>Re: Why does Splunk not recognize standard fields in my Apache data forwarded by syslog?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-does-Splunk-not-recognize-standard-fields-in-my-Apache-data/m-p/167769#M33964</link>
      <description>&lt;P&gt;try adding the reference to the correct extraction to the syslog sourcetype, if you have other types of data coming in as syslog, it might be impacted. The correct way to address this either requires breaking out different sourcetypes from your syslog data or doing something more advanced using an event based override as described here:&lt;BR /&gt;
&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.2.1/Data/Advancedsourcetypeoverrides"&gt;http://docs.splunk.com/Documentation/Splunk/6.2.1/Data/Advancedsourcetypeoverrides&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;If you have only apache data here you may be able to add this to the syslog sourcetype stanza in props.conf and have it work, but this may break not properly transform other events:&lt;BR /&gt;
REPORT-access = access-extractions&lt;/P&gt;

&lt;P&gt;This is what actually tells it what extraction definition to use.&lt;/P&gt;</description>
      <pubDate>Mon, 05 Jan 2015 23:36:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-does-Splunk-not-recognize-standard-fields-in-my-Apache-data/m-p/167769#M33964</guid>
      <dc:creator>chanfoli</dc:creator>
      <dc:date>2015-01-05T23:36:34Z</dc:date>
    </item>
    <item>
      <title>Re: Why does Splunk not recognize standard fields in my Apache data forwarded by syslog?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-does-Splunk-not-recognize-standard-fields-in-my-Apache-data/m-p/167770#M33965</link>
      <description>&lt;P&gt;Thanks. These syslogs contain data from thousands of systems and contain more than just Apache log data. I'll take a look at your suggestion.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Jan 2015 00:51:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-does-Splunk-not-recognize-standard-fields-in-my-Apache-data/m-p/167770#M33965</guid>
      <dc:creator>stefanlasiewski</dc:creator>
      <dc:date>2015-01-06T00:51:39Z</dc:date>
    </item>
    <item>
      <title>Re: Why does Splunk not recognize standard fields in my Apache data forwarded by syslog?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-does-Splunk-not-recognize-standard-fields-in-my-Apache-data/m-p/167771#M33966</link>
      <description>&lt;P&gt;KV_MODE attribute to specify the field/value extraction mode for your data in props.conf&lt;/P&gt;

&lt;P&gt;auto: Extracts field/value pairs and separates them with equal signs. This is the default field extraction behavior if you do not include this attribute in your field extraction stanza.&lt;/P&gt;

&lt;P&gt;KV_MODE = auto&lt;/P&gt;

&lt;P&gt;Hope it can work&lt;/P&gt;</description>
      <pubDate>Tue, 06 Jan 2015 15:13:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-does-Splunk-not-recognize-standard-fields-in-my-Apache-data/m-p/167771#M33966</guid>
      <dc:creator>neelamssantosh</dc:creator>
      <dc:date>2015-01-06T15:13:46Z</dc:date>
    </item>
    <item>
      <title>Re: Why does Splunk not recognize standard fields in my Apache data forwarded by syslog?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-does-Splunk-not-recognize-standard-fields-in-my-Apache-data/m-p/167772#M33967</link>
      <description>&lt;P&gt;The original question has nothing to do with key/value equal-sign extractions.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Jan 2015 15:16:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-does-Splunk-not-recognize-standard-fields-in-my-Apache-data/m-p/167772#M33967</guid>
      <dc:creator>chanfoli</dc:creator>
      <dc:date>2015-01-06T15:16:00Z</dc:date>
    </item>
    <item>
      <title>Re: Why does Splunk not recognize standard fields in my Apache data forwarded by syslog?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-does-Splunk-not-recognize-standard-fields-in-my-Apache-data/m-p/167773#M33968</link>
      <description>&lt;P&gt;I'm not sure what &lt;CODE&gt;KV_MODE&lt;/CODE&gt; has to do with my problem. Can you explain?&lt;/P&gt;</description>
      <pubDate>Tue, 06 Jan 2015 18:08:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-does-Splunk-not-recognize-standard-fields-in-my-Apache-data/m-p/167773#M33968</guid>
      <dc:creator>stefanlasiewski</dc:creator>
      <dc:date>2015-01-06T18:08:46Z</dc:date>
    </item>
    <item>
      <title>Re: Why does Splunk not recognize standard fields in my Apache data forwarded by syslog?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-does-Splunk-not-recognize-standard-fields-in-my-Apache-data/m-p/167774#M33969</link>
      <description>&lt;P&gt;It automatically extracts the fields. In your case, clientip and status can be extracted by splunk intelligence. Which can be seen in interesting fields.mostly on indexer/seachheads to avoid the load it is kept to None. Kindly check with this option.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jan 2015 05:32:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-does-Splunk-not-recognize-standard-fields-in-my-Apache-data/m-p/167774#M33969</guid>
      <dc:creator>neelamssantosh</dc:creator>
      <dc:date>2015-01-07T05:32:25Z</dc:date>
    </item>
    <item>
      <title>Re: Why does Splunk not recognize standard fields in my Apache data forwarded by syslog?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-does-Splunk-not-recognize-standard-fields-in-my-Apache-data/m-p/167775#M33970</link>
      <description>&lt;P&gt;However, my data does not normally use key=value pairs, nor is it XML or JSON based, and &lt;CODE&gt;KV_MODE=auto&lt;/CODE&gt; is already the default. My log data is standard, Unix-type syslog data.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jan 2015 16:34:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-does-Splunk-not-recognize-standard-fields-in-my-Apache-data/m-p/167775#M33970</guid>
      <dc:creator>stefanlasiewski</dc:creator>
      <dc:date>2015-01-07T16:34:47Z</dc:date>
    </item>
    <item>
      <title>Re: Why does Splunk not recognize standard fields in my Apache data forwarded by syslog?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-does-Splunk-not-recognize-standard-fields-in-my-Apache-data/m-p/167776#M33971</link>
      <description>&lt;P&gt;@chanfoli, do you think this would be better if I put a Splunk Forwarder on my syslog server instead? I imagine that this way, the data won't automatically get tagged with the &lt;CODE&gt;syslog&lt;/CODE&gt; sourcetype and the fields might get extracted correctly. I would probably need to strip the Syslog header on the Splunk Forwarder, but I am not sure if that is possible.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jan 2015 16:36:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-does-Splunk-not-recognize-standard-fields-in-my-Apache-data/m-p/167776#M33971</guid>
      <dc:creator>stefanlasiewski</dc:creator>
      <dc:date>2015-01-07T16:36:45Z</dc:date>
    </item>
  </channel>
</rss>

