<?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: Automatic field discovery / key value pairs with := in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Automatic-field-discovery-key-value-pairs-with/m-p/484343#M82976</link>
    <description>&lt;P&gt;@adiwhy If your problem is resolved then please accept an answer to help future readers.&lt;/P&gt;</description>
    <pubDate>Tue, 21 Jan 2020 12:28:24 GMT</pubDate>
    <dc:creator>richgalloway</dc:creator>
    <dc:date>2020-01-21T12:28:24Z</dc:date>
    <item>
      <title>Automatic field discovery / key value pairs with :=</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Automatic-field-discovery-key-value-pairs-with/m-p/484336#M82969</link>
      <description>&lt;P&gt;Below are two line example of the data being indexed. &lt;/P&gt;

&lt;P&gt;2020-01-17 15:40:53; 192.168.0.69; 192.168.0.69; Trap Service; abcde;&lt;BR /&gt;
&lt;STRONG&gt;MessageType&lt;/STRONG&gt;:= SNMPv2-MIB:authenticationFailure;&lt;BR /&gt;
&lt;STRONG&gt;Message&lt;/STRONG&gt;:= SNMP Trap&lt;BR /&gt;
     Received Time:1/17/2020 3:40:53 PM&lt;BR /&gt;
     Source:192.168.0.69(192.168.0.69)&lt;BR /&gt;
     Community:abcde&lt;BR /&gt;
     Variable Bindings&lt;BR /&gt;
          &lt;STRONG&gt;sysUpTime&lt;/STRONG&gt;:= 30 days 3 hours 56 minutes 30.81 seconds (260619081)&lt;BR /&gt;
          &lt;STRONG&gt;snmpTrapOID&lt;/STRONG&gt;:= SNMPv2-MIB:authenticationFailure (1.3.6.1.6.3.1.1.5.5)&lt;BR /&gt;
          &lt;STRONG&gt;snmpTrapEnterprise&lt;/STRONG&gt;:= LIEBERT-GP-REGISTRATION-MIB:liebertGlobalProducts (1.3.6.1.4.1.476.1.42);&lt;BR /&gt;
--ENDOFTRAP--&lt;/P&gt;

&lt;P&gt;2020-01-17 15:40:52; 192.168.1.6; 192.168.1.6; Trap Service; abcde;&lt;BR /&gt;
MessageType:= LIEBERT-GP-AGENT-MIB:lgpAgentHeartbeat;&lt;BR /&gt;
&lt;STRONG&gt;Message&lt;/STRONG&gt;:= SNMP Trap&lt;BR /&gt;
     Received Time:1/17/2020 3:40:52 PM&lt;BR /&gt;
     Source:192.168.1.6(192.168.1.6)&lt;BR /&gt;
     Community:abcde&lt;BR /&gt;
     Variable Bindings&lt;BR /&gt;
          &lt;STRONG&gt;sysUpTime&lt;/STRONG&gt;:= 41 days 23 hours 8 minutes 4.90 seconds (362568490)&lt;BR /&gt;
          &lt;STRONG&gt;lgpConditionsPresent&lt;/STRONG&gt;:= 0&lt;BR /&gt;
          &lt;STRONG&gt;lgpAgentConnectedDeviceCount&lt;/STRONG&gt;:= 1&lt;BR /&gt;
          &lt;STRONG&gt;snmpTrapOID&lt;/STRONG&gt;:= LIEBERT-GP-AGENT-MIB:lgpAgentHeartbeat (1.3.6.1.4.1.476.1.42.2.3.0.7)&lt;BR /&gt;
          &lt;STRONG&gt;sysUpTime&lt;/STRONG&gt;:= 41 days 23 hours 8 minutes 4.90 seconds (362568490)&lt;BR /&gt;
          &lt;STRONG&gt;experimental.1057.1.0&lt;/STRONG&gt;:= 192.168.1.6&lt;BR /&gt;
          &lt;STRONG&gt;snmpTrapEnterprise&lt;/STRONG&gt;:= LIEBERT-GP-REGISTRATION-MIB:lgpAgentNotifications (1.3.6.1.4.1.476.1.42.2.3);&lt;BR /&gt;
--ENDOFTRAP--&lt;/P&gt;

&lt;P&gt;I would like to have all string with bold font above (before ":=") automatically discovered as fields. And all strings after := become its field's value. &lt;/P&gt;

&lt;P&gt;I did below on transform &amp;amp; props but still not working. any help is appreciated.&lt;BR /&gt;
transforms.conf :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[trap_plaintransform]
REGEX=\[(?!(?:headerName|headerValue))([^\s\=]+)\:\=([^\]]+)\]
FORMAT=$1::$2

