<?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 props.conf fixed value using EXTRACT in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/props-conf-fixed-value-using-EXTRACT/m-p/108353#M28202</link>
    <description>&lt;P&gt;I would like to take the following lines in my props.conf file, and at Search Time, use these Field Extractions to Set a fixed value for a new field depending on the rule that it hits:&lt;BR /&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[safenet_datasecure]
EXTRACT-datasecure0 = Web login failure\: Invalid username\/password in login attempt for administrator \"(?&amp;lt;ing_user&amp;gt;[a-zA-Z0-9]+)\" from (?&amp;lt;ing_clientip&amp;gt;[0-9]+.[0-9]+.[0-9]+.[0-9]+)
EXTRACT-datasecure1 = Login attempted with invalid username \"(?&amp;lt;ing_user&amp;gt;[a-zA-Z0-9]+)\"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;So I get a field like ing_rule=0 or ing__rule=1 depending on if it used datasecure0 or datasecure1 to extract the field from the event.&lt;/P&gt;

&lt;P&gt;Anyone?&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 14:26:44 GMT</pubDate>
    <dc:creator>jmsiegma</dc:creator>
    <dc:date>2020-09-28T14:26:44Z</dc:date>
    <item>
      <title>props.conf fixed value using EXTRACT</title>
      <link>https://community.splunk.com/t5/Splunk-Search/props-conf-fixed-value-using-EXTRACT/m-p/108353#M28202</link>
      <description>&lt;P&gt;I would like to take the following lines in my props.conf file, and at Search Time, use these Field Extractions to Set a fixed value for a new field depending on the rule that it hits:&lt;BR /&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[safenet_datasecure]
EXTRACT-datasecure0 = Web login failure\: Invalid username\/password in login attempt for administrator \"(?&amp;lt;ing_user&amp;gt;[a-zA-Z0-9]+)\" from (?&amp;lt;ing_clientip&amp;gt;[0-9]+.[0-9]+.[0-9]+.[0-9]+)
EXTRACT-datasecure1 = Login attempted with invalid username \"(?&amp;lt;ing_user&amp;gt;[a-zA-Z0-9]+)\"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;So I get a field like ing_rule=0 or ing__rule=1 depending on if it used datasecure0 or datasecure1 to extract the field from the event.&lt;/P&gt;

&lt;P&gt;Anyone?&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 14:26:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/props-conf-fixed-value-using-EXTRACT/m-p/108353#M28202</guid>
      <dc:creator>jmsiegma</dc:creator>
      <dc:date>2020-09-28T14:26:44Z</dc:date>
    </item>
    <item>
      <title>Re: props.conf fixed value using EXTRACT</title>
      <link>https://community.splunk.com/t5/Splunk-Search/props-conf-fixed-value-using-EXTRACT/m-p/108354#M28203</link>
      <description>&lt;P&gt;In this specific case, ing_rule would be 0 if there is an ing_clientip field - you can use that in an eval or calculated field.&lt;/P&gt;

&lt;P&gt;As a more general approach, you could extract different ing_user1, ing_user2, ... fields and assign ing_rule depending on which field is filled and after that merge them into one ing_user field.&lt;/P&gt;</description>
      <pubDate>Sat, 27 Jul 2013 08:03:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/props-conf-fixed-value-using-EXTRACT/m-p/108354#M28203</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2013-07-27T08:03:19Z</dc:date>
    </item>
  </channel>
</rss>

