<?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: Create new field based off combination of 2 in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Create-new-field-based-off-combination-of-2/m-p/526972#M148734</link>
    <description>&lt;P&gt;Correct I have&amp;nbsp;&lt;SPAN&gt;Tag with value "CTL.CTL 5580.I" and a field Value with value "279"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I also have another event with the Tag "CTL.CTL 5580.A" and a field Value with value "1"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;What I want is basically a field&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="50%" height="25px"&gt;&lt;SPAN&gt;CTL.CTL 5580.I&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD width="50%" height="25px"&gt;&lt;SPAN&gt;CTL.CTL 5580.A&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%" height="25px"&gt;279&lt;/TD&gt;&lt;TD width="50%" height="25px"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to do some trendline on the value over time that&amp;nbsp;&lt;SPAN&gt;CTL.CTL 5580.I as well a use it s a field to fit a model for categorical predictions on&amp;nbsp;&amp;nbsp;CTL.CTL 5580.A&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 29 Oct 2020 00:05:06 GMT</pubDate>
    <dc:creator>jachockey012</dc:creator>
    <dc:date>2020-10-29T00:05:06Z</dc:date>
    <item>
      <title>Create new field based off combination of 2</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Create-new-field-based-off-combination-of-2/m-p/526750#M148684</link>
      <description>&lt;P&gt;so I have some data that comes in via a TCP input. I want to quickly run a specific search but it requires me to have the data formated a bit different. I think the tables below will help describe what I am looking to do because I am unable to describe it very well.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Event 1&lt;/P&gt;&lt;P&gt;Name Value&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;metric_name&lt;/TD&gt;&lt;TD&gt;Value&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="67.2979797979798%" height="25px"&gt;A&lt;/TD&gt;&lt;TD width="32.57575757575758%" height="25px"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="67.2979797979798%" height="25px"&gt;B&lt;/TD&gt;&lt;TD width="32.57575757575758%" height="25px"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="67.2979797979798%" height="25px"&gt;C&lt;/TD&gt;&lt;TD width="32.57575757575758%" height="25px"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="67.2979797979798%" height="25px"&gt;D&lt;/TD&gt;&lt;TD width="32.57575757575758%" height="25px"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="67.2979797979798%" height="25px"&gt;I&lt;/TD&gt;&lt;TD width="32.57575757575758%" height="25px"&gt;274&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;Event 2&lt;/P&gt;&lt;P&gt;Name Value&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;mertic_name&lt;/TD&gt;&lt;TD&gt;Value&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="67.2979797979798%" height="25px"&gt;A&lt;/TD&gt;&lt;TD width="32.57575757575758%" height="25px"&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="67.2979797979798%" height="25px"&gt;B&lt;/TD&gt;&lt;TD width="32.57575757575758%" height="25px"&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="67.2979797979798%" height="25px"&gt;C&lt;/TD&gt;&lt;TD width="32.57575757575758%" height="25px"&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="67.2979797979798%" height="25px"&gt;D&lt;/TD&gt;&lt;TD width="32.57575757575758%" height="25px"&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="67.2979797979798%" height="25px"&gt;I&lt;/TD&gt;&lt;TD width="32.57575757575758%" height="25px"&gt;344&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I want to have is a new field for each of the Names and then every new Value is "appended" to that event.&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="20%" height="25px"&gt;A&lt;/TD&gt;&lt;TD width="20%" height="25px"&gt;B&lt;/TD&gt;&lt;TD width="20%" height="25px"&gt;C&lt;/TD&gt;&lt;TD width="20%" height="25px"&gt;D&lt;/TD&gt;&lt;TD width="20%" height="25px"&gt;I&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="20%" height="25px"&gt;1&lt;/TD&gt;&lt;TD width="20%" height="25px"&gt;0&lt;/TD&gt;&lt;TD width="20%" height="25px"&gt;0&lt;/TD&gt;&lt;TD width="20%" height="25px"&gt;0&lt;/TD&gt;&lt;TD width="20%" height="25px"&gt;274&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="20%" height="25px"&gt;2&lt;/TD&gt;&lt;TD width="20%" height="25px"&gt;2&lt;/TD&gt;&lt;TD width="20%" height="25px"&gt;2&lt;/TD&gt;&lt;TD width="20%" height="25px"&gt;2&lt;/TD&gt;&lt;TD width="20%" height="25px"&gt;344&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Wed, 28 Oct 2020 15:23:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Create-new-field-based-off-combination-of-2/m-p/526750#M148684</guid>
      <dc:creator>jachockey012</dc:creator>
      <dc:date>2020-10-28T15:23:51Z</dc:date>
    </item>
    <item>
      <title>Re: Create new field based off combination of 2</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Create-new-field-based-off-combination-of-2/m-p/526787#M148696</link>
      <description>&lt;P&gt;Can you provide an example of your raw events and any existing field extractions? The layout of the raw event will determine the solution e.g. a solution for a JSON event will look different to a solution to a key=value event.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Oct 2020 09:05:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Create-new-field-based-off-combination-of-2/m-p/526787#M148696</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2020-10-28T09:05:28Z</dc:date>
    </item>
    <item>
      <title>Re: Create new field based off combination of 2</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Create-new-field-based-off-combination-of-2/m-p/526890#M148722</link>
      <description>&lt;P&gt;So the data is sent in single line event looks like this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;2020-09-25 06:38:56.080 +0000 Tag="CTL.CTL 5580.I" Value="279" Quality="good" ControlLogix 5580&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using the Kepware TA from the&amp;nbsp;&lt;A href="https://splunkbase.splunk.com/app/3963/" target="_blank"&gt;https://splunkbase.splunk.com/app/3963/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;----- Transforms.conf -----&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;[metric_value]&lt;BR /&gt;FORMAT = _value::$1&lt;BR /&gt;REGEX = Value="(\S+?)"&lt;BR /&gt;WRITE_META = 1&lt;/P&gt;&lt;P&gt;[kepware_path]&lt;BR /&gt;FORMAT = kepware_path::"$1"&lt;BR /&gt;REGEX = Tag="(.+?)"&lt;BR /&gt;WRITE_META = 1&lt;/P&gt;&lt;P&gt;[quality]&lt;BR /&gt;FORMAT = quality::"$1"&lt;BR /&gt;REGEX = Quality="(.+?)"&lt;BR /&gt;WRITE_META = 1&lt;/P&gt;&lt;P&gt;[metric_name]&lt;BR /&gt;FORMAT = metric_name::"$1"&lt;BR /&gt;REGEX = [A-z0-9_()]+\.([A-z0-9_()\s]*?)\"\sValue&lt;BR /&gt;WRITE_META = 1&lt;/P&gt;&lt;P&gt;[asset]&lt;BR /&gt;FORMAT = asset::"$1"&lt;BR /&gt;REGEX = Tag\=\"([A-z0-9.\s*()_]*)\.&lt;BR /&gt;WRITE_META = 1&lt;/P&gt;&lt;P&gt;[metadata]&lt;BR /&gt;FORMAT = metadata::“$1”&lt;BR /&gt;REGEX = Quality=".*"\s*(.*)&lt;BR /&gt;WRITE_META = 1&lt;/P&gt;</description>
      <pubDate>Wed, 28 Oct 2020 15:08:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Create-new-field-based-off-combination-of-2/m-p/526890#M148722</guid>
      <dc:creator>jachockey012</dc:creator>
      <dc:date>2020-10-28T15:08:37Z</dc:date>
    </item>
    <item>
      <title>Re: Create new field based off combination of 2</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Create-new-field-based-off-combination-of-2/m-p/526894#M148723</link>
      <description>&lt;P&gt;Try&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| extract
