<?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 not work transforms in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/not-work-transforms/m-p/58507#M11496</link>
    <description>&lt;PRE&gt;&lt;CODE&gt;Based on config files(please see below) we transform file from .xml format to .csv.
After the log been converted we see that all the messages written as one large event.
We would like to have one event per csv’s string with the fields from transforms.conf.

&amp;gt; inputs.conf
&amp;gt; [monitor:\\SPLUNK0\C$\test\1]
&amp;gt; index = kasper
&amp;gt; _whitelist = .*\.xml
&amp;gt; 
&amp;gt; props.conf  [source::...kasper*.xml]
&amp;gt; TRUNCATE =  0 
&amp;gt; SEDCMD-1 = s/(?m)(^.*?&amp;lt;/Worksheet&amp;gt;)//g ###clean the garbage
&amp;gt; SEDCMD-2 = s/(?m)(&amp;lt;W\w*\s\w*\SN\w*[="]+M\w*.*&amp;gt;$)//g ####clean the garbage
&amp;gt; SEDCMD-3 = s/(?m)(&amp;lt;/R\w*&amp;gt;)/\n/g ###transfer the event to a new line
&amp;gt; SEDCMD-4 = s/(?m)(&amp;lt;/D\w*&amp;gt;)/;/g ### set separators
&amp;gt; SEDCMD-5 = s/(?m)(&amp;lt;[^&amp;gt;]*&amp;gt;)//g ### delete tags
&amp;gt; sourcetype = csv_kasper  
&amp;gt; CHECK_FOR_HEADER = false
&amp;gt; priority = 101

&amp;gt; transforms.conf
&amp;gt; [csv_kasper]
&amp;gt; DELIMS=";"
&amp;gt; FIELDS="Status","V-host","Group","Computer","LastData","description","IP","Alive","Domain","NetBIOS","DomainName","DNS"
&amp;gt; 

&amp;gt; Критический;;0_test;BD00;7 ноября 2012 г. 15:17:23;Не установлен Антивирус Касперского. ;10.54.44.68;7 ноября 2012 г. 15:17:23;dom;BD00;bd00;dom;
&amp;gt; Критический;;0_test;BD00;16 ноября 2012 г. 12:01:16;Давно не выполнялся поиск вирусов. ;10.54.45.26;16 ноября 2012 г. 12:01:16;dom;BD00;bd00;dom;
&amp;gt; Критический;;0_test;BEOVA;16 ноября 2012 г. 11:58:35;Давно не выполнялся поиск вирусов. ;10.54.44.70;16 ноября 2012 г. 12:06:28;dom;BEZULOVA;beova;dom;
&amp;gt; Критический;;0_test;BRCH11;16 ноября 2012 г. 11:55:25;Давно не выполнялся поиск вирусов. ;10.54.42.71;16 ноября 2012 г. 11:55:25;dom;BRONICH11;brich11;dom;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 10 Dec 2012 12:40:46 GMT</pubDate>
    <dc:creator>klychnikov</dc:creator>
    <dc:date>2012-12-10T12:40:46Z</dc:date>
    <item>
      <title>not work transforms</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/not-work-transforms/m-p/58507#M11496</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;Based on config files(please see below) we transform file from .xml format to .csv.
After the log been converted we see that all the messages written as one large event.
We would like to have one event per csv’s string with the fields from transforms.conf.

&amp;gt; inputs.conf
&amp;gt; [monitor:\\SPLUNK0\C$\test\1]
&amp;gt; index = kasper
&amp;gt; _whitelist = .*\.xml
&amp;gt; 
&amp;gt; props.conf  [source::...kasper*.xml]
&amp;gt; TRUNCATE =  0 
&amp;gt; SEDCMD-1 = s/(?m)(^.*?&amp;lt;/Worksheet&amp;gt;)//g ###clean the garbage
&amp;gt; SEDCMD-2 = s/(?m)(&amp;lt;W\w*\s\w*\SN\w*[="]+M\w*.*&amp;gt;$)//g ####clean the garbage
&amp;gt; SEDCMD-3 = s/(?m)(&amp;lt;/R\w*&amp;gt;)/\n/g ###transfer the event to a new line
&amp;gt; SEDCMD-4 = s/(?m)(&amp;lt;/D\w*&amp;gt;)/;/g ### set separators
&amp;gt; SEDCMD-5 = s/(?m)(&amp;lt;[^&amp;gt;]*&amp;gt;)//g ### delete tags
&amp;gt; sourcetype = csv_kasper  
&amp;gt; CHECK_FOR_HEADER = false
&amp;gt; priority = 101

&amp;gt; transforms.conf
&amp;gt; [csv_kasper]
&amp;gt; DELIMS=";"
&amp;gt; FIELDS="Status","V-host","Group","Computer","LastData","description","IP","Alive","Domain","NetBIOS","DomainName","DNS"
&amp;gt; 

&amp;gt; Критический;;0_test;BD00;7 ноября 2012 г. 15:17:23;Не установлен Антивирус Касперского. ;10.54.44.68;7 ноября 2012 г. 15:17:23;dom;BD00;bd00;dom;
&amp;gt; Критический;;0_test;BD00;16 ноября 2012 г. 12:01:16;Давно не выполнялся поиск вирусов. ;10.54.45.26;16 ноября 2012 г. 12:01:16;dom;BD00;bd00;dom;
&amp;gt; Критический;;0_test;BEOVA;16 ноября 2012 г. 11:58:35;Давно не выполнялся поиск вирусов. ;10.54.44.70;16 ноября 2012 г. 12:06:28;dom;BEZULOVA;beova;dom;
&amp;gt; Критический;;0_test;BRCH11;16 ноября 2012 г. 11:55:25;Давно не выполнялся поиск вирусов. ;10.54.42.71;16 ноября 2012 г. 11:55:25;dom;BRONICH11;brich11;dom;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 10 Dec 2012 12:40:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/not-work-transforms/m-p/58507#M11496</guid>
      <dc:creator>klychnikov</dc:creator>
      <dc:date>2012-12-10T12:40:46Z</dc:date>
    </item>
    <item>
      <title>Re: not work transforms</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/not-work-transforms/m-p/58508#M11497</link>
      <description>&lt;P&gt;As I understand it is no support! Ask not for the first question and assistance to the no!&lt;/P&gt;</description>
      <pubDate>Thu, 13 Dec 2012 08:41:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/not-work-transforms/m-p/58508#M11497</guid>
      <dc:creator>klychnikov</dc:creator>
      <dc:date>2012-12-13T08:41:50Z</dc:date>
    </item>
    <item>
      <title>Re: not work transforms</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/not-work-transforms/m-p/58509#M11498</link>
      <description>&lt;P&gt;Just in terms of "making your life easy", I would be tempted to write a python script that handles the conversion of XML to CSV and then get Splunk to read in the CSV, that will be relatively simple. Maintaining and using the config above could become an effort over time.&lt;/P&gt;

&lt;P&gt;Otherwise, sed isn't my area of specialty sorry &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; But I always take the view that I should try and help Splunk out as much as I can to simplify configs and avoid performance hits (if you're indexing a lot)&lt;/P&gt;</description>
      <pubDate>Thu, 13 Dec 2012 08:46:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/not-work-transforms/m-p/58509#M11498</guid>
      <dc:creator>Drainy</dc:creator>
      <dc:date>2012-12-13T08:46:29Z</dc:date>
    </item>
    <item>
      <title>Re: not work transforms</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/not-work-transforms/m-p/58510#M11499</link>
      <description>&lt;P&gt;What now? If you're saying theres no support you just need to give it time, its a community site so it sometimes takes a while to get an answer&lt;/P&gt;</description>
      <pubDate>Thu, 13 Dec 2012 08:47:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/not-work-transforms/m-p/58510#M11499</guid>
      <dc:creator>Drainy</dc:creator>
      <dc:date>2012-12-13T08:47:09Z</dc:date>
    </item>
    <item>
      <title>Re: not work transforms</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/not-work-transforms/m-p/58511#M11500</link>
      <description>&lt;P&gt;Frankly this is not the answer. Ask about a particular situation. Enough time has passed, the last on a week.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Dec 2012 09:04:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/not-work-transforms/m-p/58511#M11500</guid>
      <dc:creator>klychnikov</dc:creator>
      <dc:date>2012-12-13T09:04:00Z</dc:date>
    </item>
    <item>
      <title>Re: not work transforms</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/not-work-transforms/m-p/58512#M11501</link>
      <description>&lt;P&gt;Well I understood the first part, it may not point out the error but it offers a workaround. The second part, what?&lt;/P&gt;</description>
      <pubDate>Thu, 13 Dec 2012 09:20:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/not-work-transforms/m-p/58512#M11501</guid>
      <dc:creator>Drainy</dc:creator>
      <dc:date>2012-12-13T09:20:05Z</dc:date>
    </item>
    <item>
      <title>Re: not work transforms</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/not-work-transforms/m-p/58513#M11502</link>
      <description>&lt;P&gt;All events brings in one event. I would like to a breakdown of the items on the events&lt;/P&gt;</description>
      <pubDate>Thu, 13 Dec 2012 09:24:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/not-work-transforms/m-p/58513#M11502</guid>
      <dc:creator>klychnikov</dc:creator>
      <dc:date>2012-12-13T09:24:08Z</dc:date>
    </item>
  </channel>
</rss>

