<?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: How to create new field combined from existing fields in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-new-field-combined-from-existing-fields/m-p/442181#M125583</link>
    <description>&lt;P&gt;Hi adonio. Sorry for not such a clear explenation and thank you for your message. I fixed it.&lt;BR /&gt;
I created 3 multivalue fields:&lt;BR /&gt;
1. | eval final_time=TestStart .",".TestEnd&lt;BR /&gt;
2. | eval run="1,0"&lt;BR /&gt;
3. | eval wait="0,1"&lt;/P&gt;

&lt;P&gt;To the combination TestStart and TestEnd belongs multivalue field | eval run="1,0" (on start, run is 1, at the end the run is 0) and also the multivalue field | eval wait="0,1".&lt;/P&gt;

&lt;P&gt;After that I created 3 new fields from the 3 previous multivalue fields&lt;/P&gt;

&lt;P&gt;| makemv tokenizer="([^,]+),?" final_time&lt;BR /&gt;
| makemv tokenizer="([^,]+),?" run&lt;BR /&gt;
| makemv tokenizer="([^,]+),?" wait&lt;BR /&gt;
| eval new=mvzip(final_time,run)&lt;BR /&gt;
| eval neww=mvzip(new,wait)&lt;BR /&gt;
| mvexpand neww&lt;BR /&gt;
| eval time=substr(neww,1,19)&lt;BR /&gt;
| eval run=substr(neww,21,1)&lt;BR /&gt;
| eval wait=substr(neww,23,1)&lt;BR /&gt;
| table time run wait&lt;/P&gt;</description>
    <pubDate>Wed, 30 Sep 2020 01:04:13 GMT</pubDate>
    <dc:creator>spisiakmi</dc:creator>
    <dc:date>2020-09-30T01:04:13Z</dc:date>
    <item>
      <title>How to create new field combined from existing fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-new-field-combined-from-existing-fields/m-p/442179#M125581</link>
      <description>&lt;P&gt;Hi I have such a table in which is described the proces of any TestMachine:&lt;BR /&gt;
A                          B                    C                      D&lt;BR /&gt;
TestStart   TestStatus  TestDuration    TestEnd&lt;BR /&gt;
11.03.2015 14:54:32 PASS    116 11.03.2015 14:56:28&lt;BR /&gt;
11.03.2015 14:57:10 PASS    116 11.03.2015 14:59:06&lt;BR /&gt;
11.03.2015 14:59:58 PASS    119 11.03.2015 15:01:57&lt;BR /&gt;
11.03.2015 15:03:21 FAIL              66    11.03.2015 15:04:27&lt;BR /&gt;
11.03.2015 15:04:54 PASS    116 11.03.2015 15:06:50&lt;BR /&gt;
11.03.2015 15:10:29 FAIL    185 11.03.2015 15:13:34&lt;/P&gt;

&lt;P&gt;I need to create a table or chart, where the status of the testmachine will be displayed.&lt;BR /&gt;
x axis: time, where will be combined columns A and D&lt;BR /&gt;
y axis: such a binari impuls 0 to 1, where the status of the machine will be displayed&lt;BR /&gt;
legend (status of the machine): RUN, WAIT&lt;BR /&gt;
RUN status: is between A1 and D1&lt;BR /&gt;
WAIT status: is between D1 and A2&lt;/P&gt;

&lt;P&gt;here is an example, what I need: &lt;A href="https://ibb.co/M6bcWnh"&gt;https://ibb.co/M6bcWnh&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;the events are sorted from the oldiest event&lt;/P&gt;

&lt;P&gt;Can you help me, please?&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jun 2019 07:24:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-new-field-combined-from-existing-fields/m-p/442179#M125581</guid>
      <dc:creator>spisiakmi</dc:creator>
      <dc:date>2019-06-26T07:24:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to create new field combined from existing fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-new-field-combined-from-existing-fields/m-p/442180#M125582</link>
      <description>&lt;P&gt;can you elaborate a little? &lt;BR /&gt;
