<?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 Getting error in rex command while running search for DB health check report. in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Getting-error-in-rex-command-while-running-search-for-DB-health/m-p/517424#M145497</link>
    <description>&lt;P&gt;Hello Splunkers,&lt;/P&gt;
&lt;P&gt;I'm working on creating a DB health check report. Idea is to get the&amp;nbsp; error info when there is&amp;nbsp; a failed db connection.&amp;nbsp; When I'm trying to run the search below in Splunk QA I'm getting an error as&amp;nbsp;&lt;SPAN&gt;Error in 'rex' command: Encountered the following error while compiling the regex '^(?&amp;amp;lt;error&amp;amp;gt;.*)\n?': Regex: syntax error in subpattern name (missing terminator). &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Could you please help me resolve this issue? Thanks in advance.&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;index="_internal" sourcetype=dbx_job_metrics input_name=* connection="*"
| eval event_time=strftime(_time,"%m/%d/%y %H:%M:%S")
| join type=left connection [search index="_internal" sourcetype=dbx_server ERROR
| rex field=_raw "^(?&amp;amp;lt;error&amp;amp;gt;.*)\n?"
| rex field=error "/api/connections/(?&amp;amp;lt;connection&amp;amp;gt;[^/]+)"]
| stats latest(event_time) as event_time latest(host) as HF latest(connection) as connection latest(status) as status latest(error) as error by input_name
| sort - status&lt;/LI-CODE&gt;</description>
    <pubDate>Wed, 02 Sep 2020 18:04:47 GMT</pubDate>
    <dc:creator>firefox95</dc:creator>
    <dc:date>2020-09-02T18:04:47Z</dc:date>
    <item>
      <title>Getting error in rex command while running search for DB health check report.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Getting-error-in-rex-command-while-running-search-for-DB-health/m-p/517424#M145497</link>
      <description>&lt;P&gt;Hello Splunkers,&lt;/P&gt;
&lt;P&gt;I'm working on creating a DB health check report. Idea is to get the&amp;nbsp; error info when there is&amp;nbsp; a failed db connection.&amp;nbsp; When I'm trying to run the search below in Splunk QA I'm getting an error as&amp;nbsp;&lt;SPAN&gt;Error in 'rex' command: Encountered the following error while compiling the regex '^(?&amp;amp;lt;error&amp;amp;gt;.*)\n?': Regex: syntax error in subpattern name (missing terminator). &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Could you please help me resolve this issue? Thanks in advance.&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;index="_internal" sourcetype=dbx_job_metrics input_name=* connection="*"
| eval event_time=strftime(_time,"%m/%d/%y %H:%M:%S")
| join type=left connection [search index="_internal" sourcetype=dbx_server ERROR
| rex field=_raw "^(?&amp;amp;lt;error&amp;amp;gt;.*)\n?"
| rex field=error "/api/connections/(?&amp;amp;lt;connection&amp;amp;gt;[^/]+)"]
| stats latest(event_time) as event_time latest(host) as HF latest(connection) as connection latest(status) as status latest(error) as error by input_name
| sort - status&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 02 Sep 2020 18:04:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Getting-error-in-rex-command-while-running-search-for-DB-health/m-p/517424#M145497</guid>
      <dc:creator>firefox95</dc:creator>
      <dc:date>2020-09-02T18:04:47Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk- Error in 'rex' command while running search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Getting-error-in-rex-command-while-running-search-for-DB-health/m-p/517425#M145498</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/224393"&gt;@firefox95&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;the first regex isn't so clear for me,&amp;nbsp;because it seems that you take with the first regex all the _raw and with the second a part of it, so why you extracted twice?&lt;/P&gt;&lt;P&gt;could you share an example of your logs?&lt;/P&gt;&lt;P&gt;Then when you insert codes please use the "Insert/Edit Code Sample" button (the one with "&amp;lt;/&amp;gt;").&lt;/P&gt;&lt;P&gt;At least why do you use Join between in a search on the same index? remember that there's the limit of 50,000 results in subsearches, maybe it's possible to run a simpler search.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Wed, 02 Sep 2020 08:23:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Getting-error-in-rex-command-while-running-search-for-DB-health/m-p/517425#M145498</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2020-09-02T08:23:07Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk- Error in 'rex' command while running search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Getting-error-in-rex-command-while-running-search-for-DB-health/m-p/517428#M145500</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/224393"&gt;@firefox95&lt;/a&gt;&amp;nbsp;, if you are using this search for a report , please use below&amp;nbsp;&lt;/P&gt;&lt;P&gt;index="_internal" sourcetype=dbx_job_metrics input_name=* connection="*"&lt;BR /&gt;| eval event_time=strftime(_time,"%m/%d/%y %H:%M:%S")&lt;BR /&gt;| join type=left connection [search index="_internal" sourcetype=dbx_server ERROR&lt;BR /&gt;| rex field=_raw "^(?&amp;lt;error&amp;gt;.*)\n?"&lt;BR /&gt;| rex field=error "/api/connections/(?&amp;lt;connection&amp;gt;[^/]+)"]&lt;BR /&gt;| stats latest(event_time) as event_time latest(host) as HF latest(connection) as connection latest(status) as status latest(error) as error by input_name&lt;BR /&gt;| sort - status&lt;/P&gt;</description>
      <pubDate>Wed, 02 Sep 2020 08:26:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Getting-error-in-rex-command-while-running-search-for-DB-health/m-p/517428#M145500</guid>
      <dc:creator>Nisha18789</dc:creator>
      <dc:date>2020-09-02T08:26:11Z</dc:date>
    </item>
  </channel>
</rss>

