<?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 How to identify /var/log/secure from the syslog feed using REX? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-identify-var-log-secure-from-the-syslog-feed-using-REX/m-p/586036#M103056</link>
    <description>&lt;P&gt;We are getting /var/log files monitored from the endpoints and sent to Splunk using syslog-ng on a single TCP port. Now when we see the vents in Splunk its combination of all the /var/log/secure, /var/log/messages etc. into a single index and syslog source type.&lt;/P&gt;
&lt;P&gt;How can I identify just the /var/log/secure of out it and send to a other index from Splunk side? I am trying make use of props like below but not sure what the regex would be for identifying just /var/log/secure. Any help is appreciated.&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;####props&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;[linux_secure]&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;SOURCE_KEY&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;_raw&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;REGEX&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;= ***Need REX for /var/log/secure events****&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;DEST_KEY&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;_MetaData:Index&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;FORMAT&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;abc_index&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;/DIV&gt;</description>
    <pubDate>Wed, 23 Feb 2022 17:44:02 GMT</pubDate>
    <dc:creator>arangineni</dc:creator>
    <dc:date>2022-02-23T17:44:02Z</dc:date>
    <item>
      <title>How to identify /var/log/secure from the syslog feed using REX?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-identify-var-log-secure-from-the-syslog-feed-using-REX/m-p/586036#M103056</link>
      <description>&lt;P&gt;We are getting /var/log files monitored from the endpoints and sent to Splunk using syslog-ng on a single TCP port. Now when we see the vents in Splunk its combination of all the /var/log/secure, /var/log/messages etc. into a single index and syslog source type.&lt;/P&gt;
&lt;P&gt;How can I identify just the /var/log/secure of out it and send to a other index from Splunk side? I am trying make use of props like below but not sure what the regex would be for identifying just /var/log/secure. Any help is appreciated.&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;####props&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;[linux_secure]&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;SOURCE_KEY&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;_raw&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;REGEX&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;= ***Need REX for /var/log/secure events****&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;DEST_KEY&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;_MetaData:Index&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;FORMAT&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;abc_index&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Wed, 23 Feb 2022 17:44:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-identify-var-log-secure-from-the-syslog-feed-using-REX/m-p/586036#M103056</guid>
      <dc:creator>arangineni</dc:creator>
      <dc:date>2022-02-23T17:44:02Z</dc:date>
    </item>
    <item>
      <title>Re: Identifying /var/log/secure from the syslog feed using REX</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-identify-var-log-secure-from-the-syslog-feed-using-REX/m-p/586047#M103059</link>
      <description>&lt;P&gt;Both data is getting logged in different files (source), so you can override index name using following source (index time configuration, must be set on instance where parsing happens)&lt;/P&gt;&lt;P&gt;props.conf&lt;/P&gt;&lt;PRE&gt;[source::&lt;SPAN&gt;/var/log/secure&lt;/SPAN&gt;]
TRANSFORMS-index-linux_secure = index_linux_secure&lt;/PRE&gt;&lt;P&gt;transforms.conf&lt;/P&gt;&lt;PRE&gt; [index_linux_secure]&lt;BR /&gt; SOURCE_KEY = _raw &lt;BR /&gt; REGEX = . &lt;BR /&gt; DEST_KEY = _MetaData:Index &lt;BR /&gt; FORMAT = abc_index&amp;nbsp;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Feb 2022 14:44:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-identify-var-log-secure-from-the-syslog-feed-using-REX/m-p/586047#M103059</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2022-02-22T14:44:37Z</dc:date>
    </item>
    <item>
      <title>Re: Identifying /var/log/secure from the syslog feed using REX</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-identify-var-log-secure-from-the-syslog-feed-using-REX/m-p/586049#M103060</link>
      <description>&lt;P&gt;Actually we DONT have source separation as well.&lt;/P&gt;&lt;P&gt;All the data is through syslog and source name is defined to a static name in our input. Basically source as syslog_feed and source type as syslog, that is where the challenging piece is. I need to now know the pattern for the secure logs and make use of the REGEX&lt;/P&gt;</description>
      <pubDate>Tue, 22 Feb 2022 14:50:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-identify-var-log-secure-from-the-syslog-feed-using-REX/m-p/586049#M103060</guid>
      <dc:creator>arangineni</dc:creator>
      <dc:date>2022-02-22T14:50:40Z</dc:date>
    </item>
    <item>
      <title>Re: Identifying /var/log/secure from the syslog feed using REX</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-identify-var-log-secure-from-the-syslog-feed-using-REX/m-p/586287#M103075</link>
      <description>&lt;P&gt;You are not giving us enough information to give you a good answer.&amp;nbsp; I agree with&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/15147"&gt;@somesoni2&lt;/a&gt;&amp;nbsp;so far.&amp;nbsp; The &lt;STRONG&gt;/var/log/secure&lt;/STRONG&gt; stuff is a file in a path and surely you are picking it up using a &lt;STRONG&gt;Splunk UF on that box&lt;/STRONG&gt;, right?&amp;nbsp; If so, EVEN IF you are doing an override of the &lt;STRONG&gt;source&lt;/STRONG&gt; field, at the point that the UF is picking up the file, the original &lt;STRONG&gt;source &lt;/STRONG&gt;value will exist and if you deploy his configurations as laid out to the UF, it should work.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Feb 2022 17:31:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-identify-var-log-secure-from-the-syslog-feed-using-REX/m-p/586287#M103075</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2022-02-23T17:31:09Z</dc:date>
    </item>
    <item>
      <title>Re: Identifying /var/log/secure from the syslog feed using REX</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-identify-var-log-secure-from-the-syslog-feed-using-REX/m-p/586288#M103076</link>
      <description>&lt;P&gt;In case I did not make it clear,&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/15147"&gt;@somesoni2&lt;/a&gt;&amp;nbsp;was correct about everything EXCEPT where to deploy the configuration change.&amp;nbsp; It must be on the UF, not the Indexers.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Feb 2022 17:32:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-identify-var-log-secure-from-the-syslog-feed-using-REX/m-p/586288#M103076</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2022-02-23T17:32:23Z</dc:date>
    </item>
    <item>
      <title>Re: Identifying /var/log/secure from the syslog feed using REX</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-identify-var-log-secure-from-the-syslog-feed-using-REX/m-p/586289#M103077</link>
      <description>&lt;P&gt;Assuming that you are using a Splunk UF, deploy this configuration to it:&lt;/P&gt;&lt;P&gt;props.conf&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[source::/var/log/secure]
