<?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 Partially eliminate error message in Splunk query in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Partially-eliminate-error-message-in-Splunk-query/m-p/671865#M230216</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;below are the log details.&lt;/P&gt;&lt;P&gt;index=ABC sourcetype=logging_0&lt;/P&gt;&lt;P&gt;Below are the values of "ErrorMessages" field:&lt;/P&gt;&lt;P&gt;invalid - 5 count&lt;/P&gt;&lt;P&gt;unprocessable - 7 count (5 invalid pair + 2 others)&lt;/P&gt;&lt;P&gt;no user foundv- 3 count&lt;/P&gt;&lt;P&gt;invalid message process - 3 count&lt;/P&gt;&lt;P&gt;process failed- 3 count&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now I have to eliminate ErrorMessage=invalid and ErrorMessage=unprocessable. Then show all other&amp;nbsp; ErrorMessage.&lt;/P&gt;&lt;P&gt;But the problem here is , "unprocessable" ErrorMessage will show for other messages as well. so we cannot fully eliminate the&amp;nbsp;"unprocessable" ErrorMessage.&lt;/P&gt;&lt;P&gt;Whenever "Invalid" ErrorMessage is logging that time "unprocessable" ErrorMessage also will be logged. So we need to eliminate this pair only. Not every "unprocessable" ErrorMessage.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Expected result:&lt;/P&gt;&lt;P&gt;unprocessable - 2 count&lt;/P&gt;&lt;P&gt;no user foundv- 3 count&lt;/P&gt;&lt;P&gt;invalid message process - 3 count&lt;/P&gt;&lt;P&gt;process failed- 3 count&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried with join using requestId but its not resulting anything because i am using&lt;/P&gt;&lt;P&gt;| search ErrorMessage="Invalid" and elimated this in next query so its not searching for other ErrorMessages.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can someone please help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 14 Dec 2023 08:54:15 GMT</pubDate>
    <dc:creator>Dharani</dc:creator>
    <dc:date>2023-12-14T08:54:15Z</dc:date>
    <item>
      <title>Partially eliminate error message in Splunk query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Partially-eliminate-error-message-in-Splunk-query/m-p/671865#M230216</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;below are the log details.&lt;/P&gt;&lt;P&gt;index=ABC sourcetype=logging_0&lt;/P&gt;&lt;P&gt;Below are the values of "ErrorMessages" field:&lt;/P&gt;&lt;P&gt;invalid - 5 count&lt;/P&gt;&lt;P&gt;unprocessable - 7 count (5 invalid pair + 2 others)&lt;/P&gt;&lt;P&gt;no user foundv- 3 count&lt;/P&gt;&lt;P&gt;invalid message process - 3 count&lt;/P&gt;&lt;P&gt;process failed- 3 count&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now I have to eliminate ErrorMessage=invalid and ErrorMessage=unprocessable. Then show all other&amp;nbsp; ErrorMessage.&lt;/P&gt;&lt;P&gt;But the problem here is , "unprocessable" ErrorMessage will show for other messages as well. so we cannot fully eliminate the&amp;nbsp;"unprocessable" ErrorMessage.&lt;/P&gt;&lt;P&gt;Whenever "Invalid" ErrorMessage is logging that time "unprocessable" ErrorMessage also will be logged. So we need to eliminate this pair only. Not every "unprocessable" ErrorMessage.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Expected result:&lt;/P&gt;&lt;P&gt;unprocessable - 2 count&lt;/P&gt;&lt;P&gt;no user foundv- 3 count&lt;/P&gt;&lt;P&gt;invalid message process - 3 count&lt;/P&gt;&lt;P&gt;process failed- 3 count&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried with join using requestId but its not resulting anything because i am using&lt;/P&gt;&lt;P&gt;| search ErrorMessage="Invalid" and elimated this in next query so its not searching for other ErrorMessages.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can someone please help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Dec 2023 08:54:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Partially-eliminate-error-message-in-Splunk-query/m-p/671865#M230216</guid>
      <dc:creator>Dharani</dc:creator>
      <dc:date>2023-12-14T08:54:15Z</dc:date>
    </item>
    <item>
      <title>Re: Partially eliminate error message in Splunk query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Partially-eliminate-error-message-in-Splunk-query/m-p/671890#M230220</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/230685"&gt;@Dharani&lt;/a&gt;&amp;nbsp;- I think you explained the question well, but you need to provide sample logs to explain what do you mean by pair of error events.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Dec 2023 12:39:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Partially-eliminate-error-message-in-Splunk-query/m-p/671890#M230220</guid>
      <dc:creator>VatsalJagani</dc:creator>
      <dc:date>2023-12-14T12:39:10Z</dc:date>
    </item>
    <item>
      <title>Re: Partially eliminate error message in Splunk query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Partially-eliminate-error-message-in-Splunk-query/m-p/671993#M230243</link>
      <description>&lt;P&gt;sample logs:&lt;/P&gt;&lt;P&gt;1.&lt;SPAN&gt;IBroker call failed, sessionId=855762c0-9a6b, requestId=bc819b42-6646, request=PUT&amp;nbsp; responseStatus=422&amp;nbsp; response={"ErrorCode":0,"UserMessage":null,"DeveloperMessage":null,"DocumentationUrl":null,"LogId":null,"ValidationErrors":"Invalid product ","Parameters":null}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;2.&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;sessionId=855762c0-9a6b, requestId=bc819b42-6646, request=PUT&amp;nbsp;responseStatus=422 &amp;nbsp;ErrorMessage: unprocessable&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;3.&lt;/SPAN&gt;&lt;SPAN&gt;sessionId=855762c0-9a6b, requestId=bc819b42-6646, request=PUT&amp;nbsp; responseStatus=422&amp;nbsp;ErrorMessage: unprocessable&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;1st 2 logs should be eliminated because they share same requestId, 3 rd logs should be shown.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Dec 2023 07:40:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Partially-eliminate-error-message-in-Splunk-query/m-p/671993#M230243</guid>
      <dc:creator>Dharani</dc:creator>
      <dc:date>2023-12-15T07:40:23Z</dc:date>
    </item>
    <item>
      <title>Re: Partially eliminate error message in Splunk query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Partially-eliminate-error-message-in-Splunk-query/m-p/672001#M230244</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/230685"&gt;@Dharani&lt;/a&gt;&amp;nbsp;- Do you want to see only the last event per RequestId? (like only the latest error per request is right info?)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Dec 2023 08:25:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Partially-eliminate-error-message-in-Splunk-query/m-p/672001#M230244</guid>
      <dc:creator>VatsalJagani</dc:creator>
      <dc:date>2023-12-15T08:25:15Z</dc:date>
    </item>
    <item>
      <title>Re: Partially eliminate error message in Splunk query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Partially-eliminate-error-message-in-Splunk-query/m-p/672004#M230246</link>
      <description>&lt;P&gt;Yes , sorry for the typo.&amp;nbsp;&lt;/P&gt;&lt;P&gt;3rd logs has different requestId. I mistakenly pasted the same requestId.&lt;/P&gt;</description>
      <pubDate>Fri, 15 Dec 2023 09:55:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Partially-eliminate-error-message-in-Splunk-query/m-p/672004#M230246</guid>
      <dc:creator>Dharani</dc:creator>
      <dc:date>2023-12-15T09:55:44Z</dc:date>
    </item>
    <item>
      <title>Re: Partially eliminate error message in Splunk query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Partially-eliminate-error-message-in-Splunk-query/m-p/672011#M230248</link>
      <description>&lt;P&gt;Based on your latest update, the problem should be restated as: remove events with requestId that has a corresponding ValidationErrors value of "Invalid product". (I assume that the trailing space in sample data is a typo.) Is this correct?&lt;/P&gt;&lt;P&gt;In the format illustrated in sample data, Splunk should have given you compliant JSON in ValidationErrors. &amp;nbsp;Process this first, then literally implement the restated objective.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| spath input=response
