<?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: Customised search in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Customised-search/m-p/677434#M231652</link>
    <description>&lt;P&gt;Exactly what have you tried?&lt;/P&gt;</description>
    <pubDate>Tue, 13 Feb 2024 16:26:58 GMT</pubDate>
    <dc:creator>ITWhisperer</dc:creator>
    <dc:date>2024-02-13T16:26:58Z</dc:date>
    <item>
      <title>Customised search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Customised-search/m-p/677358#M231616</link>
      <description>&lt;P&gt;Query:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=abc mal_code=xyz TERM(application) OR (TERM(status) TERM(success)) NOT (TERM(unauthorized) TERM(time) TERM(mostly)) site=SOC
|stats count by Srock
|stats sum(count) as Success
|appendcols
[search index=abc mal_code=xyz (TERM(unauthorized) TERM(time) TERM(mostly)) NOT (TERM(status) TERM(success)) site=SOC
|stats count by ID
|fields ID
|eval matchfield=ID
|join matchfield [search index=abc mal_code=xyz site=SOC "application"
|stats count by Srock
|fields Srock
|eval matchfield=Srock]
|stats count(matchfiled) as Failed]
|eval Total=Success+Failed
|eval SuccessRate=round(Success/Total*100,2)
|table *&lt;/LI-CODE&gt;&lt;P&gt;From the above query i am getting data only for one site. but I want data for both sites SOC and BDC.&lt;BR /&gt;I tried giving&amp;nbsp; as site=* its not working&lt;BR /&gt;&lt;BR /&gt;Any help would be appreciated.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Feb 2024 01:44:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Customised-search/m-p/677358#M231616</guid>
      <dc:creator>Santosh2</dc:creator>
      <dc:date>2024-02-13T01:44:30Z</dc:date>
    </item>
    <item>
      <title>Re: Customised search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Customised-search/m-p/677381#M231620</link>
      <description>&lt;P&gt;Your first search filters on SOC, your second search (first in appendcols) filters on SOC, your third search (first in join) filters on SOC - where would BDC come from?&lt;/P&gt;&lt;P&gt;Either remove the filter to get all sites or use (site=SOC OR site=BDC) as your filters&lt;/P&gt;</description>
      <pubDate>Tue, 13 Feb 2024 09:43:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Customised-search/m-p/677381#M231620</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2024-02-13T09:43:53Z</dc:date>
    </item>
    <item>
      <title>Re: Customised search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Customised-search/m-p/677393#M231625</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;, I tried giving as site=* it’s not working l am getting total value but I need values by site.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Feb 2024 13:35:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Customised-search/m-p/677393#M231625</guid>
      <dc:creator>Santosh2</dc:creator>
      <dc:date>2024-02-13T13:35:46Z</dc:date>
    </item>
    <item>
      <title>Re: Customised search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Customised-search/m-p/677400#M231632</link>
      <description>&lt;P&gt;Try adding site to your by clauses on your stats commands&lt;/P&gt;</description>
      <pubDate>Tue, 13 Feb 2024 14:00:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Customised-search/m-p/677400#M231632</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2024-02-13T14:00:15Z</dc:date>
    </item>
    <item>
      <title>Re: Customised search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Customised-search/m-p/677425#M231644</link>
      <description>&lt;P&gt;I tried in many ways but I am not getting expected output&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Feb 2024 15:20:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Customised-search/m-p/677425#M231644</guid>
      <dc:creator>Santosh2</dc:creator>
      <dc:date>2024-02-13T15:20:37Z</dc:date>
    </item>
    <item>
      <title>Re: Customised search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Customised-search/m-p/677434#M231652</link>
      <description>&lt;P&gt;Exactly what have you tried?&lt;/P&gt;</description>
      <pubDate>Tue, 13 Feb 2024 16:26:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Customised-search/m-p/677434#M231652</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2024-02-13T16:26:58Z</dc:date>
    </item>
    <item>
      <title>Re: Customised search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Customised-search/m-p/677486#M231667</link>
      <description>&lt;P&gt;Tried below query, but not getting values by site&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=abc mal_code=xyz TERM(application) OR (TERM(status) TERM(success)) NOT (TERM(unauthorized) TERM(time) TERM(mostly)) site=*
|stats count by Srock site
|stats sum(count) as Success
|appendcols
[search index=abc mal_code=xyz (TERM(unauthorized) TERM(time) TERM(mostly)) NOT (TERM(status) TERM(success)) site=*
|stats count by ID site
|fields ID site
|eval matchfield=ID
|join matchfield [search index=abc mal_code=xyz site=* "application"
|stats count by Srock site
|fields Srock site
|eval matchfield=Srock]
|stats count(matchfiled) as Failed]
|eval Total=Success+Failed
|eval SuccessRate=round(Success/Total*100,2)
|table *&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 13 Feb 2024 21:37:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Customised-search/m-p/677486#M231667</guid>
      <dc:creator>Santosh2</dc:creator>
      <dc:date>2024-02-13T21:37:52Z</dc:date>
    </item>
    <item>
      <title>Re: Customised search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Customised-search/m-p/677537#M231677</link>
      <description>&lt;P&gt;Missing site from this line&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;|stats sum(count) as Success site&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Feb 2024 08:41:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Customised-search/m-p/677537#M231677</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2024-02-14T08:41:35Z</dc:date>
    </item>
    <item>
      <title>Re: Customised search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Customised-search/m-p/677923#M231828</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;, i tried adding the missing line, but i am not getting the results by site.&lt;BR /&gt;&lt;BR /&gt;I think we need to do some changes in the query but i am not getting it.&amp;nbsp;&lt;BR /&gt;Can anyone help on this.&lt;/P&gt;</description>
      <pubDate>Sat, 17 Feb 2024 18:17:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Customised-search/m-p/677923#M231828</guid>
      <dc:creator>Santosh2</dc:creator>
      <dc:date>2024-02-17T18:17:28Z</dc:date>
    </item>
    <item>
      <title>Re: Customised search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Customised-search/m-p/677926#M231831</link>
      <description>&lt;P&gt;Sorry - typo on my part - you need it like this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;|stats sum(count) as Success by site&lt;/LI-CODE&gt;&lt;P&gt;You also need site on some of the other stats commands too&lt;/P&gt;</description>
      <pubDate>Sat, 17 Feb 2024 19:50:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Customised-search/m-p/677926#M231831</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2024-02-17T19:50:46Z</dc:date>
    </item>
    <item>
      <title>Re: Customised search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Customised-search/m-p/677927#M231832</link>
      <description>&lt;P&gt;The whole search is... strange to say the least.&lt;/P&gt;&lt;P&gt;You generate a single value (and do that in a strange way - by aggregating by a field and the&amp;nbsp; ignoring the split by that field and summing up everything). Then you use appendcols to add another value which is obtained by joining two data sets from the same index.&lt;/P&gt;&lt;P&gt;Very strange and possibly inefficient way.&lt;/P&gt;&lt;P&gt;Even if you split your data by site, there is no guarantee that both result sets joined by appendcols will have the same order of results (and appendcols doesn't care about any field matching or something like that so it's up to you to make sure both result sets are compatible).&lt;/P&gt;&lt;P&gt;Anyway, I suspect there might be a more elegant (and possibly more efficient) way to do the same.&lt;/P&gt;&lt;P&gt;Also remember that your search might be subject to subsearch limitations.&lt;/P&gt;</description>
      <pubDate>Sat, 17 Feb 2024 21:48:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Customised-search/m-p/677927#M231832</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2024-02-17T21:48:46Z</dc:date>
    </item>
  </channel>
</rss>

