Filebeat-1-Unicom Logstash

Source: Internet
Author: User
Tags logstash filebeat

Filebeat is a log file shipping tool, after you install the client on your server, the Filebeat will monitor the log directory or the specified log file, trace the files (tracking file changes, non-stop reading), And forwards these messages to Elasticsearch or Logstarsh.

When you turn on the Filebeat program, it launches one or more probes (prospectors) to detect the log directory or file you specify, and for each log file that the probe finds, Filebeat starts the harvesting process (harvester), Each harvest process reads the new contents of a log file and sends these new log data to the handler (spooler), which the handler aggregates these events, and finally Filebeat sends the collection of data to the location you specify.

Installation configuration:

The installation configuration of the filebeat is very simple

1, download

The version used here is 5.5.2

2, define the log path configuration

Go to the Decompression directory and modify the FILEBEAT.YML

- Input_type:log  # Paths that should is crawled and fetched. Glob based paths.  Paths:    -/var/log/nginx/*. Log    #-c:\programdata\elasticsearch\logs\*  # Exclude_lines: ["^dbg"]  #include_lines: ["^err", "^warn"]

Multiple paths can be configured here, and filtering with regular log extraction

3, output log path:

Filebeat output can be available in multiple destinations, ES, Logstash

Elasticsearch

#--------------------------Elasticsearch output------------------------------#output. Elasticsearch:  # Array of hosts to connect to. # hosts: ["localhost:9200"]  # Optional protocol and Basic auth credentials.   "https" "elastic"      " Changeme "

Logstash

#-----------------------------Logstash Output--------------------------------output.logstash:  # The Logstash hosts  hosts: ["www.wenbronk.com:5044"]
4, Start Logstash
Nohup./filebeat-c./filebeat.yml &
Logstash and Filebeat Connectivity:

Here we take the Nginx log for example, Nginx installation can be seen:

Http://www.cnblogs.com/wenbronk/p/6557482.html

1. Configure Logstash and start
input {    beats {        "5044"    }}output {    stdout {        = = rubydebug    }}

Start:

2. Configure Filebeat and start
' ^$ ' ' # '

3, then the browser is accessed, that is, you can see the output of the Logstash console, proving the connectivity

Reference: http://www.ywnds.com/?p=9776

Filebeat-1-Unicom Logstash

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.