<?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 Override Sourcetype in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Override-Sourcetype/m-p/173916#M49907</link>
    <description>&lt;P&gt;I'm trying to do a sourcetype override and not having much luck. I am trying to change the sourcetype from 2 hosts, from udp:514 to "PAN". I went through the "Override Sourcetype" guide and followed the example. When opening the transforms.conf and props.conf file there is a message that says, "Do not edit this file. Make edits in etc/system/local." Ok, so in "etc/system/local" I created tthe transforms.conf and props.conf files and placed the following inside:&lt;BR /&gt;
&lt;STRONG&gt;"transforms.conf"&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;[set_sourcetype_syslog_pan]&lt;/P&gt;

&lt;P&gt;REGEX = :\d\d\s+(?:\d+\s+|(?:user|daemon|local.?).\w+\s+)&lt;EM&gt;[?(10.0.1.21|10.0.1.23)[\w.-]&lt;/EM&gt;]?\s&lt;/P&gt;

&lt;P&gt;FORMAT = sourcetype::PAN&lt;/P&gt;

&lt;P&gt;DEST_KEY = MetaData:Sourcetype&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;"props.conf"&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;[source::udp:514]&lt;/P&gt;

&lt;P&gt;TRANSFORMS-changesourcetype = set_sourcetype_syslog_pan&lt;/P&gt;

&lt;P&gt;This appears to of had no effect. All sourcetypes still show as "syslog". When I tried to test the REGEX in Splunk with the rex command I received the error: "Error in 'SearchParser': Missing a search command before '('.&lt;/P&gt;

&lt;P&gt;So what's wrong here? The REGEX is right out of the guide, so I don't think it should error out.&lt;/P&gt;

&lt;P&gt;Thank you.&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 16:02:26 GMT</pubDate>
    <dc:creator>Bill_B</dc:creator>
    <dc:date>2020-09-28T16:02:26Z</dc:date>
    <item>
      <title>Override Sourcetype</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Override-Sourcetype/m-p/173916#M49907</link>
      <description>&lt;P&gt;I'm trying to do a sourcetype override and not having much luck. I am trying to change the sourcetype from 2 hosts, from udp:514 to "PAN". I went through the "Override Sourcetype" guide and followed the example. When opening the transforms.conf and props.conf file there is a message that says, "Do not edit this file. Make edits in etc/system/local." Ok, so in "etc/system/local" I created tthe transforms.conf and props.conf files and placed the following inside:&lt;BR /&gt;
&lt;STRONG&gt;"transforms.conf"&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;[set_sourcetype_syslog_pan]&lt;/P&gt;

&lt;P&gt;REGEX = :\d\d\s+(?:\d+\s+|(?:user|daemon|local.?).\w+\s+)&lt;EM&gt;[?(10.0.1.21|10.0.1.23)[\w.-]&lt;/EM&gt;]?\s&lt;/P&gt;

&lt;P&gt;FORMAT = sourcetype::PAN&lt;/P&gt;

&lt;P&gt;DEST_KEY = MetaData:Sourcetype&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;"props.conf"&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;[source::udp:514]&lt;/P&gt;

&lt;P&gt;TRANSFORMS-changesourcetype = set_sourcetype_syslog_pan&lt;/P&gt;

&lt;P&gt;This appears to of had no effect. All sourcetypes still show as "syslog". When I tried to test the REGEX in Splunk with the rex command I received the error: "Error in 'SearchParser': Missing a search command before '('.&lt;/P&gt;

&lt;P&gt;So what's wrong here? The REGEX is right out of the guide, so I don't think it should error out.&lt;/P&gt;

&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 16:02:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Override-Sourcetype/m-p/173916#M49907</guid>
      <dc:creator>Bill_B</dc:creator>
      <dc:date>2020-09-28T16:02:26Z</dc:date>
    </item>
    <item>
      <title>Re: Override Sourcetype</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Override-Sourcetype/m-p/173917#M49908</link>
      <description>&lt;P&gt;Data can only be transformed as it is being parsed - once it is written to the index, the &lt;CODE&gt;transforms.conf&lt;/CODE&gt; settings have no effect.&lt;/P&gt;

