<?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: props source stanza will not match in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/props-source-stanza-will-not-match/m-p/758865#M120301</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thats a good question actually. I was just presuming that splunk software would support the use case, where two different files have the same kind of data and can thus be treated as the same sourcetype.&lt;/P&gt;&lt;P&gt;I ended up creating a second sourcetype, as suggested but the outcome is still the same. I also introduced a filter to drop undesired events before ingestion (only keep events that begin with "&amp;lt;event ").&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;props.conf&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[source::/tmp/logs/.../qwe/.../*EventLogger.log*]
priority = 100
TZ = UTC
sourcetype = eventlogger

[eventlogger]
KV_MODE = xml
TIME_PREFIX = timestamp="
TIME_FORMAT = %Y-%m-%dT%H:%M:%S%z
MAX_TIMESTAMP_LOOKAHEAD = 25
REPORT-mydefault = sourcefields-mydefault



[source::/tmp/logs/.../qwe/.../*eventlog*.xml*]
priority = 100
TZ = UTC
sourcetype = eventlog

[eventlog]
KV_MODE = xml
TIME_PREFIX = timestamp="
SHOULD_LINEMERGE = false
BREAK_ONLY_BEFORE_DATE = false
LINE_BREAKER = &amp;lt;event
TIME_FORMAT = %Y-%m-%dT%H:%M:%S%z
MAX_TIMESTAMP_LOOKAHEAD = 25
REPORT-mydefault = sourcefields-mydefault
TRANSFORMS-null=setnull,eventlog-strip
&lt;/LI-CODE&gt;&lt;P&gt;transforms.conf&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[setnull]
REGEX = .
DEST_KEY = queue
FORMAT = nullQueue

[eventlog-strip]
REGEX = ^&amp;lt;event\s
DEST_KEY = queue
FORMAT = indexQueue

[sourcefields-mydefault]
SOURCE_KEY = source
REGEX = /tmp/logs/(.*?)/(.*?)/(.*?)/
FORMAT = asd::$1 qwe::$2 yxc::$3&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 27 Feb 2026 14:29:23 GMT</pubDate>
    <dc:creator>zapping575</dc:creator>
    <dc:date>2026-02-27T14:29:23Z</dc:date>
    <item>
      <title>props source stanza will not match</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/props-source-stanza-will-not-match/m-p/758860#M120298</link>
      <description>&lt;P&gt;I have these two files:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;EventLogger.log&lt;/LI&gt;&lt;LI&gt;HOSTNAME-eventlog-TIMESTAMP.xml&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;The structure of their content is the same. Except that the .xml file may contain "&amp;lt;eventlog&amp;gt;" and "&amp;lt;/eventlog&amp;gt;" at beginning and end.&lt;/P&gt;&lt;P&gt;So I thought to use the same sourcetype for them.&lt;/P&gt;&lt;P&gt;This stanza is working fine:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[source::/tmp/logs/.../qwe/.../*EventLogger.log*]
priority = 100
TZ = UTC
sourcetype = eventlogger&lt;/LI-CODE&gt;&lt;P&gt;This one however, is not (splunk will apparently default and make a "xml-2" sourcetype):&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[source::/tmp/logs/.../qwe/.../*eventlog*.xml*]
priority = 100
TZ = UTC
sourcetype = eventlogger&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Using btool, I did confirm that on my indexer, the two stanzas above are actually present.&lt;/P&gt;&lt;P&gt;I feel like I am missing out on something here.&lt;/P&gt;</description>
      <pubDate>Fri, 27 Feb 2026 10:05:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/props-source-stanza-will-not-match/m-p/758860#M120298</guid>
      <dc:creator>zapping575</dc:creator>
      <dc:date>2026-02-27T10:05:15Z</dc:date>
    </item>
    <item>
      <title>Re: props source stanza will not match</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/props-source-stanza-will-not-match/m-p/758863#M120300</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/241220"&gt;@zapping575&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;sorry for the question: how is it possible to use the same sourcetype with data source different?&lt;/P&gt;&lt;P&gt;I suppose that the parsing rules aren't the same for both formats.&lt;/P&gt;&lt;P&gt;I hint to use two sourcetypes.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Fri, 27 Feb 2026 11:20:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/props-source-stanza-will-not-match/m-p/758863#M120300</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2026-02-27T11:20:23Z</dc:date>
    </item>
    <item>
      <title>Re: props source stanza will not match</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/props-source-stanza-will-not-match/m-p/758865#M120301</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thats a good question actually. I was just presuming that splunk software would support the use case, where two different files have the same kind of data and can thus be treated as the same sourcetype.&lt;/P&gt;&lt;P&gt;I ended up creating a second sourcetype, as suggested but the outcome is still the same. I also introduced a filter to drop undesired events before ingestion (only keep events that begin with "&amp;lt;event ").&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;props.conf&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[source::/tmp/logs/.../qwe/.../*EventLogger.log*]
priority = 100
TZ = UTC
sourcetype = eventlogger

[eventlogger]
KV_MODE = xml
TIME_PREFIX = timestamp="
TIME_FORMAT = %Y-%m-%dT%H:%M:%S%z
MAX_TIMESTAMP_LOOKAHEAD = 25
REPORT-mydefault = sourcefields-mydefault



[source::/tmp/logs/.../qwe/.../*eventlog*.xml*]
priority = 100
TZ = UTC
sourcetype = eventlog

[eventlog]
KV_MODE = xml
TIME_PREFIX = timestamp="
SHOULD_LINEMERGE = false
BREAK_ONLY_BEFORE_DATE = false
LINE_BREAKER = &amp;lt;event
TIME_FORMAT = %Y-%m-%dT%H:%M:%S%z
MAX_TIMESTAMP_LOOKAHEAD = 25
REPORT-mydefault = sourcefields-mydefault
TRANSFORMS-null=setnull,eventlog-strip
&lt;/LI-CODE&gt;&lt;P&gt;transforms.conf&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[setnull]
REGEX = .
DEST_KEY = queue
FORMAT = nullQueue

[eventlog-strip]
REGEX = ^&amp;lt;event\s
DEST_KEY = queue
FORMAT = indexQueue

[sourcefields-mydefault]
SOURCE_KEY = source
REGEX = /tmp/logs/(.*?)/(.*?)/(.*?)/
FORMAT = asd::$1 qwe::$2 yxc::$3&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Feb 2026 14:29:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/props-source-stanza-will-not-match/m-p/758865#M120301</guid>
      <dc:creator>zapping575</dc:creator>
      <dc:date>2026-02-27T14:29:23Z</dc:date>
    </item>
    <item>
      <title>Re: props source stanza will not match</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/props-source-stanza-will-not-match/m-p/758980#M120306</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/241220"&gt;@zapping575&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;as you said, using two sourcetypes you can correctly parse both the data sources and using a similar name for the sourcetypes you can use both of them using asterisk:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;sourcetype=eventlog*&lt;/LI-CODE&gt;&lt;P&gt;or (better) creating an eventtype&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;sourcetype IN (eventlog, eventlogger)&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Tue, 03 Mar 2026 07:52:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/props-source-stanza-will-not-match/m-p/758980#M120306</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2026-03-03T07:52:49Z</dc:date>
    </item>
    <item>
      <title>Re: props source stanza will not match</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/props-source-stanza-will-not-match/m-p/758984#M120307</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;apologies if my previous post may have been ambiguous.&lt;/P&gt;&lt;P&gt;Out of the two source/sourcetype stanza combinations I posted, only the first one (eventlogger) is working as expected.&lt;/P&gt;&lt;P&gt;The second one does not work. Splunk just defaults to an "xml-2" sourcetype.&lt;/P&gt;</description>
      <pubDate>Tue, 03 Mar 2026 09:58:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/props-source-stanza-will-not-match/m-p/758984#M120307</guid>
      <dc:creator>zapping575</dc:creator>
      <dc:date>2026-03-03T09:58:04Z</dc:date>
    </item>
    <item>
      <title>Re: props source stanza will not match</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/props-source-stanza-will-not-match/m-p/758994#M120311</link>
      <description>&lt;P&gt;The sourcetyper config works at the originating input component level.&lt;/P&gt;&lt;PRE class=""&gt;sourcetype = &amp;lt;string&amp;gt;
* Can only be set for a [source::...] stanza.
* Anything from that &amp;lt;source&amp;gt; is assigned the specified source type.
* Is used by file-based inputs, at input time (when accessing logfiles) such
  as on a forwarder, or indexer monitoring local files.
* sourcetype assignment settings on a system receiving forwarded Splunk data
  are not be applied to forwarded data.
* For log files read locally, data from log files matching &amp;lt;source&amp;gt; is
  assigned the specified source type.
* Default: empty string&lt;/PRE&gt;</description>
      <pubDate>Tue, 03 Mar 2026 22:56:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/props-source-stanza-will-not-match/m-p/758994#M120311</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2026-03-03T22:56:16Z</dc:date>
    </item>
    <item>
      <title>Re: props source stanza will not match</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/props-source-stanza-will-not-match/m-p/759013#M120314</link>
      <description>&lt;P&gt;This was the deciding tip. Turs out there was an issue with the deployment server which is why the files were not rolled out to the forwarder. Thank you very much!&lt;/P&gt;</description>
      <pubDate>Wed, 04 Mar 2026 16:39:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/props-source-stanza-will-not-match/m-p/759013#M120314</guid>
      <dc:creator>zapping575</dc:creator>
      <dc:date>2026-03-04T16:39:05Z</dc:date>
    </item>
  </channel>
</rss>

