<?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 Techniques for limiting size of windows event logs in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Techniques-for-limiting-size-of-windows-event-logs/m-p/17868#M2382</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;We currently have a number of servers that have the universal forwarder installed and set to forward to an Enterprise Splunk instance.  Unfortunately the security logs themselves are generating a massive amount of data.  We want to limit the data sent to Splunk, my understanding is we can use transforms etc to achieve this BUT this needs a heavy forwarder installed (i.e. a full Splunk installation).  I am not sure of the license implications for this.&lt;/P&gt;

&lt;P&gt;Does anyone here have any thoughts on ways around this one? I did think of maybe filtering the events in windows then exporting to a file and then picking it up but its a bit clunky.&lt;BR /&gt;
Maybe use another Windows Forwarder style app and then forward the event logs as syslog entries to Splunk.&lt;/P&gt;

&lt;P&gt;Would appreciate any thoughts/ideas?&lt;/P&gt;</description>
    <pubDate>Wed, 31 Oct 2012 00:27:57 GMT</pubDate>
    <dc:creator>mrflibbleuk</dc:creator>
    <dc:date>2012-10-31T00:27:57Z</dc:date>
    <item>
      <title>Techniques for limiting size of windows event logs</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Techniques-for-limiting-size-of-windows-event-logs/m-p/17868#M2382</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;We currently have a number of servers that have the universal forwarder installed and set to forward to an Enterprise Splunk instance.  Unfortunately the security logs themselves are generating a massive amount of data.  We want to limit the data sent to Splunk, my understanding is we can use transforms etc to achieve this BUT this needs a heavy forwarder installed (i.e. a full Splunk installation).  I am not sure of the license implications for this.&lt;/P&gt;

&lt;P&gt;Does anyone here have any thoughts on ways around this one? I did think of maybe filtering the events in windows then exporting to a file and then picking it up but its a bit clunky.&lt;BR /&gt;
Maybe use another Windows Forwarder style app and then forward the event logs as syslog entries to Splunk.&lt;/P&gt;

&lt;P&gt;Would appreciate any thoughts/ideas?&lt;/P&gt;</description>
      <pubDate>Wed, 31 Oct 2012 00:27:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Techniques-for-limiting-size-of-windows-event-logs/m-p/17868#M2382</guid>
      <dc:creator>mrflibbleuk</dc:creator>
      <dc:date>2012-10-31T00:27:57Z</dc:date>
    </item>
    <item>
      <title>Re: Techniques for limiting size of windows event logs</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Techniques-for-limiting-size-of-windows-event-logs/m-p/17869#M2383</link>
      <description>&lt;P&gt;Licensing is only applied to indexed data, so if you're using a heavy forwarded to perform transforms (pruning or otherwise) prior to being sent to the indexer you aren't consuming license bandwidth.&lt;/P&gt;</description>
      <pubDate>Wed, 31 Oct 2012 00:54:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Techniques-for-limiting-size-of-windows-event-logs/m-p/17869#M2383</guid>
      <dc:creator>pwattssplunk</dc:creator>
      <dc:date>2012-10-31T00:54:37Z</dc:date>
    </item>
    <item>
      <title>Re: Techniques for limiting size of windows event logs</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Techniques-for-limiting-size-of-windows-event-logs/m-p/17870#M2384</link>
      <description>&lt;P&gt;Heavy Forwards do not affect your license, indexing your data does.  You could configure you indexer to filter events using a transform, but thats added load on your indexer.  Not sure how good your coding skills are, but you could use a scripted input using powershell only collecting/filtering events that are important to you. I've done similar VB/Powershell scripts to pull events.&lt;/P&gt;

&lt;P&gt;The other painful exercise would be to work with your Windows Team to clean/fix all your Warns, denies, and errors. Whats the good of logging it if you are not going to fix it.&lt;/P&gt;

&lt;P&gt;If I am not mistaken you License cost should not occur untill you hit hte indexQueue.&lt;/P&gt;

&lt;P&gt;I could also post an old clunky VBs script to give you some ideas.&lt;/P&gt;

&lt;P&gt;Update:&lt;/P&gt;

