Coder Social home page Coder Social logo

bitpulse / logstash-windows-eventlog Goto Github PK

View Code? Open in Web Editor NEW

This project forked from randomvariable/logstash-windows-eventlog

0.0 2.0 0.0 2.61 MB

An input plugin for Logstash which supports the newer ETW logging format.

C# 76.82% Smalltalk 6.02% Ruby 9.72% PowerShell 7.44%

logstash-windows-eventlog's Introduction

logstash-windows-eventlog

An input plugin for Logstash which supports the newer ETW logging format.

NOTICE

This current implementation is a hack job of Ruby meets Java meets COM meets .NET. This is less than ideal. I'm intending to replace this with a pure .NET implementation of the LumberJack protocol. Your comments are appreciated here

##To Install ###Requirements a) .NET Framework 4.5 ###Steps

  1. Run c:\windows\Microsoft.NET\Framework64\v4.0.30319\MSBuild
  2. Get and install PowerShell GAC from http://powershellgac.codeplex.com/
  3. Copy the DLLs to a useful place and register the binaries:
  4. Using Powershell GAC, run:
    1. Add-GacAssembly -Path Logstash.Windows.EventLog.Com.dll
    2. Add-GacAssembly -Path Newtonsoft.Json.dll You'll need to get this from the packages directory.
  5. c:\windows\Microsoft.NET\Framework64\v4.0.30319\RegAsm.exe "Logstash.Windows.EventLog.Com.dll"
  6. Copy the contents of logstash-windows-eventlog\plugin to Logstash's plugin directory.

Parameters

  • log_files - An array of logs to collect, all simply "all" to capture all enabled event logs.

    To get the name of an event log, use the following PowerShell command:

      Get-WinEvent -ListLog *
    
  • filter - A string representation of an xPath query that can filter events before being processed by Logstash.

  • log_type - What type of logs are being processed? A string of either 'LogName' or 'FilePath'.

    • LogName - The name of an event log.

    • FilePath - The filename of an evtx file.

Examples

To collect all registered event logs, use the following config:

input {
  windowseventlog {}
}

To collect events from just Hyper-V, use a config like :

input {
  windowseventlog {
  log_files  => ['Microsoft-Windows-Hyper-V-Hypervisor-Operational','Microsoft-Windows-Hyper-V-Config-Admin']
}

Let's capture some IIS tracing logs (from AppFabric or some such):

input {
windowseventlog {
  log_files => ['C:\inetpub\logs\tracing\evt.evtx']
  log_type  => 'FilePath'
}

Capture all logs, but filter for only a certain system event ID using an xPath query:

input {
windowseventlog {
  filter => "*[System[(EventID=2202)]]"
}

Why a new event log plugin?

The author wanted to consolidate logs from Windows servers using Group Policy and WS-MAN. All these logs go into the "Forwarded Events" section, which can't be ingested by Logstash. This plugin has been tested to capture at least 2000 events per second on a quad-core Core i5, with CPU of around 1.2 cores.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.