<?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 regarding Search in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/regarding-Search/m-p/211213#M175994</link>
    <description>&lt;P&gt;HI,&lt;BR /&gt;
we have log which has some key value pairs and one of the key is instance which has values like 0,1,2&lt;BR /&gt;
when ever there is an issue,application logs displays instance 0 crashed,instance 0 STARTED instance 1 STOPPED&lt;/P&gt;

&lt;P&gt;i am trying to display in scatter chart in x-axis time and in Y-Axis status like UPDATE,CRASHED,STARTED or STOPPED&lt;/P&gt;

&lt;P&gt;here is the search i am trying with table but how can we show them in scatter&lt;/P&gt;

&lt;P&gt;when i try to display in table with below search,for last column newmsg always displays UPDATE for all&lt;/P&gt;

&lt;P&gt;index=myindex messtype=* ori=* orgname=* env=PROD (appname=demo-prod OR appname=demo-prod OR appname=demo-PROD2) | eval newmsg="UPDATE" | rex field=msg"(?CRASHED|STARTED|STOPPED)" | table appname, time, source_instance, newmsg | sort appname, time, source_instance, newmsg&lt;/P&gt;

&lt;P&gt;here is the sample log&lt;/P&gt;

&lt;P&gt;&amp;lt;6&amp;gt;2017-01-01T05:59:42Z 2ejoqs8tf0q doppler[20]: {"appid":"beaffaf8-28d8-4d2b-959b-c71a7547283f","appname":"demo-prod",&lt;BR /&gt;
"ignoredapp":false,"orgid":"55c398bc-86d0-4443-ad97-1711fe264638","orgname":"LATAM-MX-DIGITAL","cf_origin":"firehose",&lt;BR /&gt;
"space_id":"51e0484a-d642-4f37-b979-d40336913f8f","env":"CC-PORTAL-UAT3","deployment":"cf","event_type":"LogMessage",&lt;BR /&gt;
"ip":"168.72.205.40","job":"cloud_controller-partition-a2833c853cfafee70104","job_index":"2","level":"info","messtype":"OUT",&lt;BR /&gt;
"msg":"App instance exited with guid beaffaf8-28d8-4d2b-959b-c71a7547283f payload: {\"instance\"=\u003e\"d0bfa02d-43d8-439c-7d4b-d29cb9e13835\", &lt;BR /&gt;
\"index\"=\u003e0, \"reason\"=\u003e\"CRASHED\", \"exit_description\"=\u003e\"2 error(s) occurred:\n\n* 2 error(s) occurred:\n\n* Codependent &lt;BR /&gt;
step exited\n* cancelled\n* cancelled\", \"crash_count\"=\u003e134, \"crash_timestamp\"=\u003e1483250382557858527, &lt;BR /&gt;
\"version\"=\u003e\"7e7e8a62-a249-4608-a69b-d55daf3947c6\"}","origin":"cloud_controller","source_instance":"2","source_type":"API",&lt;BR /&gt;
"time":"2017-01-01T05:59:42Z","timestamp":1483250382577570779}&lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 12:14:28 GMT</pubDate>
    <dc:creator>rajgowd1</dc:creator>
    <dc:date>2020-09-29T12:14:28Z</dc:date>
    <item>
      <title>regarding Search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/regarding-Search/m-p/211213#M175994</link>
      <description>&lt;P&gt;HI,&lt;BR /&gt;
we have log which has some key value pairs and one of the key is instance which has values like 0,1,2&lt;BR /&gt;
when ever there is an issue,application logs displays instance 0 crashed,instance 0 STARTED instance 1 STOPPED&lt;/P&gt;

&lt;P&gt;i am trying to display in scatter chart in x-axis time and in Y-Axis status like UPDATE,CRASHED,STARTED or STOPPED&lt;/P&gt;

&lt;P&gt;here is the search i am trying with table but how can we show them in scatter&lt;/P&gt;

&lt;P&gt;when i try to display in table with below search,for last column newmsg always displays UPDATE for all&lt;/P&gt;

&lt;P&gt;index=myindex messtype=* ori=* orgname=* env=PROD (appname=demo-prod OR appname=demo-prod OR appname=demo-PROD2) | eval newmsg="UPDATE" | rex field=msg"(?CRASHED|STARTED|STOPPED)" | table appname, time, source_instance, newmsg | sort appname, time, source_instance, newmsg&lt;/P&gt;

&lt;P&gt;here is the sample log&lt;/P&gt;

