<?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 perform a regex where grouping multiple lines to a single field/value? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-perform-a-regex-where-grouping-multiple-lines-to-a-single/m-p/622003#M216199</link>
    <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/6367"&gt;@bowesmana&lt;/a&gt;&amp;nbsp;i got a new one.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;using similar regex. how can i do a query where it will provide output if will provide output per NODE0 or NODE1 and display only if each line after "/var" if the line does not have "no such file or directory"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;node0:&lt;BR /&gt;--------------------------------------------------------------------------&lt;BR /&gt;/var/: No such file or directory&lt;BR /&gt;/var/tmp/: No such file or directory&lt;BR /&gt;/var/: blablablaba.txt&lt;/P&gt;&lt;P&gt;node1:&lt;BR /&gt;--------------------------------------------------------------------------&lt;BR /&gt;/var/: No such file or directory&lt;BR /&gt;/var/tmp/: No such file or directory&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;so the output will end up being:&lt;/P&gt;&lt;P&gt;NODE0:&lt;/P&gt;&lt;P&gt;/var/: blablablaba.txt&lt;/P&gt;&lt;P&gt;NODE1:&lt;/P&gt;&lt;P&gt;null/blank/nothing&lt;/P&gt;</description>
    <pubDate>Thu, 24 Nov 2022 14:07:56 GMT</pubDate>
    <dc:creator>tha_ghost99</dc:creator>
    <dc:date>2022-11-24T14:07:56Z</dc:date>
    <item>
      <title>How to perform a regex where grouping multiple lines to a single field/value?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-perform-a-regex-where-grouping-multiple-lines-to-a-single/m-p/621893#M216174</link>
      <description>&lt;P&gt;below is the value of a field.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;what i would like to do is do a regex where i would output node# + temperature.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;example output:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Node0_temperature=26 degrees C / 78 degrees F&lt;/P&gt;
&lt;P&gt;Node1_temperature=29 degrees C / 84 degrees F&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;thanks,&lt;/P&gt;
&lt;PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;node0:
--------------------------------------------------------------------------
Routing Engine status:
  Slot 0:
    Current state                  Master
    Election priority              Master (default)
    Temperature                 26 degrees C / 78 degrees F
    CPU temperature             41 degrees C / 105 degrees F
    DRAM                      98254 MB (98304 MB installed)
    Memory utilization           4 percent
    5 sec CPU utilization:
      User                       0 percent
      Background                 0 percent
      Kernel                     4 percent
      Interrupt                  1 percent
      Idle                      95 percent

node1:
--------------------------------------------------------------------------
Routing Engine status:
  Slot 0:
    Current state                  Master
    Election priority              Master (default)
    Temperature                 29 degrees C / 84 degrees F
    CPU temperature             41 degrees C / 105 degrees F
    DRAM                      98254 MB (98304 MB installed)
    Memory utilization           4 percent
    5 sec CPU utilization:
      User                       0 percent
      Background                 0 percent
      Kernel                     2 percent
      Interrupt                  0 percent
      Idle                      98 percent&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Nov 2022 21:19:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-perform-a-regex-where-grouping-multiple-lines-to-a-single/m-p/621893#M216174</guid>
      <dc:creator>tha_ghost99</dc:creator>
      <dc:date>2022-11-23T21:19:32Z</dc:date>
    </item>
    <item>
      <title>Re: how to perform a regex where grouping multiple lines to a single field/value?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-perform-a-regex-where-grouping-multiple-lines-to-a-single/m-p/621900#M216175</link>
      <description>&lt;P&gt;What are we looking at?&amp;nbsp; Is that raw data or results from a Splunk search?&amp;nbsp; Is it one event, two, or many?&amp;nbsp; Which fields are extracted already?&amp;nbsp; What regex/query have you tried so far?&lt;/P&gt;</description>
      <pubDate>Wed, 23 Nov 2022 19:47:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-perform-a-regex-where-grouping-multiple-lines-to-a-single/m-p/621900#M216175</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2022-11-23T19:47:18Z</dc:date>
    </item>
    <item>
      <title>Re: how to perform a regex where grouping multiple lines to a single field/value?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-perform-a-regex-where-grouping-multiple-lines-to-a-single/m-p/621904#M216176</link>
      <description>&lt;P&gt;hi thank you very much for replying.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;this is the raw data, and one event.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;within that event, splunk extracted the output provided, as a single field.&lt;/P&gt;&lt;P&gt;so technically you can ignore about the field, treat this as a single event. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Nov 2022 20:34:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-perform-a-regex-where-grouping-multiple-lines-to-a-single/m-p/621904#M216176</guid>
      <dc:creator>tha_ghost99</dc:creator>
      <dc:date>2022-11-23T20:34:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to perform a regex where grouping multiple lines to a single field/value?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-perform-a-regex-where-grouping-multiple-lines-to-a-single/m-p/621918#M216179</link>
      <description>&lt;P&gt;Assuming that's a single _raw event, then you want something like this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex max_match=0 "(?s)(?&amp;lt;nodeNum&amp;gt;node\d+):.*?Temperature\s+(?&amp;lt;temp&amp;gt;[^\n]*)"