&lt;P&gt;This a vb script I used years ago. Its not pretty by any standard but it the need.  Powershell would could be alot simpler. This provided as is.  Not my best work (little imbarrassed to show it) &lt;BR /&gt;
&lt;CODE&gt;&lt;/CODE&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;BR /&gt;
''''''Script Create By Bmacias84&lt;BR /&gt;
''''''Description: Using WMI Win32_NTLogEvent script searches last 5 minutes of Event logs that matches condition then print to log file eventlogerror.tsv.&lt;BR /&gt;
''''''Purpose: To detect any warning, errors, or events of interest&lt;BR /&gt;
''Win32_NTLogEVENT Class discription&lt;BR /&gt;
'  uint16   Category;&lt;BR /&gt;
'  string   CategoryString;&lt;BR /&gt;
'  string   ComputerName;&lt;BR /&gt;
'  uint8    Data[];&lt;BR /&gt;
'  uint16   EventCode;&lt;BR /&gt;
'  uint32   EventIdentifier;&lt;BR /&gt;
'  uint8    EventType;&lt;BR /&gt;
'  string   InsertionStrings[];&lt;BR /&gt;
'  string   Logfile;&lt;BR /&gt;
'  string   Message;&lt;BR /&gt;
'  uint32   RecordNumber;&lt;BR /&gt;
'  string   SourceName;&lt;BR /&gt;
'  datetime TimeGenerated;&lt;BR /&gt;
'  datetime TimeWritten;&lt;BR /&gt;
'  string   Type;&lt;BR /&gt;
'  string   User;&lt;BR /&gt;
Dim objWMIService, colSysEventLogs, colAppEventLogs, objRegEx, aEvent, sEvent, objFSO, objLogFile&lt;BR /&gt;
Dim arrMesssage&lt;BR /&gt;
Dim intDay, intMonth, intYear, intHour, intMin, intNow&lt;BR /&gt;
Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2")&lt;BR /&gt;
Set colSysEventLogs = objWMIService.ExecQuery("Select * from Win32_NTLogEvent Where Logfile = 'System'" )&lt;BR /&gt;
Set colAppEventLogs = objWMIService.ExecQuery("Select * from Win32_NTLogEvent Where Logfile = 'Application'" )&lt;BR /&gt;
Set objFSO = CreateObject("Scripting.FileSystemObject")&lt;BR /&gt;
If objFSO.FileExists("%logdir%\eventlogerror.tsv") = True Then&lt;BR /&gt;
    objFSO.DeleteFile "%logdir%\eventlogerror.tsv", True&lt;BR /&gt;
End If&lt;BR /&gt;
Set objLogFile = objFSO.OpenTextFile _&lt;BR /&gt;
    ("%logdir%\eventlogerror.tsv", 8, True) &lt;BR /&gt;
For Each sEvent In colSysEventLogs&lt;BR /&gt;
    intDay = Mid(sEvent.TimeWritten,7,2)&lt;BR /&gt;
    intMonth = Mid(sEvent.TimeWritten,5,2)&lt;BR /&gt;
    intYear = Mid(sEvent.TimeWritten,1,4)&lt;BR /&gt;
    intHour = Mid(sEvent.TimeWritten,9,2)&lt;BR /&gt;
    intMin = Mid(sEvent.TimeWritten,11,2)&lt;BR /&gt;
    intNow = Now()&lt;BR /&gt;
    If DateDiff("n",CDate(DateSerial(intYear,intMonth,intDay) &amp;amp; " " &amp;amp; TimeSerial(intHour,intMin,0)),intNow) &amp;lt; 5 Then&lt;BR /&gt;
        If (sEvent.SourceName = "W3SVC" And (sEvent.Type = "Warning" Or sEvent.Type = "Error")) Or (sEvent.SourceName = "IISCTLS" And (sEvent.EventCode = "6" Or sEvent.EventCode = "2" Or sEvent.EventCode = "4" Or sEvent.EventCode = "1")) Then&lt;BR /&gt;
            objLogFile.WriteLine(CDate(DateSerial(intYear,intMonth,intDay) &amp;amp; " " &amp;amp; TimeSerial(intHour,intMin,0)) &amp;amp; "," &amp;amp; sEvent.ComputerName &amp;amp; "," &amp;amp; sEvent.EventCode &amp;amp; "," &amp;amp;  sEvent.SourceName &amp;amp; "," &amp;amp; sEvent.Message)&lt;BR /&gt;
        Else&lt;BR /&gt;
            Set objRegEx = CreateObject("VBScript.RegExp")&lt;BR /&gt;
                objRegEx.Pattern = "C\+\+"&lt;BR /&gt;
                objRegEx.Global = True&lt;BR /&gt;
                objRegEx.IgnoreCase = True&lt;BR /&gt;
            Set arrMesssage = objRegEx.Execute(sEvent.Message)&lt;BR /&gt;
            If arrMesssage.Count &amp;gt; 0 Then&lt;BR /&gt;
                objLogFile.WriteLine(CDate(DateSerial(intYear,intMonth,intDay) &amp;amp; " " &amp;amp; TimeSerial(intHour,intMin,0)) &amp;amp; "," &amp;amp; sEvent.ComputerName &amp;amp; "," &amp;amp; sEvent.EventCode &amp;amp; "," &amp;amp;  sEvent.SourceName &amp;amp; ","  &amp;amp; sEvent.Message)&lt;BR /&gt;
            Else&lt;BR /&gt;
            End If&lt;BR /&gt;
        End If&lt;BR /&gt;
    Else&lt;BR /&gt;
        Exit For&lt;BR /&gt;
    End If&lt;BR /&gt;
