<?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: Regex Query Help: Need to Write a regex query for my log in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Regex-Query-Help-Need-to-Write-a-regex-query-for-my-log/m-p/446455#M126663</link>
    <description>&lt;P&gt;Tried but not getting the results as expected. I am not able to fetch the (Service), (PD) and (Status).&lt;/P&gt;</description>
    <pubDate>Thu, 14 Jun 2018 10:23:05 GMT</pubDate>
    <dc:creator>mintughosh</dc:creator>
    <dc:date>2018-06-14T10:23:05Z</dc:date>
    <item>
      <title>Regex Query Help: Need to Write a regex query for my log</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-Query-Help-Need-to-Write-a-regex-query-for-my-log/m-p/446451#M126659</link>
      <description>&lt;P&gt;Below given is one section of an event. The event has multiple such sections. I want to write a regex search query so that I can fetch the 3 fields from the below given log&lt;BR /&gt;
1) 'Tableau Server (Service) ' (PD) is (Status).&lt;/P&gt;

&lt;P&gt;2018-05-25 02:21:30.270 -0500_EXACT_10.218.108.14:RTEEPK08_:&lt;EM&gt;pid=12466_0x4364712f&lt;/EM&gt;&lt;EM&gt;user=&lt;/EM&gt;&lt;EM&gt;request=&lt;/EM&gt;_ RTEEPK08:&lt;BR /&gt;
    Status: DEGRADED&lt;BR /&gt;
    'Tableau Server Data Engine' (7653) is running.&lt;BR /&gt;
    'Tableau Server Coordination Service 0' (7633) is running.&lt;BR /&gt;
    'Tableau Server Search and Browse 0' (2542) is running.&lt;BR /&gt;
    'Tableau Server Tabadmin Service 0' (25262) is running.&lt;BR /&gt;
    'Tableau Server Gateway' (252564) is running.&lt;BR /&gt;
    'Tableau Server Cluster Controller' is stopped.&lt;BR /&gt;
    'Tableau Server Repository' status is not available.&lt;BR /&gt;
    'Tableau Server File Store' status is not available.&lt;/P&gt;

&lt;P&gt;RTEEPK09:&lt;BR /&gt;
    Status: STOPPED&lt;BR /&gt;
RTEEPK10:&lt;BR /&gt;
    Status: STOPPED&lt;/P&gt;

&lt;P&gt;I already wrote a regex query to extract it in the form of table for host and Status. But I am having problems in writing the regex query for  'Tableau Server (Service)' (PD) is (Status). &lt;/P&gt;

&lt;P&gt;Extract - (Service), (PD) and (Status)&lt;/P&gt;

&lt;P&gt;Thank you&lt;BR /&gt;
Note: This is a sample modified log file&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 19:54:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-Query-Help-Need-to-Write-a-regex-query-for-my-log/m-p/446451#M126659</guid>
      <dc:creator>mintughosh</dc:creator>
      <dc:date>2020-09-29T19:54:49Z</dc:date>
    </item>
    <item>
      <title>Re: Regex Query Help: Need to Write a regex query for my log</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-Query-Help-Need-to-Write-a-regex-query-for-my-log/m-p/446452#M126660</link>
      <description>&lt;P&gt;Following should work:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rex max_match=0 "Tableau Server (?&amp;lt;Service&amp;gt;[^']+)'\s*\(?(?&amp;lt;PD&amp;gt;\d+)?\)?\s+(?:is|status\s+is)\s+(?&amp;lt;Status&amp;gt;[\w\s]+)\."
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;A href="https://regex101.com/r/pwEJae/1"&gt;https://regex101.com/r/pwEJae/1&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Only trouble with this: it gets the data into multi valued fields which means that you loose a reliable connection between the different parts of each line. So you might want to consider splitting this into individual events for each line, before extracting the individual fields.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jun 2018 07:59:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-Query-Help-Need-to-Write-a-regex-query-for-my-log/m-p/446452#M126660</guid>
      <dc:creator>FrankVl</dc:creator>
      <dc:date>2018-06-14T07:59:42Z</dc:date>
    </item>
    <item>
      <title>Re: Regex Query Help: Need to Write a regex query for my log</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-Query-Help-Need-to-Write-a-regex-query-for-my-log/m-p/446453#M126661</link>
      <description>&lt;P&gt;It gives me the following error.&lt;BR /&gt;
Error in 'rex' command: The regex 'max_matches=0' does not extract anything. It should specify at least one named group. Format: (?...).&lt;/P&gt;

&lt;P&gt;Should I be adding something more to that query ?&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jun 2018 09:39:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-Query-Help-Need-to-Write-a-regex-query-for-my-log/m-p/446453#M126661</guid>
      <dc:creator>mintughosh</dc:creator>
      <dc:date>2018-06-14T09:39:39Z</dc:date>
    </item>
    <item>
      <title>Re: Regex Query Help: Need to Write a regex query for my log</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-Query-Help-Need-to-Write-a-regex-query-for-my-log/m-p/446454#M126662</link>
      <description>&lt;P&gt;try &lt;CODE&gt;max_match=0&lt;/CODE&gt; instead of &lt;CODE&gt;max_matches=0&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jun 2018 09:58:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-Query-Help-Need-to-Write-a-regex-query-for-my-log/m-p/446454#M126662</guid>
      <dc:creator>493669</dc:creator>
      <dc:date>2018-06-14T09:58:57Z</dc:date>
    </item>
    <item>
      <title>Re: Regex Query Help: Need to Write a regex query for my log</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-Query-Help-Need-to-Write-a-regex-query-for-my-log/m-p/446455#M126663</link>
      <description>&lt;P&gt;Tried but not getting the results as expected. I am not able to fetch the (Service), (PD) and (Status).&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jun 2018 10:23:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-Query-Help-Need-to-Write-a-regex-query-for-my-log/m-p/446455#M126663</guid>
      <dc:creator>mintughosh</dc:creator>
      <dc:date>2018-06-14T10:23:05Z</dc:date>
    </item>
    <item>
      <title>Re: Regex Query Help: Need to Write a regex query for my log</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-Query-Help-Need-to-Write-a-regex-query-for-my-log/m-p/446456#M126664</link>
      <description>&lt;P&gt;Ok. My issue is Resolved. I have added few more parameter and then followed by query Frank Suggested and then i added table to it&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jun 2018 10:35:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-Query-Help-Need-to-Write-a-regex-query-for-my-log/m-p/446456#M126664</guid>
      <dc:creator>mintughosh</dc:creator>
      <dc:date>2018-06-14T10:35:14Z</dc:date>
    </item>
    <item>
      <title>Re: Regex Query Help: Need to Write a regex query for my log</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-Query-Help-Need-to-Write-a-regex-query-for-my-log/m-p/446457#M126665</link>
      <description>&lt;P&gt;Good catch, updated that in my answer.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jun 2018 10:59:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-Query-Help-Need-to-Write-a-regex-query-for-my-log/m-p/446457#M126665</guid>
      <dc:creator>FrankVl</dc:creator>
      <dc:date>2018-06-14T10:59:20Z</dc:date>
    </item>
  </channel>
</rss>