| stats values(*) as * by sessionId request requestId responseStatus
| where NOT ValidationErrors == "Invalid product"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Your sample data will leave you with&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;sessionId&lt;/TD&gt;&lt;TD&gt;request&lt;/TD&gt;&lt;TD&gt;requestId&lt;/TD&gt;&lt;TD&gt;responseStatus&lt;/TD&gt;&lt;TD&gt;DeveloperMessage&lt;/TD&gt;&lt;TD&gt;DocumentationUrl&lt;/TD&gt;&lt;TD&gt;ErrorCode&lt;/TD&gt;&lt;TD&gt;LogId&lt;/TD&gt;&lt;TD&gt;Parameters&lt;/TD&gt;&lt;TD&gt;UserMessage&lt;/TD&gt;&lt;TD&gt;ValidationErrors&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;855762c0-9a6b&lt;/TD&gt;&lt;TD&gt;PUT&lt;/TD&gt;&lt;TD&gt;bc819b42-6655&lt;/TD&gt;&lt;TD&gt;422&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;This is the emulation used to test the method:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults
| fields - _time
| eval data = mvappend("IBroker call failed, sessionId=855762c0-9a6b, requestId=bc819b42-6646, request=PUT  responseStatus=422  response={\"ErrorCode\":0,\"UserMessage\":null,\"DeveloperMessage\":null,\"DocumentationUrl\":null,\"LogId\":null,\"ValidationErrors\":\"Invalid product\",\"Parameters\":null}",
"sessionId=855762c0-9a6b, requestId=bc819b42-6646, request=PUT responseStatus=422  ErrorMessage: unprocessable",
"sessionId=855762c0-9a6b, requestId=bc819b42-6655, request=PUT  responseStatus=422 ErrorMessage: unprocessable")
| mvexpand data
| rename data AS _raw
| extract
``` data emulation above ```&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Dec 2023 10:56:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Partially-eliminate-error-message-in-Splunk-query/m-p/672011#M230248</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2023-12-15T10:56:16Z</dc:date>
    </item>
    <item>
      <title>Re: Partially eliminate error message in Splunk query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Partially-eliminate-error-message-in-Splunk-query/m-p/672174#M230283</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/230685"&gt;@Dharani&lt;/a&gt;&amp;nbsp;- Try response by&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/33901"&gt;@yuanliu&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Dec 2023 10:38:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Partially-eliminate-error-message-in-Splunk-query/m-p/672174#M230283</guid>
      <dc:creator>VatsalJagani</dc:creator>
      <dc:date>2023-12-18T10:38:07Z</dc:date>
    </item>
  </channel>
</rss>