[trap_transform]
REGEX= \[headerName\=(\w+)\],\s\[headerValue=([^\]]+)\]
FORMAT= $1::$2
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;props.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[s_trap]
DATETIME_CONFIG =
MAX_TIMESTAMP_LOOKAHEAD = 32
MUST_BREAK_AFTER = \-\-ENDOFTRAP\-\-
NO_BINARY_CHECK = true
TIME_FORMAT = %Y-%m-%d %H:%M:%S
category = Miscellaneous
disabled = false
pulldown_type = true
SHOULD_LINEMERGE = true
TRANSFORMS-sw_trap_host = sw_trap_host
BREAK_ONLY_BEFORE =
KV_MODE = none
REPORT-a= trap_transform, trap_plaintransform
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 17 Jan 2020 08:06:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Automatic-field-discovery-key-value-pairs-with/m-p/484336#M82969</guid>
      <dc:creator>adiwhy</dc:creator>
      <dc:date>2020-01-17T08:06:25Z</dc:date>
    </item>
    <item>
      <title>Re: Automatic field discovery / key value pairs with :=</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Automatic-field-discovery-key-value-pairs-with/m-p/484337#M82970</link>
      <description>&lt;P&gt;Part of the problem lies with the REGEX strings.  They both expect to find text within square brackets, but there are no square brackets in the sample events.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jan 2020 14:25:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Automatic-field-discovery-key-value-pairs-with/m-p/484337#M82970</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2020-01-17T14:25:24Z</dc:date>
    </item>
    <item>
      <title>Re: Automatic field discovery / key value pairs with :=</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Automatic-field-discovery-key-value-pairs-with/m-p/484338#M82971</link>
      <description>&lt;P&gt;what about this regex with $1::$2 ??&lt;/P&gt;

&lt;P&gt;&lt;A href="https://regex101.com/r/fXTb3W/1"&gt;https://regex101.com/r/fXTb3W/1&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 18 Jan 2020 14:45:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Automatic-field-discovery-key-value-pairs-with/m-p/484338#M82971</guid>
      <dc:creator>maciep</dc:creator>
      <dc:date>2020-01-18T14:45:14Z</dc:date>
    </item>
    <item>
      <title>Re: Automatic field discovery / key value pairs with :=</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Automatic-field-discovery-key-value-pairs-with/m-p/484339#M82972</link>
      <description>&lt;P&gt;Try this:&lt;/P&gt;

&lt;P&gt;In your props.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[YourSourcetypeNameHere]
REPORT-YourSourcetypeNameHere_OID_KVPs = YourSourcetypeNameHere_OID_KVPs
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;In your transforms.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[YourSourcetypeNameHere_OID_KVPs]
REGEX = ^|[\r\n](?&amp;lt;key&amp;gt;[^:]+):=?\s*(?&amp;lt;value&amp;gt;.*$)
FORMAT = $1::$2
REPEAT_MATCH = true
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 18 Jan 2020 19:13:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Automatic-field-discovery-key-value-pairs-with/m-p/484339#M82972</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2020-01-18T19:13:00Z</dc:date>
    </item>
    <item>
      <title>Re: Automatic field discovery / key value pairs with :=</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Automatic-field-discovery-key-value-pairs-with/m-p/484340#M82973</link>
      <description>&lt;P&gt;yeah right.. i found it already how to do that after struggling on the docs &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt; &lt;/P&gt;</description>
      <pubDate>Tue, 21 Jan 2020 02:39:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Automatic-field-discovery-key-value-pairs-with/m-p/484340#M82973</guid>
      <dc:creator>adiwhy</dc:creator>
      <dc:date>2020-01-21T02:39:42Z</dc:date>
    </item>
    <item>
      <title>Re: Automatic field discovery / key value pairs with :=</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Automatic-field-discovery-key-value-pairs-with/m-p/484341#M82974</link>
      <description>&lt;P&gt;weird.. i tried that regex in the regex tester it is working, but it is not working when i put on the transforms.conf  &lt;/P&gt;</description>
      <pubDate>Tue, 21 Jan 2020 03:06:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Automatic-field-discovery-key-value-pairs-with/m-p/484341#M82974</guid>
      <dc:creator>adiwhy</dc:creator>
      <dc:date>2020-01-21T03:06:47Z</dc:date>
    </item>
    <item>
      <title>Re: Automatic field discovery / key value pairs with :=</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Automatic-field-discovery-key-value-pairs-with/m-p/484342#M82975</link>
      <description>&lt;P&gt;somehow after reading docs, i tried mine below is working&lt;/P&gt;

&lt;P&gt;transforms.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[sw_trap_transform]
REGEX= ([\w|\.]+)\:\=\s([\w|\.|\s|\(|\)|\-|\d|\:|\[|\]|\;]+)$
FORMAT= $1::$2

[sw_trap_transform2]
REGEX = ([\w|\.]+)\:\=\s([^\n\r].*)\;$
FORMAT= $1::$2
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[sw_trap]
KV_MODE = none
REPORT-a = sw_trap_transform, sw_trap_transform2
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 21 Jan 2020 03:13:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Automatic-field-discovery-key-value-pairs-with/m-p/484342#M82975</guid>
      <dc:creator>adiwhy</dc:creator>
      <dc:date>2020-01-21T03:13:19Z</dc:date>
    </item>
    <item>
      <title>Re: Automatic field discovery / key value pairs with :=</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Automatic-field-discovery-key-value-pairs-with/m-p/484343#M82976</link>
      <description>&lt;P&gt;@adiwhy If your problem is resolved then please accept an answer to help future readers.&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jan 2020 12:28:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Automatic-field-discovery-key-value-pairs-with/m-p/484343#M82976</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2020-01-21T12:28:24Z</dc:date>
    </item>
  </channel>
</rss>

