<?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 to filter syslog event level? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-filter-syslog-event-level/m-p/477915#M82018</link>
    <description>&lt;P&gt;See below for the WTI Syslog that send to Splunk.&lt;BR /&gt;
I would like to see if I can filter by Syslog Severity level.  I've no idea how to search for syslog Severity level in Splunk.&lt;/P&gt;

&lt;P&gt;Nov 12 12:02:17 192.168.100.220 1 2019-11-12T12:00:24-08:00 CPM-1600-1-ECM server - - [meta sequenceId="196" enterpriseId="2634.1.17.16" vendorId="WTI"] CPM: CPM-1600-1-ECM, (AUDIT LOG) DATE-TIME: 11/12/19 12:00:24, USERNAME: SR-Turn-OFF-Odd          Turn OFF plug B7&lt;/P&gt;

&lt;P&gt;Nov 12 08:02:21 192.168.100.220 1 2019-11-12T08:00:28-08:00 CPM-1600-1-ECM server - - [meta sequenceId="186" enterpriseId="2634.1.17.16" vendorId="WTI"] CPM: CPM-1600-1-ECM, (AUDIT LOG) DATE-TIME: 11/12/19 08:00:28, USERNAME: SR-Reboot-Odd-Plug       BOOT plug B3&lt;/P&gt;</description>
    <pubDate>Tue, 12 Nov 2019 21:13:38 GMT</pubDate>
    <dc:creator>matoulas</dc:creator>
    <dc:date>2019-11-12T21:13:38Z</dc:date>
    <item>
      <title>How to filter syslog event level?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-filter-syslog-event-level/m-p/477913#M82016</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I've configured WTI device syslog to send to Splunk. &lt;BR /&gt;
I can see all the syslog activity is there in Splunk Event.  &lt;/P&gt;

&lt;P&gt;My question is how do I filter syslog event level in Splunk- like syslog severity from WTI Event?&lt;/P&gt;

&lt;P&gt;Example: &lt;BR /&gt;
&lt;STRONG&gt;0 - Emergency, 1 - Alert, 2 - Critical, 3 - Error, 4 - Warning, 5 - notification, 6 - information and 7 - debugging.&lt;/STRONG&gt; &lt;/P&gt;

&lt;P&gt;Looking forward to your help.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Nov 2019 18:37:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-filter-syslog-event-level/m-p/477913#M82016</guid>
      <dc:creator>matoulas</dc:creator>
      <dc:date>2019-11-08T18:37:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter syslog event level?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-filter-syslog-event-level/m-p/477914#M82017</link>
      <description>&lt;P&gt;Hi matoulas,&lt;BR /&gt;
as you can read at &lt;A href="https://docs.splunk.com/Documentation/Splunk/8.0.0/Forwarding/Routeandfilterdatad"&gt;https://docs.splunk.com/Documentation/Splunk/8.0.0/Forwarding/Routeandfilterdatad&lt;/A&gt; , to filter data you have to find the regex to identify logs to discard.&lt;BR /&gt;
In other words, if in your logs with sourcetype=my_sourcetype you have something like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;2019-11-09 12:05:59 10.10.10.10 my_host 2 message yf uif ouyf ouyf ouyf opiyf uo pgu pyi  yf yif i piyf puig piuf piuf pu pif piuf piyf 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;where the number after the hostname is the event level to use for filtering and you want to delete all the events with level=6 or 7, you have to find a regex like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;^\d+-\d+-\d+\s+\d+:\d+:\d+\s\d+\.\d+\.\d+\.\d+\s\w+\s([6-7])
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;that you can test at &lt;A href="https://regex101.com/r/UZRO64/1"&gt;https://regex101.com/r/UZRO64/1&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Then you have to put on your indexers in props.conf file the following stanza:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[my_sourcetype]
TRANSFORMS-null = setnull
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and in transforms.conf file the following stanza:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[setnull]
REGEX = ^\d+-\d+-\d+\s+\d+:\d+:\d+\s\d+\.\d+\.\d+\.\d+\s\w+\s([6-7])
DEST_KEY = queue
FORMAT = nullQueue
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Then you have to restart Splunk on Indexers.&lt;BR /&gt;
In this way the logs that match the above regex will be deleted.&lt;/P&gt;

&lt;P&gt;If you use an Heavy Forwarder to ingest syslogs, you have to put the above props.conf and transforms.conf on the Heavy Forwarder instead that on Indexer.&lt;/P&gt;

&lt;P&gt;If you can share a sample of your logs, I could help you better to find the correct regex.&lt;/P&gt;