what does it mean: "x axis: time, where will be combined columns A and D" &lt;BR /&gt;
what kind of combination? &lt;/P&gt;</description>
      <pubDate>Wed, 26 Jun 2019 17:20:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-new-field-combined-from-existing-fields/m-p/442180#M125582</guid>
      <dc:creator>adonio</dc:creator>
      <dc:date>2019-06-26T17:20:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to create new field combined from existing fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-new-field-combined-from-existing-fields/m-p/442181#M125583</link>
      <description>&lt;P&gt;Hi adonio. Sorry for not such a clear explenation and thank you for your message. I fixed it.&lt;BR /&gt;
I created 3 multivalue fields:&lt;BR /&gt;
1. | eval final_time=TestStart .",".TestEnd&lt;BR /&gt;
2. | eval run="1,0"&lt;BR /&gt;
3. | eval wait="0,1"&lt;/P&gt;

&lt;P&gt;To the combination TestStart and TestEnd belongs multivalue field | eval run="1,0" (on start, run is 1, at the end the run is 0) and also the multivalue field | eval wait="0,1".&lt;/P&gt;

&lt;P&gt;After that I created 3 new fields from the 3 previous multivalue fields&lt;/P&gt;

&lt;P&gt;| makemv tokenizer="([^,]+),?" final_time&lt;BR /&gt;
| makemv tokenizer="([^,]+),?" run&lt;BR /&gt;
| makemv tokenizer="([^,]+),?" wait&lt;BR /&gt;
| eval new=mvzip(final_time,run)&lt;BR /&gt;
| eval neww=mvzip(new,wait)&lt;BR /&gt;
| mvexpand neww&lt;BR /&gt;
| eval time=substr(neww,1,19)&lt;BR /&gt;
| eval run=substr(neww,21,1)&lt;BR /&gt;
| eval wait=substr(neww,23,1)&lt;BR /&gt;
| table time run wait&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 01:04:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-new-field-combined-from-existing-fields/m-p/442181#M125583</guid>
      <dc:creator>spisiakmi</dc:creator>
      <dc:date>2020-09-30T01:04:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to create new field combined from existing fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-new-field-combined-from-existing-fields/m-p/442182#M125584</link>
      <description>&lt;P&gt;I fixed it.&lt;BR /&gt;
I created 3 multivalue fields:&lt;BR /&gt;
1. | eval final_time=TestStart .",".TestEnd&lt;BR /&gt;
2. | eval run="1,0"&lt;BR /&gt;
3. | eval wait="0,1"&lt;/P&gt;

&lt;P&gt;To the combination TestStart and TestEnd belongs multivalue field | eval run="1,0" (on start, run is 1, at the end the run is 0) and also the multivalue field | eval wait="0,1".&lt;/P&gt;

&lt;P&gt;After that I created 3 new fields from the 3 previous multivalue fields&lt;/P&gt;

&lt;P&gt;| makemv tokenizer="([^,]+),?" final_time&lt;BR /&gt;
| makemv tokenizer="([^,]+),?" run&lt;BR /&gt;
| makemv tokenizer="([^,]+),?" wait&lt;BR /&gt;
| eval new=mvzip(final_time,run)&lt;BR /&gt;
| eval neww=mvzip(new,wait)&lt;BR /&gt;
| mvexpand neww&lt;BR /&gt;
| eval time=substr(neww,1,19)&lt;BR /&gt;
| eval run=substr(neww,21,1)&lt;BR /&gt;
| eval wait=substr(neww,23,1)&lt;BR /&gt;
| table time run wait&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 02:05:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-new-field-combined-from-existing-fields/m-p/442182#M125584</guid>
      <dc:creator>spisiakmi</dc:creator>
      <dc:date>2020-09-30T02:05:49Z</dc:date>
    </item>
  </channel>
</rss>

