<?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 How to set a string in my current source field value as the source in Splunk? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-set-a-string-in-my-current-source-field-value-as-the/m-p/330317#M61232</link>
    <description>&lt;P&gt;Hi ,&lt;/P&gt;

&lt;P&gt;Is there any way I can simply have &lt;CODE&gt;Plprdfinodm01&lt;/CODE&gt; as my Source in Splunk which indicates JVM name?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;D:\splunk\was\vxpip-ppm01\PIprdfinodm01\messages.log    
D:\splunk\was\vxpip-ppm02\PIprdfinodm01\messages.log    
D:\splunk\was\vxpip-ppm02\PIprdfinodm01\messages.log    
D:\splunk\was\vxpip-ppm01\PIprdfinodm01\messages.log    
D:\splunk\was\vxpip-ppm02\PIprdfinodm01\messages.log    
D:\splunk\was\vxpip-ppm02\PIprdfinodm01\messages.log    
D:\splunk\was\vxpip-ppm01\PIprdfinodm01\messages.log
D:\splunk\waslp\vxpip-ppm02\PIprdfinodm01\messages.log
&lt;/CODE&gt;&lt;/PRE&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/4504iB6DA613F7CE98639/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>Mon, 05 Mar 2018 18:59:45 GMT</pubDate>
    <dc:creator>harishnpandey</dc:creator>
    <dc:date>2018-03-05T18:59:45Z</dc:date>
    <item>
      <title>How to set a string in my current source field value as the source in Splunk?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-set-a-string-in-my-current-source-field-value-as-the/m-p/330317#M61232</link>
      <description>&lt;P&gt;Hi ,&lt;/P&gt;

&lt;P&gt;Is there any way I can simply have &lt;CODE&gt;Plprdfinodm01&lt;/CODE&gt; as my Source in Splunk which indicates JVM name?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;D:\splunk\was\vxpip-ppm01\PIprdfinodm01\messages.log    
D:\splunk\was\vxpip-ppm02\PIprdfinodm01\messages.log    
D:\splunk\was\vxpip-ppm02\PIprdfinodm01\messages.log    
D:\splunk\was\vxpip-ppm01\PIprdfinodm01\messages.log    
D:\splunk\was\vxpip-ppm02\PIprdfinodm01\messages.log    
D:\splunk\was\vxpip-ppm02\PIprdfinodm01\messages.log    
D:\splunk\was\vxpip-ppm01\PIprdfinodm01\messages.log
D:\splunk\waslp\vxpip-ppm02\PIprdfinodm01\messages.log
&lt;/CODE&gt;&lt;/PRE&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/4504iB6DA613F7CE98639/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>Mon, 05 Mar 2018 18:59:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-set-a-string-in-my-current-source-field-value-as-the/m-p/330317#M61232</guid>
      <dc:creator>harishnpandey</dc:creator>
      <dc:date>2018-03-05T18:59:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to set a string in my current source field value as the source in Splunk?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-set-a-string-in-my-current-source-field-value-as-the/m-p/330318#M61233</link>
      <description>&lt;P&gt;I think personally I would create a new field (field extraction) called something like JVMHost. That way you preserve the original data.&lt;BR /&gt;
You could use a regex like this: &lt;BR /&gt;
&lt;CODE&gt;.*\\(?&amp;lt;JVMHost&amp;gt;[^\\]+)\\messages.log&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Mar 2018 22:01:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-set-a-string-in-my-current-source-field-value-as-the/m-p/330318#M61233</guid>
      <dc:creator>livehybrid</dc:creator>
      <dc:date>2018-03-05T22:01:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to set a string in my current source field value as the source in Splunk?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-set-a-string-in-my-current-source-field-value-as-the/m-p/330319#M61234</link>
      <description>&lt;P&gt;Or..you could overwrite the source...&lt;/P&gt;

&lt;P&gt;If your sourcetype was called "jvm-log", you'd have a props.conf entry for the sourcetype, identifying the transform rule.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; [jvm-log]
 TRANSFORMS-1_source = force_jvm_source
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This references a rule that would be defined in transforms.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; [force_jvm_source]
 SOURCE_KEY =_raw
 REGEX =.*\\([^\\]+)\\messages.log
 DEST_KEY = MetaData:Source
 FORMAT = source::$1
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 05 Mar 2018 22:05:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-set-a-string-in-my-current-source-field-value-as-the/m-p/330319#M61234</guid>
      <dc:creator>livehybrid</dc:creator>
      <dc:date>2018-03-05T22:05:34Z</dc:date>
    </item>
  </channel>
</rss>