| eval Temps=mvzip(nodeNum, temp, "=")&lt;/LI-CODE&gt;&lt;P&gt;which will do a ". matches newline" match (?s) and extract both fields to nodeNum and temp fields&lt;/P&gt;&lt;P&gt;the mzvip will then join the two together.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Nov 2022 22:34:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-perform-a-regex-where-grouping-multiple-lines-to-a-single/m-p/621918#M216179</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2022-11-23T22:34:30Z</dc:date>
    </item>
    <item>
      <title>Re: how to perform a regex where grouping multiple lines to a single field/value?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-perform-a-regex-where-grouping-multiple-lines-to-a-single/m-p/621919#M216180</link>
      <description>&lt;P&gt;thank you very much, this worked really well.. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/213957"&gt;@richgalloway&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i may ask for a few more help later on. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thank you also &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/6367"&gt;@bowesmana&lt;/a&gt; for the help.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Nov 2022 23:24:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-perform-a-regex-where-grouping-multiple-lines-to-a-single/m-p/621919#M216180</guid>
      <dc:creator>tha_ghost99</dc:creator>
      <dc:date>2022-11-23T23:24:59Z</dc:date>
    </item>
    <item>
      <title>Re: how to perform a regex where grouping multiple lines to a single field/value?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-perform-a-regex-where-grouping-multiple-lines-to-a-single/m-p/621920#M216181</link>
      <description>&lt;P&gt;sorry me again, what if i wanted to add a third paramater? example 'last reboot reason' ?&lt;/P&gt;&lt;P&gt;haha im stuck yet again&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/213957"&gt;@richgalloway&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Nov 2022 23:36:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-perform-a-regex-where-grouping-multiple-lines-to-a-single/m-p/621920#M216181</guid>
      <dc:creator>tha_ghost99</dc:creator>
      <dc:date>2022-11-23T23:36:23Z</dc:date>
    </item>
    <item>
      <title>Re: how to perform a regex where grouping multiple lines to a single field/value?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-perform-a-regex-where-grouping-multiple-lines-to-a-single/m-p/621924#M216182</link>
      <description>&lt;P&gt;Did you intend to accept &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/6367"&gt;@bowesmana&lt;/a&gt; 's answer?&amp;nbsp; I have not provided one, yet.&lt;/P&gt;</description>
      <pubDate>Thu, 24 Nov 2022 01:02:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-perform-a-regex-where-grouping-multiple-lines-to-a-single/m-p/621924#M216182</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2022-11-24T01:02:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to perform a regex where grouping multiple lines to a single field/value?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-perform-a-regex-where-grouping-multiple-lines-to-a-single/m-p/622003#M216199</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/6367"&gt;@bowesmana&lt;/a&gt;&amp;nbsp;i got a new one.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;using similar regex. how can i do a query where it will provide output if will provide output per NODE0 or NODE1 and display only if each line after "/var" if the line does not have "no such file or directory"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;node0:&lt;BR /&gt;--------------------------------------------------------------------------&lt;BR /&gt;/var/: No such file or directory&lt;BR /&gt;/var/tmp/: No such file or directory&lt;BR /&gt;/var/: blablablaba.txt&lt;/P&gt;&lt;P&gt;node1:&lt;BR /&gt;--------------------------------------------------------------------------&lt;BR /&gt;/var/: No such file or directory&lt;BR /&gt;/var/tmp/: No such file or directory&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;so the output will end up being:&lt;/P&gt;&lt;P&gt;NODE0:&lt;/P&gt;&lt;P&gt;/var/: blablablaba.txt&lt;/P&gt;&lt;P&gt;NODE1:&lt;/P&gt;&lt;P&gt;null/blank/nothing&lt;/P&gt;</description>
      <pubDate>Thu, 24 Nov 2022 14:07:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-perform-a-regex-where-grouping-multiple-lines-to-a-single/m-p/622003#M216199</guid>
      <dc:creator>tha_ghost99</dc:creator>
      <dc:date>2022-11-24T14:07:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to perform a regex where grouping multiple lines to a single field/value?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-perform-a-regex-where-grouping-multiple-lines-to-a-single/m-p/622043#M216215</link>
      <description>&lt;P&gt;I am not sure how you'd write the regex to extract multiple /var lines that are 'connected' to the node - but I suggest asking this question in a new topic, so more eyes will get to see it.&lt;/P&gt;</description>
      <pubDate>Fri, 25 Nov 2022 02:54:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-perform-a-regex-where-grouping-multiple-lines-to-a-single/m-p/622043#M216215</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2022-11-25T02:54:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to perform a regex where grouping multiple lines to a single field/value?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-perform-a-regex-where-grouping-multiple-lines-to-a-single/m-p/622125#M216248</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/6367"&gt;@bowesmana&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thank you,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i will do that, if i can make it easier for you. using the same search string you gave me.&lt;/P&gt;&lt;P&gt;how can i modify it so that it grabs every single line.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;node0:&lt;BR /&gt;--------------------------------------------------------------------------&lt;BR /&gt;/var/: No such file or directory&lt;BR /&gt;/var/tmp/: No such file or directory&lt;BR /&gt;/var/: blablablaba.txt&lt;/P&gt;&lt;P&gt;node1:&lt;BR /&gt;--------------------------------------------------------------------------&lt;BR /&gt;/var/: No such file or directory&lt;BR /&gt;/var/tmp/: No such file or directory&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;output expecting:&lt;/P&gt;&lt;P&gt;node0,/var/: No such file or directory&lt;BR /&gt;node0,/var/tmp/: No such file or directory&lt;BR /&gt;node0,/var/: blablablaba.txt&lt;/P&gt;&lt;P&gt;node1,/var/: No such file or directory&lt;BR /&gt;node1,/var/tmp/: No such file or directory&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Nov 2022 18:22:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-perform-a-regex-where-grouping-multiple-lines-to-a-single/m-p/622125#M216248</guid>
      <dc:creator>tha_ghost99</dc:creator>
      <dc:date>2022-11-25T18:22:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to perform a regex where grouping multiple lines to a single field/value?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-perform-a-regex-where-grouping-multiple-lines-to-a-single/m-p/622290#M216314</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/6367"&gt;@bowesmana&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;quick question on this output. how can i modify it, if there are multiple Temperature fields under node0?&lt;/P&gt;&lt;P&gt;how can i capture the other Temperature values under the same node #?&lt;/P&gt;&lt;PRE&gt;| rex max_match=0 "(?s)(?&amp;lt;nodeNum&amp;gt;node\d+):.*?Temperature\s+(?&amp;lt;temp&amp;gt;[^\n]*)"
| eval Temps=mvzip(nodeNum, temp, "=")&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Nov 2022 16:57:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-perform-a-regex-where-grouping-multiple-lines-to-a-single/m-p/622290#M216314</guid>
      <dc:creator>tha_ghost99</dc:creator>
      <dc:date>2022-11-28T16:57:10Z</dc:date>
    </item>
  </channel>
</rss>

