logstash--collecting Windows logs using Ngxlog

Source: Internet
Author: User
Tags logstash

Collection process 1nxlog = 2logstash + 3elasticsearch

1. Nxlog Use module Im_file to collect log files, turn on location recording function

2. Nxlog using the module TCP output log

3. Logstash use INPUT-TCP, collect logs, and format, output to ES

The Nxlog configuration file above windows

Nxlog.conf

1234567891011121314151617181920212223242526272829303132333435363738394041 ## This is a sample configuration file. See the nxlog reference manual about the## configuration options. It should be installed locally and is also available## online at http://nxlog.org/nxlog-docs/en/nxlog-reference-manual.html ## Please set the ROOT to the folder your nxlog was installed into,## otherwise it will not start. #define ROOT C:\Program Files\nxlogdefine ROOT C:\Program Files (x86)\nxlog  Moduledir %ROOT%\modulesCacheDir %ROOT%\dataPidfile %ROOT%\data\nxlog.pidSpoolDir %ROOT%\dataLogFile %ROOT%\data\nxlog.log #<Input in>#    Module      im_msvistalog# For windows 2003 and earlier use the following:#   Module      im_mseventlog#</Input> <Input testfile> Module im_file File "C:\\test\\\*.log" SavePos TRUE  # Include JSON and raw formats# Exec $Message = to_json() + " " + $raw_event;</Input>  <Output out>    Module      om_tcp    Host        10.8.210.29    Port        514</Output>  <Route 1>    Path        testfile => out</Route>

Logstash Startup configuration file

Logstash.conf

1234567891011121314151617 input {    tcp {      port => 514  }}filter {    json {    source=> "message"  }}output{    elasticsearch  {      host => "127.0.0.1"      port => "9200"      protocol => "http"  }}

 

logstash--collecting Windows logs using Ngxlog

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.