<?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 Combining Multiple series in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Combining-Multiple-series/m-p/42869#M10071</link>
    <description>&lt;P&gt;Hi, &lt;/P&gt;

&lt;P&gt;I'm pretty new to Splunk reporting, so maybe this is an easy one &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;I've build up a query joining 3 data series like this:&lt;/P&gt;

&lt;P&gt;&lt;EM&gt;cluster=cluster_1 AND relay=relayhost1 eventtype=relay | stats count as "Relay Count" | join [search cluster=cluster_1 reject="554 5.7.1 Service unavailable" | stats count as "Reject Count" | join [search cluster=cluster_1 AND (categorization="spam-confirmed" OR reject=551) | stats count as "Spam" ]&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;This is working as intended, I get one my 3 results. Now I want to take this further, getting the results grouped by time. I got this far:&lt;/P&gt;

&lt;P&gt;&lt;EM&gt;cluster=cluster_1 AND relay=relayhost1 eventtype=relay | bucket _time span=5m | stats count as "Relay Count" by _time | join [search cluster=cluster_1 reject="554 5.7.1 Service unavailable" | bucket _time span=5n | stats count as "Reject Count" by _time] | join [search cluster=cluster_1 AND (categorization="spam-confirmed" OR reject=551) | bucket _time span=5m | stats count as "Spam" by _time]&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;It seems to be working for the Relay Count column, but not for the other 2, they always have the same count over all _time rows, e.g.:&lt;/P&gt;

&lt;P&gt;_time  Relay Count  Reject Count  Spam&lt;BR /&gt;&lt;BR /&gt;
1 1/2/12 2:35:00.000 PM 978 832 33 &lt;BR /&gt;
2 1/2/12 2:40:00.000 PM 1336 832 33 &lt;BR /&gt;
3 1/2/12 2:45:00.000 PM 1313 832 33 &lt;BR /&gt;
4 1/2/12 2:50:00.000 PM 490 832 33 &lt;/P&gt;

&lt;P&gt;Am I doing something terribly wrong, or is there a way to get this results?&lt;/P&gt;

&lt;P&gt;Thanks in advance!&lt;/P&gt;

&lt;P&gt;Philipp&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 10:15:54 GMT</pubDate>
    <dc:creator>philre</dc:creator>
    <dc:date>2020-09-28T10:15:54Z</dc:date>
    <item>
      <title>Combining Multiple series</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Combining-Multiple-series/m-p/42869#M10071</link>
      <description>&lt;P&gt;Hi, &lt;/P&gt;

&lt;P&gt;I'm pretty new to Splunk reporting, so maybe this is an easy one &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;I've build up a query joining 3 data series like this:&lt;/P&gt;

&lt;P&gt;&lt;EM&gt;cluster=cluster_1 AND relay=relayhost1 eventtype=relay | stats count as "Relay Count" | join [search cluster=cluster_1 reject="554 5.7.1 Service unavailable" | stats count as "Reject Count" | join [search cluster=cluster_1 AND (categorization="spam-confirmed" OR reject=551) | stats count as "Spam" ]&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;This is working as intended, I get one my 3 results. Now I want to take this further, getting the results grouped by time. I got this far:&lt;/P&gt;

&lt;P&gt;&lt;EM&gt;cluster=cluster_1 AND relay=relayhost1 eventtype=relay | bucket _time span=5m | stats count as "Relay Count" by _time | join [search cluster=cluster_1 reject="554 5.7.1 Service unavailable" | bucket _time span=5n | stats count as "Reject Count" by _time] | join [search cluster=cluster_1 AND (categorization="spam-confirmed" OR reject=551) | bucket _time span=5m | stats count as "Spam" by _time]&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;It seems to be working for the Relay Count column, but not for the other 2, they always have the same count over all _time rows, e.g.:&lt;/P&gt;

&lt;P&gt;_time  Relay Count  Reject Count  Spam&lt;BR /&gt;&lt;BR /&gt;
1 1/2/12 2:35:00.000 PM 978 832 33 &lt;BR /&gt;
2 1/2/12 2:40:00.000 PM 1336 832 33 &lt;BR /&gt;
3 1/2/12 2:45:00.000 PM 1313 832 33 &lt;BR /&gt;
4 1/2/12 2:50:00.000 PM 490 832 33 &lt;/P&gt;

&lt;P&gt;Am I doing something terribly wrong, or is there a way to get this results?&lt;/P&gt;

&lt;P&gt;Thanks in advance!&lt;/P&gt;

&lt;P&gt;Philipp&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 10:15:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Combining-Multiple-series/m-p/42869#M10071</guid>
      <dc:creator>philre</dc:creator>
      <dc:date>2020-09-28T10:15:54Z</dc:date>
    </item>
    <item>
      <title>Re: Combining Multiple series</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Combining-Multiple-series/m-p/42870#M10072</link>
      <description>&lt;P&gt;This should give you the results you want:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;cluster=cluster_1 | bucket _time span=5m 
| stats count(eval(relay=relayhost1 AND eventtype=relay)) as "Relay Count",
count(eval(reject="554 5.7.1 Service unavailable")) as "Reject Count",
count(eval(categorization="spam-confirmed" OR reject=551)) as "Spam" by _time
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 02 Jan 2012 14:50:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Combining-Multiple-series/m-p/42870#M10072</guid>
      <dc:creator>eelisio2</dc:creator>
      <dc:date>2012-01-02T14:50:52Z</dc:date>
    </item>
    <item>
      <title>Re: Combining Multiple series</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Combining-Multiple-series/m-p/42871#M10073</link>
      <description>&lt;P&gt;Hi, that works great, I need to use the bucket before the searches, I see!&lt;BR /&gt;
I already tryed working with eval, but never got it right i guess &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;I also was able to speed it up a bit by adding the filters used in the eval to the search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;cluster=cluster_1 AND (relay="relayhost1" OR reject="554 5.7.1 Service unavailable" OR reject=551)  | bucket _time span=5m 
| stats count(eval(relay="relayhost1")) as "Relay Count",
count(eval(reject="554 5.7.1 Service unavailable")) as "Reject Count",
count(eval(categorization="spam-confirmed" OR reject=551)) as "Spam" by _time
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Mon, 02 Jan 2012 15:07:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Combining-Multiple-series/m-p/42871#M10073</guid>
      <dc:creator>philre</dc:creator>
      <dc:date>2012-01-02T15:07:15Z</dc:date>
    </item>
  </channel>
</rss>