&lt;P&gt;You did the right thing by putting creating the files in the &lt;CODE&gt;local&lt;/CODE&gt; directory. Without looking too closely, the syntax is right. But none of that is going to effect existing data. And I think you are doing this the hard way.&lt;/P&gt;

&lt;P&gt;So, you need to do two things:&lt;/P&gt;

&lt;P&gt;1) Set the sourcetype for incoming data. You can do this in &lt;CODE&gt;inputs.conf&lt;/CODE&gt; for all data in an input like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[udp://514]
sourcetype=PAN
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;2) setting an alias for the sourcetype for existing data. You can do this under the "Settings" ("Manager" in older versions). Look for "Fields" and within that, choose the sourcetype alias. After the erroneous data ages out of the index, you can remove the alias.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Mar 2014 06:12:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Override-Sourcetype/m-p/173917#M49908</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2014-03-05T06:12:19Z</dc:date>
    </item>
    <item>
      <title>Re: Override Sourcetype</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Override-Sourcetype/m-p/173918#M49909</link>
      <description>&lt;P&gt;Thanks for your answer lguinn, but I am trying to do a sourcetype override based on host. As in the example at the bottom of this doc: &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.0/Data/Advancedsourcetypeoverrides"&gt;http://docs.splunk.com/Documentation/Splunk/6.0/Data/Advancedsourcetypeoverrides&lt;/A&gt;&lt;BR /&gt;
I have multiple hosts sending events to udp:514 but I would like the events from certain hosts to be overridden and labeled differently.&lt;BR /&gt;
Any ideas?&lt;/P&gt;</description>
      <pubDate>Thu, 06 Mar 2014 01:57:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Override-Sourcetype/m-p/173918#M49909</guid>
      <dc:creator>Bill_B</dc:creator>
      <dc:date>2014-03-06T01:57:58Z</dc:date>
    </item>
    <item>
      <title>Re: Override Sourcetype</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Override-Sourcetype/m-p/173919#M49910</link>
      <description>&lt;P&gt;New answer. I would do it like this:&lt;/P&gt;

&lt;P&gt;transforms.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[set_sourcetype_syslog_pan]
REGEX = \d{2}:\d{2}:\d{2}(?:\.d+)\s+(?:10.0.1.21|10.0.1.23)
FORMAT = sourcetype::PAN
DEST_KEY = MetaData:Sourcetype
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[source::udp:514]
TRANSFORMS-cst = set_sourcetype_syslog_pan
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Additional thoughts: syslog comes in a variety of formats. A couple of lines from your syslog data (anonymized of course) would help. I wouldn't assume that the REGEX from the manual would work in your specific case. Notice that I generalized it - a lot. I assumed that the host (ip address) came immediately after a time stamp, which is a syslog standard, and the way my syslog data appears.&lt;/P&gt;

&lt;P&gt;Second, are you &lt;EM&gt;sure&lt;/EM&gt; that the IP addresses (10.0.1.21 and 10.0.1.23) appear in the data?&lt;/P&gt;

&lt;P&gt;Third, is the source name &lt;EM&gt;exactly&lt;/EM&gt; &lt;CODE&gt;udp:415&lt;/CODE&gt;?&lt;/P&gt;

&lt;P&gt;Finally (I know I am repeating myself) - be sure that you are looking at &lt;EM&gt;new&lt;/EM&gt; data after you make changes to props.conf and transforms.conf. Parsing changes are NOT retroactive; the old data will not be changed.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Mar 2014 23:18:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Override-Sourcetype/m-p/173919#M49910</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2014-03-06T23:18:19Z</dc:date>
    </item>
    <item>
      <title>Re: Override Sourcetype</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Override-Sourcetype/m-p/173920#M49911</link>
      <description>&lt;P&gt;Thanks again. I'll give it a try.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Mar 2014 23:26:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Override-Sourcetype/m-p/173920#M49911</guid>
      <dc:creator>Bill_B</dc:creator>
      <dc:date>2014-03-06T23:26:02Z</dc:date>
    </item>
  </channel>
</rss>

