<?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 combine searches to generate stats of domains with &amp;quot;success&amp;quot; and &amp;quot;failure&amp;quot; columns? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-searches-to-generate-stats-of-domains-with-quot/m-p/240515#M71500</link>
    <description>&lt;P&gt;I am attempting to combine two searches against a custom app within custom props.conf but am going in circles.  Both searches are the same, with the exception of: Search1 is reporting on a "yes" or success statement, Search2 is reporting on a "no" or failed statement.  I am trying to generate stats of domains with a success column and a failure column.  Is there a better way?&lt;/P&gt;

&lt;P&gt;Search 1&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;eventtype=some_events APP1
| search (*) (*) NOT ("filter expression") 
| search "APP1 Version:" OR "MODULE: Report MESSAGE: Results:" OR "Response" system=*
| transaction system maxspan=24h 
| eval completed=if(searchmatch("Results:"),"yes","no")  
| search completed=yes
| rex field=system "[^.]*.(?.*)" 
| stats count by FQDN 
| sort -count
| rename count AS success
| dedup FQDN
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Search 2&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;eventtype=some_events APP1
| search (*) (*) NOT ("filter expression") 
| search "APP1 Version:" OR "MODULE: Report MESSAGE: Results:" OR "Response" system=*
| transaction system maxspan=24h 
| eval completed=if(searchmatch("Results:"),"yes","no")  
| search completed!=yes
| rex field=system "[^.]*.(?.*)" 
| stats count by FQDN 
| sort -count
| rename count AS failed
| dedup FQDN
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Desired output:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;FQDN                Success                        Failed
domain1.com         ##                             ##
domain2.com         ##                             ##
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 17 Jan 2017 18:37:57 GMT</pubDate>
    <dc:creator>tlmayes</dc:creator>
    <dc:date>2017-01-17T18:37:57Z</dc:date>
    <item>
      <title>How to combine searches to generate stats of domains with "success" and "failure" columns?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-searches-to-generate-stats-of-domains-with-quot/m-p/240515#M71500</link>
      <description>&lt;P&gt;I am attempting to combine two searches against a custom app within custom props.conf but am going in circles.  Both searches are the same, with the exception of: Search1 is reporting on a "yes" or success statement, Search2 is reporting on a "no" or failed statement.  I am trying to generate stats of domains with a success column and a failure column.  Is there a better way?&lt;/P&gt;

&lt;P&gt;Search 1&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;eventtype=some_events APP1
| search (*) (*) NOT ("filter expression") 
| search "APP1 Version:" OR "MODULE: Report MESSAGE: Results:" OR "Response" system=*
| transaction system maxspan=24h 
| eval completed=if(searchmatch("Results:"),"yes","no")  
| search completed=yes
| rex field=system "[^.]*.(?.*)" 
| stats count by FQDN 
| sort -count
| rename count AS success
| dedup FQDN
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Search 2&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;eventtype=some_events APP1
| search (*) (*) NOT ("filter expression") 
| search "APP1 Version:" OR "MODULE: Report MESSAGE: Results:" OR "Response" system=*
| transaction system maxspan=24h 
| eval completed=if(searchmatch("Results:"),"yes","no")  
| search completed!=yes
| rex field=system "[^.]*.(?.*)" 
| stats count by FQDN 
| sort -count
| rename count AS failed
| dedup FQDN
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Desired output:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;FQDN                Success                        Failed
domain1.com         ##                             ##
domain2.com         ##                             ##
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 17 Jan 2017 18:37:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-combine-searches-to-generate-stats-of-domains-with-quot/m-p/240515#M71500</guid>
      <dc:creator>tlmayes</dc:creator>
      <dc:date>2017-01-17T18:37:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to combine searches to generate stats of domains with "success" and "failure" columns?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-searches-to-generate-stats-of-domains-with-quot/m-p/240516#M71501</link>
      <description>&lt;P&gt;try something like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;eventtype=some_events APP1
| search () () NOT ("filter expression") 
| search "APP1 Version:" OR "MODULE: Report MESSAGE: Results:" OR "Response" system=
| transaction system maxspan=24h 
| eval completed=if(searchmatch("Results:"),"yes","no") 
| rex field=system "[^.].(?.*)" 
| stats count(eval(match(completed,"yes"))) as success count(eval(match(completed,"no"))) as failed by FQDN
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 17 Jan 2017 18:41:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-combine-searches-to-generate-stats-of-domains-with-quot/m-p/240516#M71501</guid>
      <dc:creator>cmerriman</dc:creator>
      <dc:date>2017-01-17T18:41:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to combine searches to generate stats of domains with "success" and "failure" columns?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-searches-to-generate-stats-of-domains-with-quot/m-p/240517#M71502</link>
      <description>&lt;P&gt;Worked perfect.  Greatly appreciated&lt;/P&gt;</description>
      <pubDate>Tue, 17 Jan 2017 18:46:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-combine-searches-to-generate-stats-of-domains-with-quot/m-p/240517#M71502</guid>
      <dc:creator>tlmayes</dc:creator>
      <dc:date>2017-01-17T18:46:49Z</dc:date>
    </item>
  </channel>
</rss>

