<?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: Join multiple lines using free text in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Join-multiple-lines-using-free-text/m-p/582441#M202858</link>
    <description>&lt;P&gt;Untested but this should solve your issue&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;..base search here...
| rex "sshd\[(?&amp;lt;sshd_pid&amp;gt;\d+)\]"
| eval sshd_pid = host . " - " . sshd_pid
| transaction sshd_pid&lt;/LI-CODE&gt;</description>
    <pubDate>Tue, 25 Jan 2022 20:22:44 GMT</pubDate>
    <dc:creator>morethanyell</dc:creator>
    <dc:date>2022-01-25T20:22:44Z</dc:date>
    <item>
      <title>Join multiple lines using free text</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Join-multiple-lines-using-free-text/m-p/582430#M202855</link>
      <description>&lt;P&gt;I was trying to join multiple lines generated in /var/log/secure. I tried with transaction but looks like that doesn't work in this case. Below is the example of secure file.&amp;nbsp;&lt;/P&gt;&lt;P&gt;In this case, I want to combine all these lines based on a common text "sshd[288792]". Your help on this would be really appreciated. I cannot search with same keyword as id in this sshd "288792" will be different for each sessions.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Jan 25 18:34:06 SERVER1 sshd[288792]: Connection from xxx.xxxx.xxx.xxx port xxxx on xxx.xxx.xxx.xxx port xx&lt;BR /&gt;Jan 25 18:34:10 SERVER1 sshd[288792]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=&lt;BR /&gt;Jan 25 18:34:10 SERVER1 sshd[288792]: pam_sss(sshd:auth): User info message: Your password will expire&lt;BR /&gt;Jan 25 18:34:10 SERVER1 sshd[288792]: pam_sss(sshd:auth):&amp;nbsp; success; logname= uid=0 euid=0&lt;BR /&gt;Jan 25 18:34:10 SERVER1 sshd[288792]: Accepted&amp;nbsp; for xxxx from xxx.xxx.xxx.xxx port xxxxx xxx&lt;BR /&gt;Jan 25 18:34:10 SERVER1 sshd[288792]: pam_unix(sshd:session): session opened for user xxxxx by (uid=0)&lt;BR /&gt;Jan 25 18:34:10 SERVER1 sshd[288792]: User child is on pid 289788&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jan 2022 19:26:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Join-multiple-lines-using-free-text/m-p/582430#M202855</guid>
      <dc:creator>sarithbabu</dc:creator>
      <dc:date>2022-01-25T19:26:47Z</dc:date>
    </item>
    <item>
      <title>Re: Join multiple lines using free text</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Join-multiple-lines-using-free-text/m-p/582441#M202858</link>
      <description>&lt;P&gt;Untested but this should solve your issue&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;..base search here...
| rex "sshd\[(?&amp;lt;sshd_pid&amp;gt;\d+)\]"
| eval sshd_pid = host . " - " . sshd_pid
| transaction sshd_pid&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 25 Jan 2022 20:22:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Join-multiple-lines-using-free-text/m-p/582441#M202858</guid>
      <dc:creator>morethanyell</dc:creator>
      <dc:date>2022-01-25T20:22:44Z</dc:date>
    </item>
    <item>
      <title>Re: Join multiple lines using free text</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Join-multiple-lines-using-free-text/m-p/582457#M202866</link>
      <description>&lt;P&gt;Wow... This code worked.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you so much.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jan 2022 23:59:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Join-multiple-lines-using-free-text/m-p/582457#M202866</guid>
      <dc:creator>sarithbabu</dc:creator>
      <dc:date>2022-01-25T23:59:38Z</dc:date>
    </item>
  </channel>
</rss>