&lt;P&gt;Ciao.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Sat, 09 Nov 2019 11:19:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-filter-syslog-event-level/m-p/477914#M82017</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2019-11-09T11:19:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter syslog event level?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-filter-syslog-event-level/m-p/477915#M82018</link>
      <description>&lt;P&gt;See below for the WTI Syslog that send to Splunk.&lt;BR /&gt;
I would like to see if I can filter by Syslog Severity level.  I've no idea how to search for syslog Severity level in Splunk.&lt;/P&gt;

&lt;P&gt;Nov 12 12:02:17 192.168.100.220 1 2019-11-12T12:00:24-08:00 CPM-1600-1-ECM server - - [meta sequenceId="196" enterpriseId="2634.1.17.16" vendorId="WTI"] CPM: CPM-1600-1-ECM, (AUDIT LOG) DATE-TIME: 11/12/19 12:00:24, USERNAME: SR-Turn-OFF-Odd          Turn OFF plug B7&lt;/P&gt;

&lt;P&gt;Nov 12 08:02:21 192.168.100.220 1 2019-11-12T08:00:28-08:00 CPM-1600-1-ECM server - - [meta sequenceId="186" enterpriseId="2634.1.17.16" vendorId="WTI"] CPM: CPM-1600-1-ECM, (AUDIT LOG) DATE-TIME: 11/12/19 08:00:28, USERNAME: SR-Reboot-Odd-Plug       BOOT plug B3&lt;/P&gt;</description>
      <pubDate>Tue, 12 Nov 2019 21:13:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-filter-syslog-event-level/m-p/477915#M82018</guid>
      <dc:creator>matoulas</dc:creator>
      <dc:date>2019-11-12T21:13:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter syslog event level?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-filter-syslog-event-level/m-p/477916#M82019</link>
      <description>&lt;P&gt;Hi @matoulas,&lt;BR /&gt;
I don't know your logs, so what's the Syslog Severity level in your logs?&lt;BR /&gt;
if it's the first number after date and IP address, you can use this regex:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;^\w+\s+\d+\s+\d+:\d+:\d+\s\d+\.\d+\.\d+\.\d+\s([6-7])
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;that you can test at &lt;A href="https://regex101.com/r/UZRO64/2"&gt;https://regex101.com/r/UZRO64/2&lt;/A&gt;&lt;BR /&gt;
Ciao.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Wed, 13 Nov 2019 08:11:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-filter-syslog-event-level/m-p/477916#M82019</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2019-11-13T08:11:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter syslog event level?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-filter-syslog-event-level/m-p/477917#M82020</link>
      <description>&lt;P&gt;Updated I got it to work by set no_priority_stripping=true in input.conf in Splunk server and after install syslog priority filed decoder / lookup. I now be able to filter my severity level as I want.&lt;BR /&gt;
&lt;A href="https://splunkbase.splunk.com/app/736/" target="_blank"&gt;https://splunkbase.splunk.com/app/736/&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Thanks,&lt;BR /&gt;
Matoula Senethavong&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 02:57:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-filter-syslog-event-level/m-p/477917#M82020</guid>
      <dc:creator>matoulas</dc:creator>
      <dc:date>2020-09-30T02:57:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter syslog event level?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-filter-syslog-event-level/m-p/477918#M82021</link>
      <description>&lt;P&gt;You should not be sending syslog directly to Splunk.  You should setup a &lt;CODE&gt;syslog-ng&lt;/CODE&gt; server for this purpose:&lt;BR /&gt;
&lt;A href="http://www.georgestarcher.com/splunk-success-with-syslog/"&gt;http://www.georgestarcher.com/splunk-success-with-syslog/&lt;/A&gt;&lt;BR /&gt;
As far as how to set it up, probably the best (and very new option) is here:&lt;BR /&gt;
&lt;A href="https://www.splunk.com/en_us/blog/tips-and-tricks/splunk-connect-for-syslog-turnkey-and-scalable-syslog-gdi.html"&gt;https://www.splunk.com/en_us/blog/tips-and-tricks/splunk-connect-for-syslog-turnkey-and-scalable-syslog-gdi.html&lt;/A&gt;&lt;BR /&gt;
Now, once all that is done, you should do ALL of your filtering in &lt;CODE&gt;syslog-ng&lt;/CODE&gt;, not Splunk.&lt;/P&gt;</description>
      <pubDate>Sun, 17 Nov 2019 01:14:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-filter-syslog-event-level/m-p/477918#M82021</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-11-17T01:14:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter syslog event level?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-filter-syslog-event-level/m-p/477919#M82022</link>
      <description>&lt;P&gt;Thanks got it to work now.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Dec 2019 17:18:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-filter-syslog-event-level/m-p/477919#M82022</guid>
      <dc:creator>matoulas</dc:creator>
      <dc:date>2019-12-11T17:18:55Z</dc:date>
    </item>
  </channel>
</rss>