&lt;P&gt;&amp;lt;6&amp;gt;2017-01-01T05:59:42Z 2ejoqs8tf0q doppler[20]: {"appid":"beaffaf8-28d8-4d2b-959b-c71a7547283f","appname":"demo-prod",&lt;BR /&gt;
"ignoredapp":false,"orgid":"55c398bc-86d0-4443-ad97-1711fe264638","orgname":"LATAM-MX-DIGITAL","cf_origin":"firehose",&lt;BR /&gt;
"space_id":"51e0484a-d642-4f37-b979-d40336913f8f","env":"CC-PORTAL-UAT3","deployment":"cf","event_type":"LogMessage",&lt;BR /&gt;
"ip":"168.72.205.40","job":"cloud_controller-partition-a2833c853cfafee70104","job_index":"2","level":"info","messtype":"OUT",&lt;BR /&gt;
"msg":"App instance exited with guid beaffaf8-28d8-4d2b-959b-c71a7547283f payload: {\"instance\"=\u003e\"d0bfa02d-43d8-439c-7d4b-d29cb9e13835\", &lt;BR /&gt;
\"index\"=\u003e0, \"reason\"=\u003e\"CRASHED\", \"exit_description\"=\u003e\"2 error(s) occurred:\n\n* 2 error(s) occurred:\n\n* Codependent &lt;BR /&gt;
step exited\n* cancelled\n* cancelled\", \"crash_count\"=\u003e134, \"crash_timestamp\"=\u003e1483250382557858527, &lt;BR /&gt;
\"version\"=\u003e\"7e7e8a62-a249-4608-a69b-d55daf3947c6\"}","origin":"cloud_controller","source_instance":"2","source_type":"API",&lt;BR /&gt;
"time":"2017-01-01T05:59:42Z","timestamp":1483250382577570779}&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 12:14:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/regarding-Search/m-p/211213#M175994</guid>
      <dc:creator>rajgowd1</dc:creator>
      <dc:date>2020-09-29T12:14:28Z</dc:date>
    </item>
    <item>
      <title>Re: regarding Search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/regarding-Search/m-p/211214#M175995</link>
      <description>&lt;P&gt;You would need to reconsider your regular expression for field extraction. Assuming msg field contains the reason information that you want to extract:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;Your Base Search&amp;gt;
| rex field=msg "reason\\\"\=\\(?&amp;lt;reasonCode&amp;gt;\w+)\\\"(?&amp;lt;newmsg&amp;gt;\w+)\\\"\," 
| table appname, time, source_instance, msg, newmsg 
| sort appname, time, source_instance, newmsg
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If msg field does not have the reason as expected, you can replace msg with _raw i.e. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rex field=_raw "reason\\\"\=\\(?&amp;lt;reasonCode&amp;gt;\w+)\\\"(?&amp;lt;newmsg&amp;gt;\w+)\\\"\," 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;PS: Ideal you should move this to Field Extraction using Extract New Fields in Splunk Search or through Props.conf, once you have established that the regular expression is working as expected. For quick hints/testing regular expressions you can try regex101.&lt;/P&gt;</description>
      <pubDate>Mon, 02 Jan 2017 07:49:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/regarding-Search/m-p/211214#M175995</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-01-02T07:49:53Z</dc:date>
    </item>
    <item>
      <title>Re: regarding Search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/regarding-Search/m-p/211215#M175996</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;
it throwing error when i replace the regular expression&lt;/P&gt;

&lt;P&gt;| rex field=_raw "reason\\"=\(?\w+)\\"(?\w+)\\"\," &lt;/P&gt;

&lt;P&gt;Error in 'rex' command: Encountered the following error while compiling the regex 'reason\"=(?\w+)\"(?\w+)\"\,': Regex: unmatched parentheses&lt;/P&gt;

&lt;P&gt;and i would like to show them in scatter graph,which i explained in my question.&lt;/P&gt;</description>
      <pubDate>Mon, 02 Jan 2017 17:00:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/regarding-Search/m-p/211215#M175996</guid>
      <dc:creator>rajgowd1</dc:creator>
      <dc:date>2017-01-02T17:00:34Z</dc:date>
    </item>
    <item>
      <title>Re: regarding Search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/regarding-Search/m-p/211216#M175997</link>
      <description>&lt;P&gt;i tried this search and got result with different states&lt;/P&gt;

&lt;P&gt;eval newmsg="UPDATE" | rex field=_raw "(?CRASHED|STARTED|STOPPED)"&lt;/P&gt;

&lt;P&gt;how can we show this scatter chart or in D3&lt;/P&gt;

&lt;P&gt;x-axis as time  and &lt;BR /&gt;
y-axis as CRASHED,STARTED,STOPPED or UPDATE&lt;/P&gt;</description>
      <pubDate>Mon, 02 Jan 2017 19:09:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/regarding-Search/m-p/211216#M175997</guid>
      <dc:creator>rajgowd1</dc:creator>
      <dc:date>2017-01-02T19:09:57Z</dc:date>
    </item>
    <item>
      <title>Re: regarding Search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/regarding-Search/m-p/211217#M175998</link>
      <description>&lt;P&gt;&lt;IMG src="https://docs.pivotal.io/pcf-metrics/1-2/images/events.png" alt="alt text" /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Jan 2017 20:50:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/regarding-Search/m-p/211217#M175998</guid>
      <dc:creator>rajgowd1</dc:creator>
      <dc:date>2017-01-02T20:50:47Z</dc:date>
    </item>
  </channel>
</rss>

