<?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: Timchart - Search queries in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Timchart-Search-queries/m-p/159920#M45163</link>
    <description>&lt;P&gt;What values do those two fields &lt;CODE&gt;CISE_Failed_Attempts&lt;/CODE&gt; and &lt;CODE&gt;CISE_Passed_Authentications&lt;/CODE&gt; have that you use to group by? If their values are distinct then combining them before the &lt;CODE&gt;timechart&lt;/CODE&gt; will still yield their distinct values for each column.&lt;/P&gt;</description>
    <pubDate>Sun, 11 May 2014 16:47:20 GMT</pubDate>
    <dc:creator>martin_mueller</dc:creator>
    <dc:date>2014-05-11T16:47:20Z</dc:date>
    <item>
      <title>Timchart - Search queries</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timchart-Search-queries/m-p/159916#M45159</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;

&lt;P&gt;I have the following search queries with me.&lt;/P&gt;

&lt;P&gt;index=XXX CISE_Failed_Attempts | timechart span=30m count by CISE_Failed_Attempts | rename NULL as "Failed Authentication Count"&lt;/P&gt;

&lt;P&gt;index=XXX CISE_Passed_Authentications | timechart span=30m count by CISE_Passed_Authentications | rename NULL as "Passed Authentications Count"&lt;/P&gt;

&lt;P&gt;Is there a way where i could combine both the queries together into a single query like the following&lt;/P&gt;

&lt;P&gt;index=XXX CISE_Passed_Authentications OR CISE_Failed_Attempts  | timechart span=30m count by CISE_Passed_Authentications , CISE_Failed_Attempts&lt;/P&gt;

&lt;P&gt;Individually the search queries work fine. But when i try to do a timechart with two fields it fails.&lt;/P&gt;

&lt;P&gt;Please suggest a way to overcome this issue.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 16:34:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timchart-Search-queries/m-p/159916#M45159</guid>
      <dc:creator>ppurokit</dc:creator>
      <dc:date>2020-09-28T16:34:46Z</dc:date>
    </item>
    <item>
      <title>Re: Timchart - Search queries</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timchart-Search-queries/m-p/159917#M45160</link>
      <description>&lt;P&gt;The most naive way to combine the two would be &lt;CODE&gt;appendcols&lt;/CODE&gt;:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=XXX CISE_Failed_Attempts | timechart span=30m count by CISE_Failed_Attempts | rename NULL as "Failed Authentication Count"
| appendcols 
[ search index=XXX CISE_Passed_Authentications | timechart span=30m count by CISE_Passed_Authentications | rename NULL as "Passed Authentications Count" ]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Depending on your data, you may be able to combine the two more smartly, for example like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=XXX CISE_Failed_Attempts OR CISE_Passed_Authentications | eval CISE_Combined = coalesce(CISE_Failed_Attempts, CISE_Passed_Authentications) | timechart span=30m count by CISE_Combined
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Note, I've assumed that those two fields have reasonable values... I'm doubting that assumption a bit because of your use of the &lt;CODE&gt;NULL&lt;/CODE&gt; column. Post some sample data to investigate that.&lt;/P&gt;</description>
      <pubDate>Sun, 11 May 2014 15:29:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timchart-Search-queries/m-p/159917#M45160</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-05-11T15:29:29Z</dc:date>
    </item>
    <item>
      <title>Re: Timchart - Search queries</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timchart-Search-queries/m-p/159918#M45161</link>
      <description>&lt;P&gt;Thanks for the update. Actually my intention is to combine these into a single query and put it into a summary index using sitimechart command and then again write a query to populate back the dashboard,&lt;/P&gt;</description>
      <pubDate>Sun, 11 May 2014 16:39:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timchart-Search-queries/m-p/159918#M45161</guid>
      <dc:creator>ppurokit</dc:creator>
      <dc:date>2014-05-11T16:39:18Z</dc:date>
    </item>
    <item>
      <title>Re: Timchart - Search queries</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timchart-Search-queries/m-p/159919#M45162</link>
      <description>&lt;P&gt;I hope i cant make use of the coalesce command because both are combined together into a single column. But i need both to be separate. &lt;/P&gt;

&lt;P&gt;As said i can make use of the said appendcols,but fear that im executing two searches at the same time which could take more time to run.&lt;/P&gt;</description>
      <pubDate>Sun, 11 May 2014 16:45:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timchart-Search-queries/m-p/159919#M45162</guid>
      <dc:creator>ppurokit</dc:creator>
      <dc:date>2014-05-11T16:45:12Z</dc:date>
    </item>
    <item>
      <title>Re: Timchart - Search queries</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timchart-Search-queries/m-p/159920#M45163</link>
      <description>&lt;P&gt;What values do those two fields &lt;CODE&gt;CISE_Failed_Attempts&lt;/CODE&gt; and &lt;CODE&gt;CISE_Passed_Authentications&lt;/CODE&gt; have that you use to group by? If their values are distinct then combining them before the &lt;CODE&gt;timechart&lt;/CODE&gt; will still yield their distinct values for each column.&lt;/P&gt;</description>
      <pubDate>Sun, 11 May 2014 16:47:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timchart-Search-queries/m-p/159920#M45163</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-05-11T16:47:20Z</dc:date>
    </item>
  </channel>
</rss>