index=YourIndexNameHere&lt;/LI-CODE&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Feb 2022 17:35:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-identify-var-log-secure-from-the-syslog-feed-using-REX/m-p/586289#M103077</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2022-02-23T17:35:02Z</dc:date>
    </item>
    <item>
      <title>Re: Identifying /var/log/secure from the syslog feed using REX</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-identify-var-log-secure-from-the-syslog-feed-using-REX/m-p/586291#M103078</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/1406"&gt;@woodcock&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/15147"&gt;@somesoni2&lt;/a&gt;&amp;nbsp;Here is more context:&lt;/P&gt;&lt;P&gt;Actually our setup flow is little different LIKE below. We are NOT using UF in out setup.&lt;/P&gt;&lt;P&gt;Endpoints(Includes all network appliances and Linux servers etc..)&amp;nbsp; ---&amp;gt; Central syslog-ng ---&amp;gt; Sending to Splunk HF on a TCP Port(At this point we have TCP input setup with sourcetype as syslog and source as syslog_feed).&lt;/P&gt;&lt;P&gt;Unfortunately we don't have option to install Splunk UF on syslog-ng and only way we can receive data is through TCP port onto Splunk HF&lt;/P&gt;&lt;P&gt;My requirement now is identify /var/log/secure events out of the whole feed send to a different index based on the event format using REGEX. Is there a specific Regex that can identify all the secure logs that I can use in my transforms below.&lt;/P&gt;&lt;DIV&gt;&lt;SPAN&gt;[linux_secure]&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;SOURCE_KEY&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;_raw&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;REGEX&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;= ***Need REX to identify /var/log/secure events****&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;DEST_KEY&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;_MetaData:Index&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;FORMAT&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;abc_index&lt;/SPAN&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Feb 2022 17:50:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-identify-var-log-secure-from-the-syslog-feed-using-REX/m-p/586291#M103078</guid>
      <dc:creator>arangineni</dc:creator>
      <dc:date>2022-02-23T17:50:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to identify /var/log/secure from the syslog feed using REX?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-identify-var-log-secure-from-the-syslog-feed-using-REX/m-p/586310#M103079</link>
      <description>&lt;P&gt;You can't match entries _from a given sourcefile_ just by regex on its contents. Especially that /var/log/secure can contain many different kinds of events.&lt;/P&gt;&lt;P&gt;You could try matching on specific program names but I wouldn't be so sure you can do a 1-1 mapping and that those programs don't also write to other logs.&lt;/P&gt;&lt;P&gt;Unfortunately, since you're pushing all events into a single logical stream you need - as you noticed yourself - another way of (de)multiplexing them. You could add the source filename or some identifier serving the same purpose on the sending syslog and then you'd have to "unpack" it and strip it from the event on the receiving end. I do this in my multi-layered rsyslog-based solution where I pass additional metadata between syslog servers on top of the event data itself.&lt;/P&gt;&lt;P&gt;But it's not as simple as "match this regex".&lt;/P&gt;&lt;P&gt;EDIT: OK, you could try to match your syslog rules sending various facility.priority combinations to different files to match the &amp;lt;PRI&amp;gt; header in your syslog events.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Feb 2022 20:37:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-identify-var-log-secure-from-the-syslog-feed-using-REX/m-p/586310#M103079</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2022-02-23T20:37:35Z</dc:date>
    </item>
    <item>
      <title>Re: Identifying /var/log/secure from the syslog feed using REX</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-identify-var-log-secure-from-the-syslog-feed-using-REX/m-p/586311#M103080</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/1406"&gt;@woodcock&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/15147"&gt;@somesoni2&lt;/a&gt; You're too fixed on this UF part &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/236211"&gt;@arangineni&lt;/a&gt;is _not_ using UF on the source machine. He's using some local syslog daemon that's sending the events from various local files to remote destination (in this case - to Splunk). I'd even risk a guess that he's not reading the files' contents, because that would be counterproductive, but rather sending the events as an additional action to writing to the local file.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Feb 2022 20:35:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-identify-var-log-secure-from-the-syslog-feed-using-REX/m-p/586311#M103080</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2022-02-23T20:35:40Z</dc:date>
    </item>
  </channel>
</rss>

