<?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 How to search any column and count if a search string is matched in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-any-column-and-count-if-a-search-string-is-matched/m-p/482797#M193264</link>
    <description>&lt;P&gt;I have a saved search of the following format&lt;BR /&gt;
ServerName Metric1 Metric2 Metric3 Metric4&lt;BR /&gt;
Server1         Error   Error   GREEN GREEN&lt;BR /&gt;
Server2         Missing Error Missing Error&lt;BR /&gt;
Server3        GREEN GREEN GREEN GREEN&lt;BR /&gt;
Server4        Error Error Error Error&lt;/P&gt;

&lt;P&gt;The output should show how many servers have errors and how many servers are missing&lt;BR /&gt;
 Server with Error= 3&lt;BR /&gt;
Server Missing = 1&lt;/P&gt;</description>
    <pubDate>Tue, 14 Jan 2020 02:57:49 GMT</pubDate>
    <dc:creator>mgbersales</dc:creator>
    <dc:date>2020-01-14T02:57:49Z</dc:date>
    <item>
      <title>How to search any column and count if a search string is matched</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-any-column-and-count-if-a-search-string-is-matched/m-p/482797#M193264</link>
      <description>&lt;P&gt;I have a saved search of the following format&lt;BR /&gt;
ServerName Metric1 Metric2 Metric3 Metric4&lt;BR /&gt;
Server1         Error   Error   GREEN GREEN&lt;BR /&gt;
Server2         Missing Error Missing Error&lt;BR /&gt;
Server3        GREEN GREEN GREEN GREEN&lt;BR /&gt;
Server4        Error Error Error Error&lt;/P&gt;

&lt;P&gt;The output should show how many servers have errors and how many servers are missing&lt;BR /&gt;
 Server with Error= 3&lt;BR /&gt;
Server Missing = 1&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jan 2020 02:57:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-any-column-and-count-if-a-search-string-is-matched/m-p/482797#M193264</guid>
      <dc:creator>mgbersales</dc:creator>
      <dc:date>2020-01-14T02:57:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to search any column and count if a search string is matched</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-any-column-and-count-if-a-search-string-is-matched/m-p/482798#M193265</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;

&lt;P&gt;Check this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults 
| eval ServerName="Server1",Metric1="Error",Metric2="Error",Metric3="GREEN",Metric4="GREEN" 
| append 
    [| makeresults 
    | eval ServerName="Server2",Metric1="Missing",Metric2="Error",Metric3="Missing",Metric4="Error"] 
| eval error =case(Metric1="Error","Error",Metric2="Error","Error",Metric3="Error","Error",Metric4="Error","Error") 
| eval missing =case(Metric1="Missing","Missing",Metric2="Missing","Missing",Metric3="Missing","Missing",Metric4="Missing","Missing") 
| stats count(eval(error="Error")) as "Server with Error" count(eval(missing="Missing")) as "Server Missing" 
| transpose
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 14 Jan 2020 05:15:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-any-column-and-count-if-a-search-string-is-matched/m-p/482798#M193265</guid>
      <dc:creator>vnravikumar</dc:creator>
      <dc:date>2020-01-14T05:15:22Z</dc:date>
    </item>
  </channel>
</rss>

