beats install

beats

1
2
3
4
5
6
7
8
9
10
11
12
13
Beats:
Lightweight Data Shippers
Beats is the platform for single-purpose data shippers. They install as lightweight agents and send data from hundreds or thousands of machines to Logstash or Elasticsearch.

The Beats Family:
1.Filebeat
Forget using SSH when you have tens, hundreds, or even thousands of servers, virtual machines, and containers generating logs. Filebeat helps you keep the simple things simple by offering a lightweight way to forward and centralize logs and files.
2.Metricsbeat
Collect metrics from your systems and services. From CPU to memory, Redis to Nginx, and much more, Metricbeat is a lightweight way to send system statistics.
3.Packetbeat
Know what’s going on across your applications by tapping into data traveling over the wire. Packetbeat is a lightweight network packet analyzer that sends data to Logstash or Elasticsearch.
4.Winlogbeat
Keep a pulse on what’s happening across your Windows-based infrastructure. Winlogbeat live streams Windows event logs to Elasticsearch and Logstash in a lightweight way.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
例子:
filebeat.yml:
filebeat.prospectors:
- input_type: log
paths:
- /var/log/apache/httpd-*.log
document_type: apache

- input_type: log
paths:
- /var/log/messages
- /var/log/*.log

output.logstash:
hosts: ["localhost:5044"]
index: filebeat

./filebeat -c filebeat.yml -configtest
./filebeat -c filebeat.yml


Logstash loadbalance: https://www.elastic.co/guide/en/beats/filebeat/current/load-balancing.html
output.logstash:
hosts: ["localhost:5044", "localhost:5045"]
loadbalance: true
worker: 2