<?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: Invalid FORMAT when creating a field transformation in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Invalid-FORMAT-when-creating-a-field-transformation/m-p/301496#M90781</link>
    <description>&lt;P&gt;And when configuring via the UI, it has to be in the form &lt;CODE&gt;&amp;lt;fieldname&amp;gt;::&amp;lt;value&amp;gt;&lt;/CODE&gt;, you can't use just &lt;CODE&gt;&amp;lt;value&amp;gt;&lt;/CODE&gt;.&lt;/P&gt;</description>
    <pubDate>Wed, 10 Jan 2018 22:19:21 GMT</pubDate>
    <dc:creator>micahkemp</dc:creator>
    <dc:date>2018-01-10T22:19:21Z</dc:date>
    <item>
      <title>Invalid FORMAT when creating a field transformation</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Invalid-FORMAT-when-creating-a-field-transformation/m-p/301493#M90778</link>
      <description>&lt;P&gt;I have these events that come with a &lt;CODE&gt;source&lt;/CODE&gt; attribute something like &lt;CODE&gt;source = /var/collectd/csv/sv3vm5b/cpu-0/cpu-idle-2018-01-10&lt;/CODE&gt; and I need to extract the CPU number (the &lt;CODE&gt;cpu-0&lt;/CODE&gt; part, which can also be &lt;CODE&gt;cpu-1&lt;/CODE&gt;, &lt;CODE&gt;cpu-2&lt;/CODE&gt;, or &lt;CODE&gt;cpu-3&lt;/CODE&gt; ). So I tried to create (for my sourcetype) a transformation ( &lt;CODE&gt;Fields: Field transformations: Add new&lt;/CODE&gt; ).&lt;/P&gt;

&lt;P&gt;The destination app is &lt;CODE&gt;search&lt;/CODE&gt;, the new field name is &lt;CODE&gt;cpu&lt;/CODE&gt;, the type is &lt;CODE&gt;regex-based&lt;/CODE&gt; with the regular expression &lt;CODE&gt;^.*/cpu-([0-9]+)/&lt;/CODE&gt;and the source key &lt;CODE&gt;source&lt;/CODE&gt;. According to the form, the default format ( &lt;CODE&gt;&amp;lt;transform_stanza_name&amp;gt;::$1&lt;/CODE&gt; ) should do just fine so I leave the Format box blank. But it won't save, yielding this error message: &lt;CODE&gt;Encountered the following error while trying to save: Invalid FORMAT:&lt;/CODE&gt; (I would add a screen capture but I don't have enough karma yet).&lt;/P&gt;

&lt;P&gt;Help?&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jan 2018 21:47:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Invalid-FORMAT-when-creating-a-field-transformation/m-p/301493#M90778</guid>
      <dc:creator>DUThibault</dc:creator>
      <dc:date>2018-01-10T21:47:29Z</dc:date>
    </item>
    <item>
      <title>Re: Invalid FORMAT when creating a field transformation</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Invalid-FORMAT-when-creating-a-field-transformation/m-p/301494#M90779</link>
      <description>&lt;P&gt;The recommended default isn't actually populated as a default value; it's just a suggestion. So try filling in the format box with &lt;CODE&gt;cpu::$1&lt;/CODE&gt; if that will work for you as a format. &lt;/P&gt;</description>
      <pubDate>Wed, 10 Jan 2018 22:06:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Invalid-FORMAT-when-creating-a-field-transformation/m-p/301494#M90779</guid>
      <dc:creator>elliotproebstel</dc:creator>
      <dc:date>2018-01-10T22:06:15Z</dc:date>
    </item>
    <item>
      <title>Re: Invalid FORMAT when creating a field transformation</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Invalid-FORMAT-when-creating-a-field-transformation/m-p/301495#M90780</link>
      <description>&lt;P&gt;Hey edit your regex &lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;^.*\/cpu-(?&amp;lt;cpu&amp;gt;[0-9]+)\/&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Also in the format put&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;cpu::$1&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Let me know if this works&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jan 2018 22:09:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Invalid-FORMAT-when-creating-a-field-transformation/m-p/301495#M90780</guid>
      <dc:creator>mayurr98</dc:creator>
      <dc:date>2018-01-10T22:09:06Z</dc:date>
    </item>
    <item>
      <title>Re: Invalid FORMAT when creating a field transformation</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Invalid-FORMAT-when-creating-a-field-transformation/m-p/301496#M90781</link>
      <description>&lt;P&gt;And when configuring via the UI, it has to be in the form &lt;CODE&gt;&amp;lt;fieldname&amp;gt;::&amp;lt;value&amp;gt;&lt;/CODE&gt;, you can't use just &lt;CODE&gt;&amp;lt;value&amp;gt;&lt;/CODE&gt;.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jan 2018 22:19:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Invalid-FORMAT-when-creating-a-field-transformation/m-p/301496#M90781</guid>
      <dc:creator>micahkemp</dc:creator>
      <dc:date>2018-01-10T22:19:21Z</dc:date>
    </item>
    <item>
      <title>Re: Invalid FORMAT when creating a field transformation</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Invalid-FORMAT-when-creating-a-field-transformation/m-p/301497#M90782</link>
      <description>&lt;P&gt;The slashes do not need escaping, and naming the capture group seems redundant (wouldn't the format then become "cpu::$cpu"?).&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jan 2018 14:57:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Invalid-FORMAT-when-creating-a-field-transformation/m-p/301497#M90782</guid>
      <dc:creator>DUThibault</dc:creator>
      <dc:date>2018-01-11T14:57:10Z</dc:date>
    </item>
    <item>
      <title>Re: Invalid FORMAT when creating a field transformation</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Invalid-FORMAT-when-creating-a-field-transformation/m-p/301498#M90783</link>
      <description>&lt;P&gt;Having the Web interface state "default is" sounds like a lie, then.&lt;/P&gt;

&lt;P&gt;Okay, this is starting to make sense. The process is:&lt;/P&gt;

&lt;P&gt;1) Create a transformation ( &lt;CODE&gt;Settings: (Knowledge) Fields: Field transformations: New&lt;/CODE&gt; )&lt;BR /&gt;
2) Edit its permissions (if needed)&lt;BR /&gt;
3) Create an extraction ( &lt;CODE&gt;Settings: (Knowledge) Fields: Field extractions: New&lt;/CODE&gt; ) that uses the transformation&lt;BR /&gt;
4) Edit its permissions (if needed)&lt;/P&gt;

