<?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: looking to replace a custom python syslog filter in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/looking-to-replace-a-custom-python-syslog-filter/m-p/70475#M3783</link>
    <description>&lt;P&gt;Hey &lt;EM&gt;d&lt;/EM&gt; would the internal regex macro be constructed with the answer i posted in ? &lt;A href="http://splunk-base.splunk.com/answers/49995/looking-to-replace-a-custom-python-syslog-filter"&gt;http://splunk-base.splunk.com/answers/49995/looking-to-replace-a-custom-python-syslog-filter&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 16 Jul 2012 22:38:48 GMT</pubDate>
    <dc:creator>sonicZ</dc:creator>
    <dc:date>2012-07-16T22:38:48Z</dc:date>
    <item>
      <title>looking to replace a custom python syslog filter</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/looking-to-replace-a-custom-python-syslog-filter/m-p/70472#M3780</link>
      <description>&lt;P&gt;Hello Currently we have a Network operations dashboard that displays charted logs from routers/switches/firewalls syslog messages, we use this as our primary network alert dashboard.&lt;/P&gt;

&lt;P&gt;We are using a python script with a few hundred lines of regex strings to basically scrape over all incoming log alerts from our "net" index and only display log events NOT matching  these filters. &lt;BR /&gt;
So one of our searches is as follows, the "netcritical" is our python script that is streaming log events to filter out from Splunk results. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=net | netcritical | search netcritical=true | timechart limit=0 useother=f c by host | rename c as "Alert Count"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;In this way we see any legitimate alerts and new alerts from various devices that we were not looking for but filter out logs that are noisy/we dont care about.&lt;/P&gt;

&lt;P&gt;It's worked well in our environment so far but it's not scaling well as we increase the amount of network devices writing to syslog. Our dashboard is taking a long time to load as it's parsing far too many logs.&lt;/P&gt;

&lt;P&gt;Can anyone offer some suggestions on the best way to replace this filter? &lt;BR /&gt;
We want to keep everything in the same "net" for log consistency but looking for alternate solutions within Splunk.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jun 2012 23:06:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/looking-to-replace-a-custom-python-syslog-filter/m-p/70472#M3780</guid>
      <dc:creator>sonicZ</dc:creator>
      <dc:date>2012-06-07T23:06:16Z</dc:date>
    </item>
    <item>
      <title>Re: looking to replace a custom python syslog filter</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/looking-to-replace-a-custom-python-syslog-filter/m-p/70473#M3781</link>
      <description>&lt;P&gt;It looks like the filter is the bottleneck in your pipeline. Not knowing what the script looks like, I would suggest the following: &lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;revisit the script and look for improvement in regexes. In particular check for quantifiers that will make your regexes backtrack a lot and see if they can be re-written using possessive quantifiers and/or atomic groups instead.&lt;/LI&gt;
&lt;LI&gt;try replacing your script with a &lt;CODE&gt;regex&lt;/CODE&gt; macro and see if splunk's internal regex evaluation engine performs faster than the scripted filter&lt;/LI&gt;
&lt;LI&gt;use summary indexing populated by searches that run more frequently but over shorter periods of times so as to amortize the cost&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;Hope this helps, &lt;/P&gt;</description>
      <pubDate>Sun, 10 Jun 2012 04:18:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/looking-to-replace-a-custom-python-syslog-filter/m-p/70473#M3781</guid>
      <dc:creator>_d_</dc:creator>
      <dc:date>2012-06-10T04:18:00Z</dc:date>
    </item>
    <item>
      <title>Re: looking to replace a custom python syslog filter</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/looking-to-replace-a-custom-python-syslog-filter/m-p/70474#M3782</link>
      <description>&lt;P&gt;I think the regex's could definitely be improved, i do like the idea of summary indexing and using shorter period searches.&lt;/P&gt;

&lt;P&gt;I am thinking of creating an eventtype with all the various log events, and then having the dashboard show events NOT &lt;EVENTTYPE name=""&gt;&lt;BR /&gt;
Not sure how well that will perform but it would at least be relying on the splunk search commands rather then a external python script scraping millions of events.&lt;/EVENTTYPE&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Jul 2012 17:59:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/looking-to-replace-a-custom-python-syslog-filter/m-p/70474#M3782</guid>
      <dc:creator>sonicZ</dc:creator>
      <dc:date>2012-07-13T17:59:35Z</dc:date>
    </item>
    <item>
      <title>Re: looking to replace a custom python syslog filter</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/looking-to-replace-a-custom-python-syslog-filter/m-p/70475#M3783</link>
      <description>&lt;P&gt;Hey &lt;EM&gt;d&lt;/EM&gt; would the internal regex macro be constructed with the answer i posted in ? &lt;A href="http://splunk-base.splunk.com/answers/49995/looking-to-replace-a-custom-python-syslog-filter"&gt;http://splunk-base.splunk.com/answers/49995/looking-to-replace-a-custom-python-syslog-filter&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Jul 2012 22:38:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/looking-to-replace-a-custom-python-syslog-filter/m-p/70475#M3783</guid>
      <dc:creator>sonicZ</dc:creator>
      <dc:date>2012-07-16T22:38:48Z</dc:date>
    </item>
  </channel>
</rss>