Next&lt;BR /&gt;
For Each aEvent In colAppEventLogs&lt;BR /&gt;
    intDay = Mid(aEvent.TimeWritten,7,2)&lt;BR /&gt;
    intMonth = Mid(aEvent.TimeWritten,5,2)&lt;BR /&gt;
    intYear = Mid(aEvent.TimeWritten,1,4)&lt;BR /&gt;
    intHour = Mid(aEvent.TimeWritten,9,2)&lt;BR /&gt;
    intMin = Mid(aEvent.TimeWritten,11,2)&lt;BR /&gt;
    intNow = Now()&lt;BR /&gt;
    If DateDiff("n",CDate(DateSerial(intYear,intMonth,intDay) &amp;amp; " " &amp;amp; TimeSerial(intHour,intMin,0)),intNow) &amp;lt; 5 Then&lt;BR /&gt;
        If (aEvent.SourceName = "NET" Or aEvent.SourceName = "ASP.NET 2.0.xxxx") And (aEvent.Type = "Warning" Or aEvent.Type = "Error") Then&lt;BR /&gt;
            objLogFile.WriteLine(CDate(DateSerial(intYear,intMonth,intDay) &amp;amp; " " &amp;amp; TimeSerial(intHour,intMin,0)) &amp;amp; "," &amp;amp; aEvent.ComputerName &amp;amp; "," &amp;amp; aEvent.EventCode &amp;amp; "," &amp;amp;  aEvent.SourceName &amp;amp; "," &amp;amp; aEvent.Message)&lt;BR /&gt;
        End If&lt;BR /&gt;
    Else&lt;BR /&gt;
        Exit For&lt;BR /&gt;
    End If&lt;BR /&gt;
Next&lt;BR /&gt;
objLogFile.Close&lt;BR /&gt;
&lt;/CODE&gt;&lt;/PRE&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 31 Oct 2012 00:55:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Techniques-for-limiting-size-of-windows-event-logs/m-p/17870#M2384</guid>
      <dc:creator>bmacias84</dc:creator>
      <dc:date>2012-10-31T00:55:11Z</dc:date>
    </item>
    <item>
      <title>Re: Techniques for limiting size of windows event logs</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Techniques-for-limiting-size-of-windows-event-logs/m-p/17871#M2385</link>
      <description>&lt;P&gt;Unfortunately I am not good at coding so any help would be much appreciated. I am pretty new to Splunk as well so apologies for any daft questions.&lt;/P&gt;

&lt;P&gt;So the info I have seen around modifying props.conf and transforms.conf to limit event logs that are sent will only work on indexed data? therefore requiring a license?&lt;/P&gt;</description>
      <pubDate>Wed, 31 Oct 2012 01:01:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Techniques-for-limiting-size-of-windows-event-logs/m-p/17871#M2385</guid>
      <dc:creator>mrflibbleuk</dc:creator>
      <dc:date>2012-10-31T01:01:56Z</dc:date>
    </item>
    <item>
      <title>Re: Techniques for limiting size of windows event logs</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Techniques-for-limiting-size-of-windows-event-logs/m-p/17872#M2386</link>
      <description>&lt;P&gt;Modifying the Props.conf and transforms.conf will work on data currently making its way to the indexqueue, but not on data that has been indexed already, might need to double check. &lt;A href="http://docs.splunk.com/Documentation/Splunk/5.0/Indexer/Howindexingworks"&gt;http://docs.splunk.com/Documentation/Splunk/5.0/Indexer/Howindexingworks&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Alternatively you could configure a Heavy Intermediate forwarder to recieve Universal Forwarder data. The Heavy Intermediate Forwarder would filter the data and send it to your indexer. &lt;A href="http://docs.splunk.com/Documentation/Splunk/5.0/Deploy/Forwarderdeploymenttopologies#Intermediate_forwarding"&gt;http://docs.splunk.com/Documentation/Splunk/5.0/Deploy/Forwarderdeploymenttopologies#Intermediate_forwarding&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 31 Oct 2012 01:09:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Techniques-for-limiting-size-of-windows-event-logs/m-p/17872#M2386</guid>
      <dc:creator>bmacias84</dc:creator>
      <dc:date>2012-10-31T01:09:57Z</dc:date>
    </item>
  </channel>
</rss>

