<?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: Forward Filtered Splunk Audit Events to Third-Party System in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Forward-Filtered-Splunk-Audit-Events-to-Third-Party-System/m-p/369255#M93335</link>
    <description>&lt;P&gt;In outputs.conf, you also need to define a default output group, which needs to be a dummy one (which will be overridden by your transform when you actually want to forward the event):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[syslog]
defaultGroup=noForwarding
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And if this same Splunk instance also needs to forward, this also needs to go in outputs.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; [indexAndForward]
 index = true
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Note: The Splunk docs state &lt;CODE&gt;defaultGroup&lt;/CODE&gt; isn't required if you don't want to forward by default, but my testing for a &lt;A href="https://answers.splunk.com/answers/614054/how-to-index-all-locally-and-forward-specific-sour.html?childToView=616092"&gt;recent answers post&lt;/A&gt; suggested if it's not set it won't forward at all.&lt;/P&gt;</description>
    <pubDate>Thu, 08 Feb 2018 04:23:33 GMT</pubDate>
    <dc:creator>micahkemp</dc:creator>
    <dc:date>2018-02-08T04:23:33Z</dc:date>
    <item>
      <title>Forward Filtered Splunk Audit Events to Third-Party System</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Forward-Filtered-Splunk-Audit-Events-to-Third-Party-System/m-p/369254#M93334</link>
      <description>&lt;P&gt;I would like to forward Splunk audit events containing the keyword "login attempt" to a third-party system.&lt;BR /&gt;
This is my configuration so far, but it is not working:&lt;/P&gt;

&lt;P&gt;props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[audittrail]
TRANSFORMS-routing = forward_audit
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;transforms.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[forward_audit]
REGEX=(login attempt)
DEST_KEY=_SYSLOG_ROUTING
FORMAT=syslog_server
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;outputs.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[syslog:syslog_server]
disabled=false
server=x.x.x.x:514
type=tcp
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;May I know why?&lt;/P&gt;</description>
      <pubDate>Thu, 08 Feb 2018 04:08:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Forward-Filtered-Splunk-Audit-Events-to-Third-Party-System/m-p/369254#M93334</guid>
      <dc:creator>yujietay</dc:creator>
      <dc:date>2018-02-08T04:08:26Z</dc:date>
    </item>
    <item>
      <title>Re: Forward Filtered Splunk Audit Events to Third-Party System</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Forward-Filtered-Splunk-Audit-Events-to-Third-Party-System/m-p/369255#M93335</link>
      <description>&lt;P&gt;In outputs.conf, you also need to define a default output group, which needs to be a dummy one (which will be overridden by your transform when you actually want to forward the event):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[syslog]
defaultGroup=noForwarding
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And if this same Splunk instance also needs to forward, this also needs to go in outputs.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; [indexAndForward]
 index = true
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Note: The Splunk docs state &lt;CODE&gt;defaultGroup&lt;/CODE&gt; isn't required if you don't want to forward by default, but my testing for a &lt;A href="https://answers.splunk.com/answers/614054/how-to-index-all-locally-and-forward-specific-sour.html?childToView=616092"&gt;recent answers post&lt;/A&gt; suggested if it's not set it won't forward at all.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Feb 2018 04:23:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Forward-Filtered-Splunk-Audit-Events-to-Third-Party-System/m-p/369255#M93335</guid>
      <dc:creator>micahkemp</dc:creator>
      <dc:date>2018-02-08T04:23:33Z</dc:date>
    </item>
    <item>
      <title>Re: Forward Filtered Splunk Audit Events to Third-Party System</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Forward-Filtered-Splunk-Audit-Events-to-Third-Party-System/m-p/369256#M93336</link>
      <description>&lt;P&gt;Hi micahkemp,&lt;/P&gt;

&lt;P&gt;Sorry, I only posted a subset of my outputs.conf. I do have the information that you have stated above.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[syslog]
defaultGroup = syslog-output

