<?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: Query with Transaction Help/Optimize in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Query-with-Transaction-Help-Optimize/m-p/186261#M53648</link>
    <description>&lt;P&gt;how about moving your second search filters (succes="no"...) to base search filter? This should make the query little faster.&lt;/P&gt;</description>
    <pubDate>Thu, 13 Mar 2014 18:48:07 GMT</pubDate>
    <dc:creator>somesoni2</dc:creator>
    <dc:date>2014-03-13T18:48:07Z</dc:date>
    <item>
      <title>Query with Transaction Help/Optimize</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Query-with-Transaction-Help-Optimize/m-p/186260#M53647</link>
      <description>&lt;P&gt;My search is ...&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=linux_audit (type="SYSCALL" OR type="PATH") | transaction host lin_audit_event maxevents=3 maxspan=24h keepevicted=true | search success="no" (name="/etc/*" OR name="/bin/*" OR name="/usr/sbin/*")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;OL&gt;
&lt;LI&gt;&lt;P&gt;This query is taking a very long time to run, are there any optimizations that I can make?&lt;/P&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;P&gt;If a large time range is chosen, the query takes 15+ minutes, and gives me the error that "No matching fields exist". However, if I add host="whateverhost" to the search, I see results. Am I missing some parameters?&lt;/P&gt;&lt;/LI&gt;
&lt;/OL&gt;</description>
      <pubDate>Thu, 13 Mar 2014 14:20:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Query-with-Transaction-Help-Optimize/m-p/186260#M53647</guid>
      <dc:creator>zafunt</dc:creator>
      <dc:date>2014-03-13T14:20:28Z</dc:date>
    </item>
    <item>
      <title>Re: Query with Transaction Help/Optimize</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Query-with-Transaction-Help-Optimize/m-p/186261#M53648</link>
      <description>&lt;P&gt;how about moving your second search filters (succes="no"...) to base search filter? This should make the query little faster.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Mar 2014 18:48:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Query-with-Transaction-Help-Optimize/m-p/186261#M53648</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2014-03-13T18:48:07Z</dc:date>
    </item>
    <item>
      <title>Re: Query with Transaction Help/Optimize</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Query-with-Transaction-Help-Optimize/m-p/186262#M53649</link>
      <description>&lt;P&gt;The maxspan makes a huge difference.  If you can set a lower maxspan, like 1h or even less, it will be significantly faster.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Mar 2014 19:25:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Query-with-Transaction-Help-Optimize/m-p/186262#M53649</guid>
      <dc:creator>the_wolverine</dc:creator>
      <dc:date>2014-03-13T19:25:20Z</dc:date>
    </item>
    <item>
      <title>Re: Query with Transaction Help/Optimize</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Query-with-Transaction-Help-Optimize/m-p/186263#M53650</link>
      <description>&lt;P&gt;I've tried the maxspan=5s (even went to 24h). However, my audits look like this in splunk...&lt;BR /&gt;
3/11/14 8:45:58.171 AM, type=SYSCALL, exe="/usr/bin/rm", uid=1001&lt;BR /&gt;
3/11/14 8:01:00.000 AM, type=PATH, item=1, name="/etc/shadow"&lt;BR /&gt;
3/11/14 8:01:00.000 AM, type=PATH, item=0, name="/etc"&lt;/P&gt;

&lt;P&gt;These events are created in the audit.log almost instantly, but it looks like the _time is off for the events that are type=PATH.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Mar 2014 10:55:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Query-with-Transaction-Help-Optimize/m-p/186263#M53650</guid>
      <dc:creator>zafunt</dc:creator>
      <dc:date>2014-03-14T10:55:18Z</dc:date>
    </item>
    <item>
      <title>Re: Query with Transaction Help/Optimize</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Query-with-Transaction-Help-Optimize/m-p/186264#M53651</link>
      <description>&lt;P&gt;Thanks for the suggestion.&lt;/P&gt;

&lt;P&gt;now... Please forgive the syntax, I can't copy-paste.&lt;/P&gt;

&lt;P&gt;sourcetype=linux_audit (type="SYSCALL" success="no") OR (type="PATH" (name="/etc/&lt;EM&gt;" OR name="/bin/&lt;/EM&gt;" OR name="/usr/sbin*")) | transaction maxevents=3 maxspan=24h keepevicted=true&lt;/P&gt;

&lt;P&gt;This seems to be more optimized. However, I am getting the same results. Am, I hitting some kind of limit?&lt;/P&gt;</description>
      <pubDate>Fri, 14 Mar 2014 14:50:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Query-with-Transaction-Help-Optimize/m-p/186264#M53651</guid>
      <dc:creator>zafunt</dc:creator>
      <dc:date>2014-03-14T14:50:34Z</dc:date>
    </item>
    <item>
      <title>Re: Query with Transaction Help/Optimize</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Query-with-Transaction-Help-Optimize/m-p/186265#M53652</link>
      <description>&lt;P&gt;I hate to rehash an old thread, but I was able to speed up the query significantly by following the comments from somesoni2 and the_wolverine above. In addition, I was able to create a props.conf file to resolve the timestamp issue mentioned in my last comment.&lt;/P&gt;

&lt;P&gt;[source::.../var/log/audit/audit.log(.\d+)?]&lt;BR /&gt;
TIME_PREFIX = audit(&lt;BR /&gt;
TIME_FORMAT = %s.%3N&lt;/P&gt;

&lt;P&gt;Of course, this would probably be resolved by using rlog.sh in Splunk_TA_Nix app, but it blows up with some older Suse boxes.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 10:03:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Query-with-Transaction-Help-Optimize/m-p/186265#M53652</guid>
      <dc:creator>zafunt</dc:creator>
      <dc:date>2020-09-29T10:03:55Z</dc:date>
    </item>
  </channel>
</rss>

