<?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: How can I combine several transactions into one search and chart in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-combine-several-transactions-into-one-search-and-chart/m-p/253637#M75923</link>
    <description>&lt;P&gt;With the &lt;CODE&gt;transaction&lt;/CODE&gt; command, I'm not sure you can combine multple sources without using sub-search (&lt;CODE&gt;append&lt;/CODE&gt;). Instead, I would suggest not using sub-searches and do something like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=myindex ("GetData : Request received." OR "GetData : Sending response." OR "Someother critearia: Start" OR "Someother critearia: End") | stats earliest(eval(if(match(_raw, "GetData\s:\sRequest\sreceived"), _time, null()))) as req_recd earliest(eval(if(match(_raw, "GetData\s:\sSending\sresponse"), _time, null()))) as send_resp earliest(eval(if(match(_raw, "Someother critearia: Start"), _time, null()))) as start earliest(eval(if(match(_raw, "Someother critearia: End"), _time, null()))) as start by TRXID | eval duration_getdata= send_resp - req_recd | eval dur=end-start | timechart avg(duration_getdata) as avg_getdata avg(dur) as someothercriteria
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 02 Dec 2016 13:41:11 GMT</pubDate>
    <dc:creator>sundareshr</dc:creator>
    <dc:date>2016-12-02T13:41:11Z</dc:date>
    <item>
      <title>How can I combine several transactions into one search and chart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-combine-several-transactions-into-one-search-and-chart/m-p/253636#M75922</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I am trying to get some performance/profiling statistics from our system. The log is very elar and aesy to read with something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=myindex "GetData : Request received." OR "GetData : Sending response."
| transaction TRXID maxspan=5m startswith="GetData : Request received." endswith="GetData : Sending response."
| timechart avg(duration) AS "GetData average"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;What I would like to get is a similar one with somewhat different keywords, and illustrate the data simultaneously. As is obvious, these transactions are parts of a bigger round trip and I would like to profile, where the time is spent. The individual searches are in effect similar, but how can I use them simultaneously?&lt;/P&gt;</description>
      <pubDate>Fri, 02 Dec 2016 11:20:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-combine-several-transactions-into-one-search-and-chart/m-p/253636#M75922</guid>
      <dc:creator>kaurinko</dc:creator>
      <dc:date>2016-12-02T11:20:09Z</dc:date>
    </item>
    <item>
      <title>Re: How can I combine several transactions into one search and chart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-combine-several-transactions-into-one-search-and-chart/m-p/253637#M75923</link>
      <description>&lt;P&gt;With the &lt;CODE&gt;transaction&lt;/CODE&gt; command, I'm not sure you can combine multple sources without using sub-search (&lt;CODE&gt;append&lt;/CODE&gt;). Instead, I would suggest not using sub-searches and do something like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=myindex ("GetData : Request received." OR "GetData : Sending response." OR "Someother critearia: Start" OR "Someother critearia: End") | stats earliest(eval(if(match(_raw, "GetData\s:\sRequest\sreceived"), _time, null()))) as req_recd earliest(eval(if(match(_raw, "GetData\s:\sSending\sresponse"), _time, null()))) as send_resp earliest(eval(if(match(_raw, "Someother critearia: Start"), _time, null()))) as start earliest(eval(if(match(_raw, "Someother critearia: End"), _time, null()))) as start by TRXID | eval duration_getdata= send_resp - req_recd | eval dur=end-start | timechart avg(duration_getdata) as avg_getdata avg(dur) as someothercriteria
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 02 Dec 2016 13:41:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-combine-several-transactions-into-one-search-and-chart/m-p/253637#M75923</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-12-02T13:41:11Z</dc:date>
    </item>
    <item>
      <title>Re: How can I combine several transactions into one search and chart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-combine-several-transactions-into-one-search-and-chart/m-p/253638#M75924</link>
      <description>&lt;P&gt;I tried this, but I could not get anything to a timechart. The statistics seemed to come out by TRXID, but my Splunk-skills were insufficient to transform that to a graph. Leaving the last timechart out gave me the numerics, but I was after the graphical time-history.&lt;/P&gt;</description>
      <pubDate>Mon, 05 Dec 2016 11:41:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-combine-several-transactions-into-one-search-and-chart/m-p/253638#M75924</guid>
      <dc:creator>kaurinko</dc:creator>
      <dc:date>2016-12-05T11:41:34Z</dc:date>
    </item>
    <item>
      <title>Re: How can I combine several transactions into one search and chart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-combine-several-transactions-into-one-search-and-chart/m-p/253639#M75925</link>
      <description>&lt;P&gt;I solved it, at least to some extent.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=myindex ("GetData : Request received." OR "GetData : Sending response.")
| transaction TRXID maxspan=5m endswith="GetData : Sending response." startswith="GetData : Request received."
| timechart perc95(duration) AS "Data"
| append [
search index=myindex ("CheckServices : Request received." OR "CheckServices : Sending response.")
| transaction TRXID maxspan=5m endswith="CheckServices : Sending response." startswith="CheckServices : Request received." 
| timechart perc95(duration) AS "Srv" 
] 
| append [
search myindex ("CheckPermissions : Request received." OR "CheckPermissions : Sending response.")
| transaction TRXID maxspan=5m endswith="CheckPermissions : Sending response." startswith="CheckPermissions : Request received." 
| timechart perc95(duration) AS "Perm" 
] | timechart avg(Data) AS "95% Data" avg(Srv) AS "95% Services" avg(Perm) AS "95% Permissions"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;So the solution is to search though the data separately for each transaction type, and my fear is that this is expensive for Splunk. Also, the data I get to the plot is what I request in the inner &lt;EM&gt;timechart&lt;/EM&gt; requests. The last &lt;EM&gt;timechart&lt;/EM&gt; does not change the 95%-data to averages, maybe because it has already been processed and reduced to one datapoint for each time span instead of the actual dataset. The last line gives the serieses their names, and without the last &lt;EM&gt;timechart&lt;/EM&gt;, there would be three plots next to each other.&lt;/P&gt;

&lt;P&gt;Any suggestions on how to improve the search in terms of performance without loosing clarity are gratefully appreciated.&lt;/P&gt;</description>
      <pubDate>Mon, 05 Dec 2016 11:57:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-combine-several-transactions-into-one-search-and-chart/m-p/253639#M75925</guid>
      <dc:creator>kaurinko</dc:creator>
      <dc:date>2016-12-05T11:57:07Z</dc:date>
    </item>
    <item>
      <title>Re: How can I combine several transactions into one search and chart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-combine-several-transactions-into-one-search-and-chart/m-p/253640#M75926</link>
      <description>&lt;P&gt;Hi @kaurinko - Glad to see that you've found a potential solution yourself. If you'd like to close out this question, please click "Accept" below your answer. But if you would still like to keep it open in case another user wants to attempt to provide an alternative solution, you don't need to do anything. Thanks.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Dec 2016 05:34:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-combine-several-transactions-into-one-search-and-chart/m-p/253640#M75926</guid>
      <dc:creator>aaraneta_splunk</dc:creator>
      <dc:date>2016-12-08T05:34:35Z</dc:date>
    </item>
  </channel>
</rss>