[indexAndForward]
index=true

[syslog:syslog_server]
disabled=false
server=x.x.x.x:514
type=tcp
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 08 Feb 2018 04:26:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Forward-Filtered-Splunk-Audit-Events-to-Third-Party-System/m-p/369256#M93336</guid>
      <dc:creator>yujietay</dc:creator>
      <dc:date>2018-02-08T04:26:08Z</dc:date>
    </item>
    <item>
      <title>Re: Forward Filtered Splunk Audit Events to Third-Party System</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Forward-Filtered-Splunk-Audit-Events-to-Third-Party-System/m-p/369257#M93337</link>
      <description>&lt;P&gt;How are the events coming in that have the sourcetype &lt;CODE&gt;audittrail&lt;/CODE&gt;?&lt;/P&gt;

&lt;P&gt;As an aside, you don't need the parentheses around &lt;CODE&gt;login attempt&lt;/CODE&gt;, as you don't use this value later for anything.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Feb 2018 04:29:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Forward-Filtered-Splunk-Audit-Events-to-Third-Party-System/m-p/369257#M93337</guid>
      <dc:creator>micahkemp</dc:creator>
      <dc:date>2018-02-08T04:29:53Z</dc:date>
    </item>
    <item>
      <title>Re: Forward Filtered Splunk Audit Events to Third-Party System</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Forward-Filtered-Splunk-Audit-Events-to-Third-Party-System/m-p/369258#M93338</link>
      <description>&lt;P&gt;If you search "index=_audit", the audit events that I require have the sourcetype "audittrail".&lt;/P&gt;</description>
      <pubDate>Thu, 08 Feb 2018 04:52:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Forward-Filtered-Splunk-Audit-Events-to-Third-Party-System/m-p/369258#M93338</guid>
      <dc:creator>yujietay</dc:creator>
      <dc:date>2018-02-08T04:52:20Z</dc:date>
    </item>
    <item>
      <title>Re: Forward Filtered Splunk Audit Events to Third-Party System</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Forward-Filtered-Splunk-Audit-Events-to-Third-Party-System/m-p/369259#M93339</link>
      <description>&lt;P&gt;OK, I'm not happy with this answer, but after much testing it's all I have.&lt;/P&gt;

&lt;P&gt;The _audit data comes isn't from a "normal" input, it seems.  Try to find an inputs.conf stanza that points data to &lt;CODE&gt;_audit&lt;/CODE&gt;, or a transform that shuffles data into &lt;CODE&gt;_audit&lt;/CODE&gt;.  As best I can tell, they don't exist.  I imagine this is because the audittrail data comes from within splunkd and is never logged to a file, and doesn't use anything like a scripted or modular input to push it to splunk.  Hence it bypasses props/transforms entirely.&lt;/P&gt;

