<?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: get the output of particular text from the log message in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-output-of-particular-text-from-the-log-message/m-p/587978#M204777</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/242136"&gt;@Bala&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;when you say "filter" are you meaning at search time or before indexing?&lt;/P&gt;&lt;P&gt;if at search time, you can insert the condition in the main search:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=your_index ("ABCDEFG :::{\"status\":400" OR "ABCDEFG :::{\"status\":500")
| ...&lt;/LI-CODE&gt;&lt;P&gt;if before indexing, you have to follow the documentation at&amp;nbsp;&lt;A href="https://docs.splunk.com/Documentation/Splunk/8.2.5/Forwarding/Routeandfilterdatad#Filter_event_data_and_send_to_queues" target="_blank"&gt;https://docs.splunk.com/Documentation/Splunk/8.2.5/Forwarding/Routeandfilterdatad#Filter_event_data_and_send_to_queues&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
    <pubDate>Tue, 08 Mar 2022 09:12:03 GMT</pubDate>
    <dc:creator>gcusello</dc:creator>
    <dc:date>2022-03-08T09:12:03Z</dc:date>
    <item>
      <title>How to get the output of particular text from the log message?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-output-of-particular-text-from-the-log-message/m-p/587977#M204776</link>
      <description>&lt;P&gt;Hi Team i have a log message and i want to filter the all log messages which contains the below &lt;STRONG&gt;highlighted&lt;/STRONG&gt; text. and if the status value is other than 200 status!=200 separate that messages&lt;/P&gt;
&lt;P&gt;{"timestamp":"2022-03-04T11:04:41.143Z","message":"&lt;STRONG&gt;ABCDEFG :::{\"status\":200&lt;/STRONG&gt;,\"headers\":&lt;/P&gt;
&lt;P&gt;{"timestamp":"2022-03-05T11:02:41.143Z","message":"&lt;STRONG&gt;ABCDEFG :::{\"status\":400&lt;/STRONG&gt;,\"headers\":&lt;/P&gt;
&lt;P&gt;{"timestamp":"2022-03-02T11:05:41.143Z","message":"&lt;STRONG&gt;ABCDEFG :::{\"status\":500&lt;/STRONG&gt;,\"headers\":&lt;/P&gt;</description>
      <pubDate>Tue, 08 Mar 2022 17:52:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-output-of-particular-text-from-the-log-message/m-p/587977#M204776</guid>
      <dc:creator>Bala</dc:creator>
      <dc:date>2022-03-08T17:52:11Z</dc:date>
    </item>
    <item>
      <title>Re: get the output of particular text from the log message</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-output-of-particular-text-from-the-log-message/m-p/587978#M204777</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/242136"&gt;@Bala&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;when you say "filter" are you meaning at search time or before indexing?&lt;/P&gt;&lt;P&gt;if at search time, you can insert the condition in the main search:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=your_index ("ABCDEFG :::{\"status\":400" OR "ABCDEFG :::{\"status\":500")
| ...&lt;/LI-CODE&gt;&lt;P&gt;if before indexing, you have to follow the documentation at&amp;nbsp;&lt;A href="https://docs.splunk.com/Documentation/Splunk/8.2.5/Forwarding/Routeandfilterdatad#Filter_event_data_and_send_to_queues" target="_blank"&gt;https://docs.splunk.com/Documentation/Splunk/8.2.5/Forwarding/Routeandfilterdatad#Filter_event_data_and_send_to_queues&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Tue, 08 Mar 2022 09:12:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-output-of-particular-text-from-the-log-message/m-p/587978#M204777</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-03-08T09:12:03Z</dc:date>
    </item>
    <item>
      <title>Re: get the output of particular text from the log message</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-output-of-particular-text-from-the-log-message/m-p/588246#M204860</link>
      <description>&lt;P&gt;its not working&lt;/P&gt;&lt;P&gt;Log&amp;nbsp; &amp;nbsp;"message":"ABCDEFG :::{\"status\":200,\"headers\":&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;| rex field=message "ABCDEFG&lt;/SPAN&gt;\s...{."status.":"(?&amp;lt;status&amp;gt;\d+) | table status&lt;/P&gt;&lt;P&gt;am able to see the correct events but not able to see the values 200 in table&amp;nbsp;&lt;/P&gt;&lt;P&gt;correct me if am missing anything&lt;/P&gt;</description>
      <pubDate>Wed, 09 Mar 2022 14:56:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-output-of-particular-text-from-the-log-message/m-p/588246#M204860</guid>
      <dc:creator>Bala</dc:creator>
      <dc:date>2022-03-09T14:56:07Z</dc:date>
    </item>
    <item>
      <title>Re: get the output of particular text from the log message</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-output-of-particular-text-from-the-log-message/m-p/588266#M204870</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/242136"&gt;@Bala&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;let me understand, is your problem extracting the status field from your logs or what else?&lt;/P&gt;&lt;P&gt;if you want to extractthe status field, you can use a regex, but before a question: are you sure that in your logs there is a backslash "\" before quotes?&lt;/P&gt;&lt;P&gt;if yes, you can use the following regex:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex field=message "status\\\":(?&amp;lt;status&amp;gt;\d+)"&lt;/LI-CODE&gt;&lt;P&gt;that you can test at&amp;nbsp;&lt;A href="https://regex101.com/r/cDYieK/1" target="_blank"&gt;https://regex101.com/r/cDYieK/1&lt;/A&gt;&lt;/P&gt;&lt;P&gt;if not, you can use the following regex:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex field=message "status\":(?&amp;lt;status&amp;gt;\d+)"&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Mar 2022 16:15:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-output-of-particular-text-from-the-log-message/m-p/588266#M204870</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-03-09T16:15:34Z</dc:date>
    </item>
  </channel>
</rss>

