<?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: Allow colon in field names? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Allow-colon-in-field-names/m-p/332492#M98912</link>
    <description>&lt;P&gt;This works for this use case. I have a similar one that may have embedded spaces in the field values, but that's another day (I'll probably just move to json as a file format...)&lt;/P&gt;</description>
    <pubDate>Thu, 01 Jun 2017 14:31:01 GMT</pubDate>
    <dc:creator>wegscd</dc:creator>
    <dc:date>2017-06-01T14:31:01Z</dc:date>
    <item>
      <title>Allow colon in field names?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Allow-colon-in-field-names/m-p/332489#M98909</link>
      <description>&lt;P&gt;I have input data that looks like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;time=2017-05-29 calendar:num_1day_active_users=10437 gplus:num_1day_active_users=1 docs:num_1day_active_users=0 gmail:num_1day_active_users=24594 drive:num_1day_active_users=15787
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I have done minimal work to props.conf, mostly to set up timestamp parsing.&lt;/P&gt;

&lt;P&gt;The problem is that all the field names are being extracted as num_1day_active_users, and I am only getting the first value in the event (I get num_1day_active_users=10437).&lt;/P&gt;

&lt;P&gt;If the colon were a period, then Splunk would auto-convert it to an underscore, and the fields would extract with names calendar_num_1day_active_users, gplus_num_1day_active_users, docs_num_1day_active_users, gmail_num_1day_active_users, and drive_num_1day_active_users.&lt;/P&gt;

&lt;P&gt;How can I get Splunk to do the same for field names that contain colons?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 14:21:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Allow-colon-in-field-names/m-p/332489#M98909</guid>
      <dc:creator>wegscd</dc:creator>
      <dc:date>2020-09-29T14:21:20Z</dc:date>
    </item>
    <item>
      <title>Re: Allow colon in field names?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Allow-colon-in-field-names/m-p/332490#M98910</link>
      <description>&lt;P&gt;Check out CLEAN_KEYS in &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Admin/Transformsconf"&gt;transforms.conf&lt;/A&gt;:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;CLEAN_KEYS = [true|false]
* NOTE: This attribute is only valid for search-time field extractions.
* Optional. Controls whether Splunk "cleans" the keys (field names) it
  extracts at search time.
  "Key cleaning" is the practice of replacing any non-alphanumeric
  characters (characters other than those falling between the a-z, A-Z, or
  0-9 ranges) in field names with underscores, as well as the stripping of
  leading underscores and 0-9 characters from field names.
* Add CLEAN_KEYS = false to your transform if you need to extract field
  names that include non-alphanumeric characters, or which begin with
  underscores or 0-9 characters.
* Defaults to true.
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But you will have to use transforms.conf to define your extraction, and use a REPORT- line in props.conf to make use of that functionality.&lt;/P&gt;

&lt;P&gt;Edit:  it appears I mis-read the question.  Please disregard, but leaving the content in place in case it helps anyone else.&lt;/P&gt;</description>
      <pubDate>Wed, 31 May 2017 21:05:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Allow-colon-in-field-names/m-p/332490#M98910</guid>
      <dc:creator>micahkemp</dc:creator>
      <dc:date>2017-05-31T21:05:37Z</dc:date>
    </item>
    <item>
      <title>Re: Allow colon in field names?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Allow-colon-in-field-names/m-p/332491#M98911</link>
      <description>&lt;P&gt;Add this on your search heads for search time field extractions&lt;/P&gt;

&lt;P&gt;props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[yoursourcetype]
REPORT-extractfields = extract_colon_fields
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;transforms.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[extract_colon_fields]
REGEX = (\S+)\=(\S+)
FORMAT = $1::$2
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;A restart of Splunk would be required. It should give you fields like calendar_num_1day_active_users, gplus_num_1day_active_users.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 14:21:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Allow-colon-in-field-names/m-p/332491#M98911</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2020-09-29T14:21:22Z</dc:date>
    </item>
    <item>
      <title>Re: Allow colon in field names?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Allow-colon-in-field-names/m-p/332492#M98912</link>
      <description>&lt;P&gt;This works for this use case. I have a similar one that may have embedded spaces in the field values, but that's another day (I'll probably just move to json as a file format...)&lt;/P&gt;</description>
      <pubDate>Thu, 01 Jun 2017 14:31:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Allow-colon-in-field-names/m-p/332492#M98912</guid>
      <dc:creator>wegscd</dc:creator>
      <dc:date>2017-06-01T14:31:01Z</dc:date>
    </item>
    <item>
      <title>Re: Allow colon in field names?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Allow-colon-in-field-names/m-p/332493#M98913</link>
      <description>&lt;P&gt;In this source, the kv pair delimiter is space, what's the kv delimiter in your other event?&lt;/P&gt;</description>
      <pubDate>Thu, 01 Jun 2017 14:52:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Allow-colon-in-field-names/m-p/332493#M98913</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-06-01T14:52:21Z</dc:date>
    </item>
    <item>
      <title>Re: Allow colon in field names?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Allow-colon-in-field-names/m-p/332494#M98914</link>
      <description>&lt;P&gt;The data would look like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;time=2017-03-31 message="Horriblosity occurred" count=14
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 01 Jun 2017 15:20:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Allow-colon-in-field-names/m-p/332494#M98914</guid>
      <dc:creator>wegscd</dc:creator>
      <dc:date>2017-06-01T15:20:28Z</dc:date>
    </item>
    <item>
      <title>Re: Allow colon in field names?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Allow-colon-in-field-names/m-p/332495#M98915</link>
      <description>&lt;P&gt;You can build your own KVP extractor in transforms.conf like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[get_kvps_and_keep_colons]
FORMAT = $1::$2
MV_ADD = 1
REGEX = (?:^|[\r\n\s]+)(\S+)=(\S+)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 01 Jun 2017 17:47:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Allow-colon-in-field-names/m-p/332495#M98915</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-06-01T17:47:17Z</dc:date>
    </item>
  </channel>
</rss>