&lt;P&gt;The only workaround I could come up with is to take the opposite approach: forward everything by default via outputs.conf, and use a &lt;CODE&gt;[default]&lt;/CODE&gt; stanza in props.conf to skip forwarding for everything that matches (which won't happen for audittrail).  This method prevents you from further filtering on "login attempt", but I can't find a way to selectively match audittrail events (as per the above paragraph's conclusion).&lt;/P&gt;

&lt;P&gt;Here is the config that will forward only audittrail, leaving everything else to only index locally:&lt;/P&gt;

&lt;P&gt;outputs.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[indexAndForward]
index = true

[syslog]
defaultGroup = syslog_server

[syslog:syslog_server]
server = x.x.x.x:514
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[default]
# _audit seems to not match [default] so we do this in reverse and send everything that matches to "nowhere"
TRANSFORMS-routing = dont_forward_anything
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;transforms.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[dont_forward_anything]
REGEX = .
DEST_KEY = _SYSLOG_ROUTING
FORMAT = nothing
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 29 Sep 2020 17:59:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Forward-Filtered-Splunk-Audit-Events-to-Third-Party-System/m-p/369259#M93339</guid>
      <dc:creator>micahkemp</dc:creator>
      <dc:date>2020-09-29T17:59:43Z</dc:date>
    </item>
    <item>
      <title>Re: Forward Filtered Splunk Audit Events to Third-Party System</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Forward-Filtered-Splunk-Audit-Events-to-Third-Party-System/m-p/369260#M93340</link>
      <description>&lt;P&gt;Hi micahkemp,&lt;/P&gt;

&lt;P&gt;The audit logs are in $SPLUNK_HOME/var/log/splunk/audit.log.&lt;/P&gt;</description>
      <pubDate>Mon, 12 Feb 2018 07:07:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Forward-Filtered-Splunk-Audit-Events-to-Third-Party-System/m-p/369260#M93340</guid>
      <dc:creator>yujietay</dc:creator>
      <dc:date>2018-02-12T07:07:42Z</dc:date>
    </item>
    <item>
      <title>Re: Forward Filtered Splunk Audit Events to Third-Party System</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Forward-Filtered-Splunk-Audit-Events-to-Third-Party-System/m-p/369261#M93341</link>
      <description>&lt;P&gt;Yes, but that's not how the events are indexed into Splunk.  In system/default/props.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[source::.../var/log/splunk/audit.log(.\d+)?]
TRANSFORMS = send_to_nullqueue
sourcetype = splunk_audit
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Also notice that the audit.log format has a prefix on each line that the _audit events in Splunk don't have:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Audit:[timestamp=02-12-2018 15:03:19.917, user=admin, action=search, info=granted REST: /search/jobs/1518447473.9041/control][n/a]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;vs&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;02-12-2018 15:03:35.128 +0000 INFO  AuditLogger - Audit:[timestamp=02-12-2018 15:03:35.128, user=admin, action=search, info=granted REST: /search/jobs/1518447473.9041/control][n/a]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Perhaps it would instead be worth blacklisting audit.log from the catchall &lt;CODE&gt;[monitor://$SPLUNK_HOME/var/log/splunk]&lt;/CODE&gt; input, and configuring your own input to monitor it instead.&lt;/P&gt;

&lt;P&gt;For what it's worth, I sent a link to this answers post to others in the Splunk community, and the only response I got was, "audittrail is weird".&lt;/P&gt;</description>
      <pubDate>Mon, 12 Feb 2018 15:24:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Forward-Filtered-Splunk-Audit-Events-to-Third-Party-System/m-p/369261#M93341</guid>
      <dc:creator>micahkemp</dc:creator>
      <dc:date>2018-02-12T15:24:10Z</dc:date>
    </item>
    <item>
      <title>Re: Forward Filtered Splunk Audit Events to Third-Party System</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Forward-Filtered-Splunk-Audit-Events-to-Third-Party-System/m-p/369262#M93342</link>
      <description>&lt;P&gt;I do see where I mis-stated the files don't exist, which was due to looking for &lt;CODE&gt;audittrail&lt;/CODE&gt; in the conf files, instead of &lt;CODE&gt;audit.log&lt;/CODE&gt;.  But, the point remains that the &lt;CODE&gt;.log&lt;/CODE&gt; file is not used to index the events, and therefore running props/transforms on them will require some form of tinkering.&lt;/P&gt;

&lt;P&gt;Thinking more about this now, I'm wondering if my previous comment about blacklisting &lt;CODE&gt;audit.log&lt;/CODE&gt; from the default monitor stanza, and creating a separate one would be the way to go here.  I'm also wondering what else that might break.&lt;/P&gt;</description>
      <pubDate>Mon, 12 Feb 2018 16:13:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Forward-Filtered-Splunk-Audit-Events-to-Third-Party-System/m-p/369262#M93342</guid>
      <dc:creator>micahkemp</dc:creator>
      <dc:date>2018-02-12T16:13:58Z</dc:date>
    </item>
  </channel>
</rss>

