<?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 How to refine this query in Splunk Dev</title>
    <link>https://community.splunk.com/t5/Splunk-Dev/How-to-refine-this-query/m-p/686893#M11465</link>
    <description>&lt;P&gt;How should I refine this query so that I can get every fields in one table without using join or append or any other sub search.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;(index=whcrm OR index=whcrm_int)sourcetype="bmw-sl-gcdm-int-api" ("Sending POST consents to *" OR "Create / Update Consents done" OR "Error in sync-consent-dataFlow:*")

| stats count(eval(match(_raw, "Sending POST consents to *"))) as Total,

        count(eval(match(_raw, "Create / Update Consents done"))) as Success,

        count(eval(match(_raw, "Error in sync-consent-dataFlow:*"))) as Error

| eval ErrorRate = round((Error / TotalReceived) * 100, 2)

| table Total, Success, Error, ErrorRate

| append

    [ search (index=whcrm OR index=whcrm_int) (sourcetype="bmw-sl-gcdm-int-api" ("Sending POST consents to *" OR "Create / Update Consents done" OR "Error in sync-consent-dataFlow:*"))

     | rex field=message ": (?&amp;lt;json&amp;gt;\{[\w\W]*\})$"

    | rename properties.correlationId as correlationId

| rename properties.gcid as GCID

| rename properties.gcid as errorcode

    | rename properties.entity as entity

    | rename properties.country as country

    | rename properties.targetSystem as target_system

    | table correlationId GCID errorcode entity country target_system

    ]&lt;/LI-CODE&gt;</description>
    <pubDate>Wed, 08 May 2024 16:48:19 GMT</pubDate>
    <dc:creator>avii7326</dc:creator>
    <dc:date>2024-05-08T16:48:19Z</dc:date>
    <item>
      <title>How to refine this query</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-to-refine-this-query/m-p/686893#M11465</link>
      <description>&lt;P&gt;How should I refine this query so that I can get every fields in one table without using join or append or any other sub search.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;(index=whcrm OR index=whcrm_int)sourcetype="bmw-sl-gcdm-int-api" ("Sending POST consents to *" OR "Create / Update Consents done" OR "Error in sync-consent-dataFlow:*")

| stats count(eval(match(_raw, "Sending POST consents to *"))) as Total,

        count(eval(match(_raw, "Create / Update Consents done"))) as Success,

        count(eval(match(_raw, "Error in sync-consent-dataFlow:*"))) as Error

| eval ErrorRate = round((Error / TotalReceived) * 100, 2)

| table Total, Success, Error, ErrorRate

| append

    [ search (index=whcrm OR index=whcrm_int) (sourcetype="bmw-sl-gcdm-int-api" ("Sending POST consents to *" OR "Create / Update Consents done" OR "Error in sync-consent-dataFlow:*"))

     | rex field=message ": (?&amp;lt;json&amp;gt;\{[\w\W]*\})$"

    | rename properties.correlationId as correlationId

| rename properties.gcid as GCID

| rename properties.gcid as errorcode

    | rename properties.entity as entity

    | rename properties.country as country

    | rename properties.targetSystem as target_system

    | table correlationId GCID errorcode entity country target_system

    ]&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 08 May 2024 16:48:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-to-refine-this-query/m-p/686893#M11465</guid>
      <dc:creator>avii7326</dc:creator>
      <dc:date>2024-05-08T16:48:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to refine this query</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-to-refine-this-query/m-p/686902#M11466</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/266683"&gt;@avii7326&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;sorry but I don't understand the purpose of this search:&lt;/P&gt;&lt;P&gt;you have the same search in the first part, with results aggregated using statsm so in one row you have three values Total Success and Error.&lt;/P&gt;&lt;P&gt;Then in the append search, using the same search, you have many events listed with the table command.&lt;/P&gt;&lt;P&gt;And there isn't any correlation between the two parts of the search.&lt;/P&gt;&lt;P&gt;What's the output that you would have?&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Wed, 08 May 2024 16:09:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-to-refine-this-query/m-p/686902#M11466</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2024-05-08T16:09:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to refine this query</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-to-refine-this-query/m-p/687172#M11473</link>
      <description>&lt;P&gt;Using these two searches because I want to extract some fields using that regular expression for that only I am appending it. I want help in this only so that I don't repeat this search two times and have one query in table with fields - total ,success, error, correlationid, GCID etc.&lt;BR /&gt;&lt;BR /&gt;Or If I am using wrong query you can suggest me how to proceed -&lt;BR /&gt;I have that logs and have to count those logs for total ,success and error and these fields will be used if there will be any error to show the details of that error this GCID correlationId will be required. Please guide how can I proceed.&lt;BR /&gt;&lt;BR /&gt;Thanks in Advance&lt;/P&gt;</description>
      <pubDate>Fri, 10 May 2024 14:33:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-to-refine-this-query/m-p/687172#M11473</guid>
      <dc:creator>avi7326</dc:creator>
      <dc:date>2024-05-10T14:33:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to refine this query</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-to-refine-this-query/m-p/687328#M11477</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Can you please help me on this as I have explained my requirement, as it is bit urgent for me.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 13 May 2024 13:13:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-to-refine-this-query/m-p/687328#M11477</guid>
      <dc:creator>avi7326</dc:creator>
      <dc:date>2024-05-13T13:13:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to refine this query</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-to-refine-this-query/m-p/687336#M11478</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/246450"&gt;@avi7326&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Please try below query;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;(index=whcrm OR index=whcrm_int) sourcetype="bmw-sl-gcdm-int-api" ("Sending POST consents to *" OR "Create / Update Consents done" OR "Error in sync-consent-dataFlow:*") 
| eval Total= if(match(_raw, "Sending POST consents to *"),1,0) 
| eval Success= if(match(_raw, "Create / Update Consents done"),1,0) 
| eval Error= if(match(_raw, "Error in sync-consent-dataFlow:*"),1,0) 
| rex field=message ": (?&amp;lt;json&amp;gt;\{[\w\W]*\})$" 
| rename properties.correlationId as correlationId 
| rename properties.gcid as GCID 
| rename properties.gcid as errorcode 
| rename properties.entity as entity 
| rename properties.country as country 
| rename properties.targetSystem as target_system 
| stats sum(Total) as Total sum(Success) as Success sum(Error) as Error by correlationId GCID errorcode entity country target_system 
| eval ErrorRate = round((Error / Total) * 100, 2)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 13 May 2024 13:45:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-to-refine-this-query/m-p/687336#M11478</guid>
      <dc:creator>scelikok</dc:creator>
      <dc:date>2024-05-13T13:45:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to refine this query</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-to-refine-this-query/m-p/687342#M11479</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/246450"&gt;@avi7326&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;as I said, there's no sense to put in the same panel a result from a stats search and a table .&lt;/P&gt;&lt;P&gt;use your searches in two different panels.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Mon, 13 May 2024 14:30:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-to-refine-this-query/m-p/687342#M11479</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2024-05-13T14:30:12Z</dc:date>
    </item>
  </channel>
</rss>

