<?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: Spl in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-optimize-my-SPL/m-p/595359#M207209</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/70277"&gt;@uagraw01&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if you have the services in key value pair why are you hardcoding them in your query&amp;nbsp;&lt;/P&gt;&lt;P&gt;are you excluding some specific services ??&lt;/P&gt;&lt;P&gt;definitely regex would not be my first choice if we have the key value pair&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 26 Apr 2022 08:53:22 GMT</pubDate>
    <dc:creator>venky1544</dc:creator>
    <dc:date>2022-04-26T08:53:22Z</dc:date>
    <item>
      <title>How to optimize my SPL?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-optimize-my-SPL/m-p/593770#M206678</link>
      <description>&lt;P&gt;Hello Splunkers,&lt;/P&gt;
&lt;P&gt;I want to optimize my splunk search. I have attached the screenshot of my search. From the raw data i am retreving the services name in or condition. I don't want to hardcore all the services name by using OR clause. Please give me some suggestions, how can i optimise the search with using OR clause.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Apr 2022 16:22:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-optimize-my-SPL/m-p/593770#M206678</guid>
      <dc:creator>uagraw01</dc:creator>
      <dc:date>2022-04-14T16:22:01Z</dc:date>
    </item>
    <item>
      <title>Re: Spl</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-optimize-my-SPL/m-p/593772#M206679</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/70277"&gt;@uagraw01&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;your screenshot is not uploaded probably you missed it&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":face_savoring_food:"&gt;😋&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Apr 2022 12:21:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-optimize-my-SPL/m-p/593772#M206679</guid>
      <dc:creator>venky1544</dc:creator>
      <dc:date>2022-04-14T12:21:17Z</dc:date>
    </item>
    <item>
      <title>Re: Spl</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-optimize-my-SPL/m-p/593779#M206680</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/137142"&gt;@venky1544&lt;/a&gt;&amp;nbsp; Thanks for letting me know. I have attached the screenshot now.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Apr 2022 12:43:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-optimize-my-SPL/m-p/593779#M206680</guid>
      <dc:creator>uagraw01</dc:creator>
      <dc:date>2022-04-14T12:43:47Z</dc:date>
    </item>
    <item>
      <title>Re: Spl</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-optimize-my-SPL/m-p/593823#M206692</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/70277"&gt;@uagraw01&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How are these service placed in the raw data&lt;/P&gt;&lt;P&gt;looking at your services majority of them are ending with a space status and other ones which don't have status are starting with keyword Mulesoft probably you use a regex to a grouped name and then use that for rest of the query&lt;/P&gt;&lt;P&gt;sterling.http.orderInvoice.post status&lt;BR /&gt;sterling.http.orderHistory.get status&lt;BR /&gt;AdyencheckoutPaymentmethods status&lt;/P&gt;&lt;P&gt;rex field=_raw "&amp;nbsp;(?&amp;lt;payservices&amp;gt;[\w.]+ status)"&lt;/P&gt;&lt;P&gt;MulesoftReserveInventory&lt;BR /&gt;MulesoftOrderExport&lt;BR /&gt;MulesoftOrderInvoice&lt;/P&gt;&lt;P&gt;rex field=_raw "(?&amp;lt;services&amp;gt;Mulesoft\w+)"&lt;/P&gt;&lt;P&gt;Hope this helps&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;if this help karma points are&amp;nbsp; appreciated /accept the solution it might help others&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Apr 2022 16:26:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-optimize-my-SPL/m-p/593823#M206692</guid>
      <dc:creator>venky1544</dc:creator>
      <dc:date>2022-04-14T16:26:54Z</dc:date>
    </item>
    <item>
      <title>Re: Spl</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-optimize-my-SPL/m-p/593829#M206693</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/137142"&gt;@venky1544&lt;/a&gt;&amp;nbsp;Thanks for your answer and investing your time on my query. Just let me know by this way can we optimize the query ?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Let me suggest :&lt;/P&gt;&lt;P&gt;1. Can I use lookup and put all the services and join the index search with lookup. ( Is that optimize my search ?)&lt;/P&gt;&lt;P&gt;2. Can I use data model and fetch the data directly by using the pivot ? (Is that optimize my search ?)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Please provide your suggestion on these points as well.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Apr 2022 16:37:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-optimize-my-SPL/m-p/593829#M206693</guid>
      <dc:creator>uagraw01</dc:creator>
      <dc:date>2022-04-14T16:37:13Z</dc:date>
    </item>
    <item>
      <title>Re: Spl</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-optimize-my-SPL/m-p/593835#M206696</link>
      <description>&lt;LI-SPOILER&gt;&amp;nbsp;&lt;/LI-SPOILER&gt;&lt;P&gt;Better would be to extract those fields during indexing&amp;nbsp; or add them to props for search time extractions and then use them in search. With 2or 3 rex extractions search must be running slow..&lt;/P&gt;</description>
      <pubDate>Thu, 14 Apr 2022 16:52:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-optimize-my-SPL/m-p/593835#M206696</guid>
      <dc:creator>SinghK</dc:creator>
      <dc:date>2022-04-14T16:52:33Z</dc:date>
    </item>
    <item>
      <title>Re: Spl</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-optimize-my-SPL/m-p/593839#M206698</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/228600"&gt;@SinghK&lt;/a&gt;&amp;nbsp;Actually i have very limited access here. Search time field exaction i can't do here. I have no power broker nor admin access. Have dependencies on other teams.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Apr 2022 18:12:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-optimize-my-SPL/m-p/593839#M206698</guid>
      <dc:creator>uagraw01</dc:creator>
      <dc:date>2022-04-14T18:12:14Z</dc:date>
    </item>
    <item>
      <title>Re: Spl</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-optimize-my-SPL/m-p/594222#M206815</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/70277"&gt;@uagraw01&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;lookup is a option you can go for it but question is how are you populating it in the lookup. My guess by EOD you would be&amp;nbsp; manually populating it right or when you have to add a new service you have to manually populate the lookup and this would be again mean hardcoding them manually which is what you wanted to avoid in the first place ?? how are these services placed in the raw data is the question&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;if this help karma points are&amp;nbsp; appreciated /accept the solution it might help others&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Apr 2022 08:47:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-optimize-my-SPL/m-p/594222#M206815</guid>
      <dc:creator>venky1544</dc:creator>
      <dc:date>2022-04-19T08:47:13Z</dc:date>
    </item>
    <item>
      <title>Re: Spl</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-optimize-my-SPL/m-p/594444#M206896</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/137142"&gt;@venky1544&lt;/a&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;As per the attached screen my raw data is looking like this and i have highlighted that service name in the event screenshot&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="IMG_20220420_173038__01.jpg" style="width: 3874px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/19150i653F229A96CCCAC4/image-size/medium?v=v2&amp;amp;px=400" role="button" title="IMG_20220420_173038__01.jpg" alt="IMG_20220420_173038__01.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Apr 2022 12:04:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-optimize-my-SPL/m-p/594444#M206896</guid>
      <dc:creator>uagraw01</dc:creator>
      <dc:date>2022-04-20T12:04:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to optimize my SPL?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-optimize-my-SPL/m-p/594445#M206897</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/70277"&gt;@uagraw01&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;In your search terms for the services, replace that with "ERROR"&amp;nbsp;&lt;BR /&gt;Update your extractions for Error Code this way&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex "errorCode=(?P&amp;lt;EC1&amp;gt;[\d]+)" 