&lt;P&gt;The transformation:&lt;/P&gt;

&lt;P&gt;destination app: &lt;CODE&gt;search&lt;/CODE&gt;&lt;BR /&gt;
name: &lt;CODE&gt;TRANSFORM-COLLECTD-CSV-CPU-NUMBER&lt;/CODE&gt;&lt;BR /&gt;
type: &lt;CODE&gt;regex-based&lt;/CODE&gt;&lt;BR /&gt;
regular expression: &lt;CODE&gt;^.*/cpu-([0-9]+)/&lt;/CODE&gt;&lt;BR /&gt;
source key: &lt;CODE&gt;source&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;The extraction:&lt;/P&gt;

&lt;P&gt;destination app: &lt;CODE&gt;search&lt;/CODE&gt;&lt;BR /&gt;
name: &lt;CODE&gt;COLLECTD-CSV-CPU-NUMBER&lt;/CODE&gt;          (this will get a &lt;CODE&gt;REPORT-&lt;/CODE&gt; prefix)&lt;BR /&gt;
apply to: &lt;CODE&gt;sourcetype&lt;/CODE&gt;&lt;BR /&gt;
named: &lt;CODE&gt;collectd_csv_cpu_idle&lt;/CODE&gt;&lt;BR /&gt;
type: &lt;CODE&gt;uses transform&lt;/CODE&gt;&lt;BR /&gt;
extraction/transform: &lt;CODE&gt;TRANSFORM-COLLECTD-CSV-CPU-NUMBER&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;The extraction will be listed as &lt;CODE&gt;collectd_csv_cpu_idle : REPORT-COLLECTD-CSV-CPU-NUMBER&lt;/CODE&gt; . I can then create more extractions that use the same transform for other sourcetypes (e.g. &lt;CODE&gt;collectd_csv_cpu_interrupt : REPORT-COLLECTD-CSV-CPU-NUMBER&lt;/CODE&gt; , &lt;CODE&gt;collectd_csv_cpu_nice : REPORT-COLLECTD-CSV-CPU-NUMBER&lt;/CODE&gt; , &lt;CODE&gt;collectd_csv_cpu_softirq : REPORT-COLLECTD-CSV-CPU-NUMBER&lt;/CODE&gt; , &lt;CODE&gt;collectd_csv_cpu_steal : REPORT-COLLECTD-CSV-CPU-NUMBER&lt;/CODE&gt; , &lt;CODE&gt;collectd_csv_cpu_system : REPORT-COLLECTD-CSV-CPU-NUMBER&lt;/CODE&gt; , &lt;CODE&gt;collectd_csv_cpu_user : REPORT-COLLECTD-CSV-CPU-NUMBER&lt;/CODE&gt; , &lt;CODE&gt;collectd_csv_cpu_wait : REPORT-COLLECTD-CSV-CPU-NUMBER&lt;/CODE&gt; )&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jan 2018 15:20:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Invalid-FORMAT-when-creating-a-field-transformation/m-p/301498#M90783</guid>
      <dc:creator>DUThibault</dc:creator>
      <dc:date>2018-01-11T15:20:51Z</dc:date>
    </item>
  </channel>
</rss>