| fields - _time _raw
| table *&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 28 Oct 2020 15:22:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Create-new-field-based-off-combination-of-2/m-p/526894#M148723</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2020-10-28T15:22:11Z</dc:date>
    </item>
    <item>
      <title>Re: Create new field based off combination of 2</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Create-new-field-based-off-combination-of-2/m-p/526899#M148725</link>
      <description>&lt;P&gt;That didnt end up working. As I said I am having a hard time explaining I think this would be an example in python sudocode...&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;for i in metric_name
  if (i = A)
    A.extend (A)
  if (i = B)
  if (i = C)
...&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to take each "metric_name" and make it a column with the "Value" and then later "_time" from that event as a row/element.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Oct 2020 15:33:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Create-new-field-based-off-combination-of-2/m-p/526899#M148725</guid>
      <dc:creator>jachockey012</dc:creator>
      <dc:date>2020-10-28T15:33:17Z</dc:date>
    </item>
    <item>
      <title>Re: Create new field based off combination of 2</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Create-new-field-based-off-combination-of-2/m-p/526916#M148727</link>
      <description>&lt;P&gt;When you do the extract, from your sample data, you will get a field called&amp;nbsp;Tag with value "CTL.CTL 5580.I", a field called Value with value "279", and a field called Quality with a value "good". Assuming your other events have similar fields, all the Tag values will be in Tag fields, etc. The table command just displays them as you showed in your original post. The only thing I can think of that is different from what I think you are asking for is that they are not in multi-value fields. Assuming a table is not useful to you for some reason, perhaps you need to expand on what it is you are trying to achieve beyond getting all the values listed under their key names.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Oct 2020 16:26:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Create-new-field-based-off-combination-of-2/m-p/526916#M148727</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2020-10-28T16:26:54Z</dc:date>
    </item>
    <item>
      <title>Re: Create new field based off combination of 2</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Create-new-field-based-off-combination-of-2/m-p/526972#M148734</link>
      <description>&lt;P&gt;Correct I have&amp;nbsp;&lt;SPAN&gt;Tag with value "CTL.CTL 5580.I" and a field Value with value "279"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I also have another event with the Tag "CTL.CTL 5580.A" and a field Value with value "1"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;What I want is basically a field&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="50%" height="25px"&gt;&lt;SPAN&gt;CTL.CTL 5580.I&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD width="50%" height="25px"&gt;&lt;SPAN&gt;CTL.CTL 5580.A&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%" height="25px"&gt;279&lt;/TD&gt;&lt;TD width="50%" height="25px"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to do some trendline on the value over time that&amp;nbsp;&lt;SPAN&gt;CTL.CTL 5580.I as well a use it s a field to fit a model for categorical predictions on&amp;nbsp;&amp;nbsp;CTL.CTL 5580.A&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Oct 2020 00:05:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Create-new-field-based-off-combination-of-2/m-p/526972#M148734</guid>
      <dc:creator>jachockey012</dc:creator>
      <dc:date>2020-10-29T00:05:06Z</dc:date>
    </item>
    <item>
      <title>Re: Create new field based off combination of 2</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Create-new-field-based-off-combination-of-2/m-p/526975#M148736</link>
      <description>&lt;LI-CODE lang="markup"&gt;| bucket span=1s _time 
| chart values(Value) over _time by metric_name&lt;/LI-CODE&gt;&lt;P&gt;This was able to get me what I needed! Not the most optimal but defiantly good enough for me.&amp;nbsp; This works because I would have all my events within the same second&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Oct 2020 00:33:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Create-new-field-based-off-combination-of-2/m-p/526975#M148736</guid>
      <dc:creator>jachockey012</dc:creator>
      <dc:date>2020-10-29T00:33:29Z</dc:date>
    </item>
  </channel>
</rss>