| rex "Error Code :: (?P&amp;lt;EC2&amp;gt;[\d]+)"
| eval ErrorCode=coalesce(EC1,EC2)
| where ErrorCode&amp;gt;499&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;And continue to extract service and other fields as required and check the results.&lt;BR /&gt;If the result yields services that need not be included in your result, try to add them using the NOT keyword as part of your search like&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;NOT("xyz-service" OR "abc-service")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Apr 2022 12:21:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-optimize-my-SPL/m-p/594445#M206897</guid>
      <dc:creator>Gr0und_Z3r0</dc:creator>
      <dc:date>2022-04-20T12:21:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to optimize my SPL?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-optimize-my-SPL/m-p/594446#M206898</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/240999"&gt;@Gr0und_Z3r0&lt;/a&gt;&amp;nbsp;My ask here is to optimize my existing query. Because here we are using or condition to fetch the services name from the raw data . I also want to use tstats command in my existing query but it is basically running on the metadata fields. So if you can suggest any approach from which I can optimise my search.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Apr 2022 12:25:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-optimize-my-SPL/m-p/594446#M206898</guid>
      <dc:creator>uagraw01</dc:creator>
      <dc:date>2022-04-20T12:25:14Z</dc:date>
    </item>
    <item>
      <title>Re: Spl</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-optimize-my-SPL/m-p/595359#M207209</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/70277"&gt;@uagraw01&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if you have the services in key value pair why are you hardcoding them in your query&amp;nbsp;&lt;/P&gt;&lt;P&gt;are you excluding some specific services ??&lt;/P&gt;&lt;P&gt;definitely regex would not be my first choice if we have the key value pair&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Apr 2022 08:53:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-optimize-my-SPL/m-p/595359#M207209</guid>
      <dc:creator>venky1544</dc:creator>
      <dc:date>2022-04-26T08:53:22Z</dc:date>
    </item>
  </channel>
</rss>

