<?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: How to build the query for the raw data. in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-build-the-query-for-the-raw-data/m-p/688651#M234770</link>
    <description>&lt;P&gt;Normally I would not propose to ignore built-in structured data. &amp;nbsp;But in this case, you can probably take a shortcut if you are not interested in data fields inside that JSON blob at all.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index="os" host="abcd*"  source="/opt/os/*/logs/*"  "implementation:abc-field-flow" (("TargetID":"abc" "Sender":"SenderID":"abc") OR ("status": "SUCCESS"))
| rex "CORRELATION ID :: (?&amp;lt;correlation_id&amp;gt;\S+)"
| eval success_id = if(searchmatch("COMPLETED"), correlation_id)
| eventstats values(success_id) as success_id by correlation_id
| where correlation_id = success_id&lt;/LI-CODE&gt;&lt;P&gt;Here, I observe that status SUCCESS is a subset of COMPLETED. &amp;nbsp;If that's not the case, you can also use searchmatch("\"status\": \"SUCCESS\"").&lt;/P&gt;&lt;P&gt;But if you want to utilize data fields inside JSON, it could be better to use&amp;nbsp;&lt;SPAN&gt;MessageIdentifier instead, depending on the ratio between success and failure.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 24 May 2024 21:56:37 GMT</pubDate>
    <dc:creator>yuanliu</dc:creator>
    <dc:date>2024-05-24T21:56:37Z</dc:date>
    <item>
      <title>How to build the query for the raw data.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-build-the-query-for-the-raw-data/m-p/688642#M234765</link>
      <description>&lt;P&gt;Hi Team,&lt;BR /&gt;&lt;BR /&gt;Good day!&lt;BR /&gt;&lt;BR /&gt;I need to build query in such way that need to get only success payload that are related to particular service name. where that service name is used by different application such like (EDS, CDS).&lt;BR /&gt;&lt;BR /&gt;we need to pull the data from request payload to Response payload success based on correlation ID which is present in request payload and each &lt;STRONG&gt;event&lt;/STRONG&gt; contain unique Correlation ID. and we are using below query to pull the data for request payload.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;index="os" host="abcd*"  source="/opt/os/*/logs/*"  "implementation:abc-field-flow" "TargetID":"abc" "Sender":"SenderID":"abc"
&lt;/LI-CODE&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;&lt;BR /&gt;By using above query, we are getting below raw data:&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;INFO 2024-05-23 06:05:30,275 [[OS].uber.11789: [services-workorders-procapi].implementation:abc-field-flow.CPU_LITE @7d275f1b] [event: 2-753d5970-18ca-11ef-8980-0672a96fbe16] com.wing.esb: PROCESS :: implementation:abc-field-flow :: STARTED :-: CORRELATION ID :: 2-753d5970-18ca-11ef-8980-0672a96fbe16 :-: REQUEST PAYLOAD :: {"Header":{"Target":{"TargetID":"abc"},"Sender":{"SenderID":"abc"}},"DataArea":{"workOrder":"42141","unitNumber":"145","timestamp":"05/23/2024 00:53:57","nbSearches":"0","modelSeries":"123","manufacturer":"FLY","id":"00903855","faultCode":"6766,1117,3497,3498,3867,6255,Blank","faliurePoint":"120074","faliureMeasure":"MI","eventType":"DBR","event":[{"verificationStatus":"Y","timestamp":"05/23/2024 01:32:30","solutionSeq":"1","solutionId":"S00000563","searchNumber":"0","searchCompleted":"True","repairStatus":"N","informationType":"","componentID":""},{"verificationStatus":"Y","timestamp":"05/23/2024 01:32:30","solutionSeq":"2","solutionId":"S00000443","searchNumber":"0","searchCompleted":"True","repairStatus":"N","informationType":"","componentID":""},{"verificationStatus":"Y","timestamp":"05/23/2024 02:03:25","solutionSeq":"3","solutionId":"S00000933","searchNumber":"0","searchCompleted":"True","repairStatus":"Y","informationType":"","componentID":""}],"esn":"12345678","dsStatus":"Open","dsID":"00903855","dsClosureType":null,"customerName":"Tar Wars","createDate":"05/23/2024 00:53:49","application":"130","accessSRTID":""}}
&lt;/LI-CODE&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;&lt;BR /&gt;And we are using below query for response payload:&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;index="OS" host="abcd*" source="/opt/os/*/logs/*" "implementation:abc-field-flow" "status": "SUCCESS"
&lt;/LI-CODE&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;&lt;BR /&gt;By using above query, we are getting below raw data:&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;5/23/24
11:35:33.618 AM
INFO 2024-05-23 06:05:33,618 [[OS].uber.11800: [services-workorders-procapi].implementation:abc-field-flow.CPU_INTENSIVE @4366240b] [event: 2-753d5970-18ca-11ef-8980-0672a96fbe16] com.wing.esb: PROCESS :: implementation::mainFlow :: COMPLETED :-: CORRELATION ID :: 2-753d5970-18ca-11ef-8980-0672a96fbe16 :-: RESPONSE PAYLOAD :: {
"MessageIdentifier": "2-753d5970-18ca-11ef-8980-0672a96fbe16",
"ReturnCode": 0,
"ReturnCodeDescription": "",
"status": "SUCCESS",
"Message": "Message Received"
}
&lt;/LI-CODE&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;The above two quires raw data in the request payload correlation id should match to the response payload correlation id. So based on that I want to search query to pull only data from request payload to response payload based on the &lt;STRONG&gt;Correlation ID&lt;/STRONG&gt;.&lt;BR /&gt;&lt;BR /&gt;How to build the query by using two search quires I want only response payload data from two quires.&lt;BR /&gt;&lt;BR /&gt;Thanks in advance for your help!&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Vamshi Krishna M.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 24 May 2024 23:01:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-build-the-query-for-the-raw-data/m-p/688642#M234765</guid>
      <dc:creator>Vamshi1904</dc:creator>
      <dc:date>2024-05-24T23:01:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to build the query for the raw data.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-build-the-query-for-the-raw-data/m-p/688651#M234770</link>
      <description>&lt;P&gt;Normally I would not propose to ignore built-in structured data. &amp;nbsp;But in this case, you can probably take a shortcut if you are not interested in data fields inside that JSON blob at all.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index="os" host="abcd*"  source="/opt/os/*/logs/*"  "implementation:abc-field-flow" (("TargetID":"abc" "Sender":"SenderID":"abc") OR ("status": "SUCCESS"))
