<?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 Add Secondary search variable in primary search in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Add-Secondary-search-variable-in-primary-search/m-p/691537#M235462</link>
    <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="rahulmittal2391_0-1719311265868.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/31449iB7C6EC4810F054B7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="rahulmittal2391_0-1719311265868.png" alt="rahulmittal2391_0-1719311265868.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;index="ss-stg-dkp" cluster_name="*" AND namespace=dcx AND (label_app="composite-*" ) sourcetype="kube:container:main" | rex \"status\":"(?&amp;lt;Http_code&amp;gt;\d+)" | rex \"evtType\":"\"(?&amp;lt;evt_type&amp;gt;\w+)"\" |search evt_type=REQUEST| stats count(eval(Http_code&amp;gt;0)) as "Totalhits" count(eval(Http_code &amp;lt;500)) as "sR"| append [ search index="ss-stg-dkp" cluster_name="*" AND namespace=dcx AND (label_app="composite-*" ) sourcetype="kube:container:main"| rex field=_raw "Status code:"\s(?&amp;lt;code&amp;gt;\d+) |stats count(eval(code =500)) as error]&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hi All I want to add error count in to Totalhits&lt;/P&gt;
&lt;P&gt;like eval TotalRequest = error+TotalHits&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="rahulmittal2391_1-1719311491042.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/31450i18F61CA37066A0CC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="rahulmittal2391_1-1719311491042.png" alt="rahulmittal2391_1-1719311491042.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;It is showing as null value. Please help me to achieve this&lt;/P&gt;</description>
    <pubDate>Tue, 25 Jun 2024 12:03:51 GMT</pubDate>
    <dc:creator>rahulmittal2391</dc:creator>
    <dc:date>2024-06-25T12:03:51Z</dc:date>
    <item>
      <title>Add Secondary search variable in primary search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Add-Secondary-search-variable-in-primary-search/m-p/691537#M235462</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="rahulmittal2391_0-1719311265868.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/31449iB7C6EC4810F054B7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="rahulmittal2391_0-1719311265868.png" alt="rahulmittal2391_0-1719311265868.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;index="ss-stg-dkp" cluster_name="*" AND namespace=dcx AND (label_app="composite-*" ) sourcetype="kube:container:main" | rex \"status\":"(?&amp;lt;Http_code&amp;gt;\d+)" | rex \"evtType\":"\"(?&amp;lt;evt_type&amp;gt;\w+)"\" |search evt_type=REQUEST| stats count(eval(Http_code&amp;gt;0)) as "Totalhits" count(eval(Http_code &amp;lt;500)) as "sR"| append [ search index="ss-stg-dkp" cluster_name="*" AND namespace=dcx AND (label_app="composite-*" ) sourcetype="kube:container:main"| rex field=_raw "Status code:"\s(?&amp;lt;code&amp;gt;\d+) |stats count(eval(code =500)) as error]&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hi All I want to add error count in to Totalhits&lt;/P&gt;
&lt;P&gt;like eval TotalRequest = error+TotalHits&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="rahulmittal2391_1-1719311491042.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/31450i18F61CA37066A0CC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="rahulmittal2391_1-1719311491042.png" alt="rahulmittal2391_1-1719311491042.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;It is showing as null value. Please help me to achieve this&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jun 2024 12:03:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Add-Secondary-search-variable-in-primary-search/m-p/691537#M235462</guid>
      <dc:creator>rahulmittal2391</dc:creator>
      <dc:date>2024-06-25T12:03:51Z</dc:date>
    </item>
    <item>
      <title>Re: Add Secondary search variable in primary search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Add-Secondary-search-variable-in-primary-search/m-p/691552#M235463</link>
      <description>&lt;P&gt;Try something like this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index="ss-stg-dkp" cluster_name="*" AND namespace=dcx AND (label_app="composite-*" ) sourcetype="kube:container:main" | rex \"status\":"(?&amp;lt;Http_code&amp;gt;\d+)" | rex \"evtType\":"\"(?&amp;lt;evt_type&amp;gt;\w+)"\" | rex field=_raw "Status code:"\s(?&amp;lt;code&amp;gt;\d+) | stats count(eval(Http_code&amp;gt;0 AND evt_type="REQUEST")) as "Totalhits" count(eval(Http_code &amp;lt;500 AND evt_type="REQUEST")) as "sR" count(eval(code =500)) as error&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 25 Jun 2024 12:10:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Add-Secondary-search-variable-in-primary-search/m-p/691552#M235463</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2024-06-25T12:10:27Z</dc:date>
    </item>
  </channel>
</rss>