| rex "CORRELATION ID :: (?&amp;lt;correlation_id&amp;gt;\S+)"
| eval success_id = if(searchmatch("COMPLETED"), correlation_id)
| eventstats values(success_id) as success_id by correlation_id
| where correlation_id = success_id&lt;/LI-CODE&gt;&lt;P&gt;Here, I observe that status SUCCESS is a subset of COMPLETED. &amp;nbsp;If that's not the case, you can also use searchmatch("\"status\": \"SUCCESS\"").&lt;/P&gt;&lt;P&gt;But if you want to utilize data fields inside JSON, it could be better to use&amp;nbsp;&lt;SPAN&gt;MessageIdentifier instead, depending on the ratio between success and failure.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 24 May 2024 21:56:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-build-the-query-for-the-raw-data/m-p/688651#M234770</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2024-05-24T21:56:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to build the query for the raw data.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-build-the-query-for-the-raw-data/m-p/689398#M234926</link>
      <description>&lt;P&gt;Hi&amp;nbsp; yuanliu ,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Thank you for your reply..&lt;BR /&gt;&lt;BR /&gt;I have tried the search index shared by you, but it doesn't work.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Here we have two different search indexes:&lt;BR /&gt;&lt;BR /&gt;1) request payload:&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;index="os" host="abcd*"  source="/opt/os/*/logs/*"  "implementation:abc-field-flow" "TargetID":"abc" "Sender":"SenderID":"abc"&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;2) success payload :&lt;/P&gt;&lt;PRE&gt;index="OS" host="abcd*" source="/opt/os/*/logs/*" "implementation:abc-field-flow" "status": "SUCCESS"&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to query the search index (only for the success payload) in such way that correlation id present in the success payload need to match with Correlation id present in the Request payload.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Could you please help me out.&lt;BR /&gt;&lt;BR /&gt;NOTE: Different payload has different Correlation ID.&lt;/P&gt;</description>
      <pubDate>Mon, 03 Jun 2024 11:02:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-build-the-query-for-the-raw-data/m-p/689398#M234926</guid>
      <dc:creator>Vamshi1904</dc:creator>
      <dc:date>2024-06-03T11:02:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to build the query for the raw data.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-build-the-query-for-the-raw-data/m-p/689402#M234928</link>
      <description>&lt;P&gt;Try it like this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index="os" host="abcd*"  source="/opt/os/*/logs/*"  "implementation:abc-field-flow" (("TargetID":"abc" "Sender":"SenderID":"abc") OR ("status": "SUCCESS"))
| rex "CORRELATION ID :: (?&amp;lt;correlation_id&amp;gt;\S+)"
| eval success_id = if(searchmatch("COMPLETED"), correlation_id,null())
| eventstats values(success_id) as success_id by correlation_id
| where correlation_id = success_id&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 03 Jun 2024 11:46:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-build-the-query-for-the-raw-data/m-p/689402#M234928</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2024-06-03T11:46:40Z</dc:date>
    </item>
  </channel>
</rss>

