log说明
https://elk-docker.readthedocs.io/
echo "vm.max_map_count=262144" >> /etc/sysctl.conf
sysctl -p
docker load -i sebp_elk-7.16.3.tar
docker run -d --name elk --restart always -p 5601:5601 -p 9200:9200 -p 5044:5044 -e TZ=Asia/Shanghai sebp/elk:7.16.3
docker exec -it elk bash
/opt/logstash/bin/logstash --path.data /tmp/logstash/data -e 'input { stdin { } } output { elasticsearch { hosts => ["localhost"] } }'
this is a dummy entry
Ctrl+C
http://192.168.100.79:9200/_search?pretty&size=1000
http://192.168.100.79:5601
rpm -ivh filebeat-7.16.3-x86_64.rpm
mv /etc/filebeat/filebeat.yml /etc/filebeat/filebeat.yml.bak
rm -f /etc/filebeat/filebeat.yml
vi /etc/filebeat/filebeat.yml
output:
logstash:
enabled: true
hosts:
- 192.168.100.79:5044
timeout: 15
ssl:
certificate_authorities:
- /etc/pki/tls/certs/logstash-beats.crt
filebeat:
inputs:
-
paths:
- /var/log/messages
document_type: syslog
vi /etc/pki/tls/certs/logstash-beats.crt
-----BEGIN CERTIFICATE-----
MIIC6zCCAdOgAwIBAgIJANPZwuf+5wTLMA0GCSqGSIb3DQEBCwUAMAwxCjAIBgNV
BAMMASowHhcNMTUxMjI4MTA0NTMyWhcNMjUxMjI1MTA0NTMyWjAMMQowCAYDVQQD
DAEqMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAp+jHFvhyYKiPXc7k
0c33f2QV+1hHNyW/uwcJbp5jG82cuQ41v70Z1+b2veBW4sUlDY3yAIEOPSUD8ASt
9m72CAo4xlwYKDvm/Sa3KJtDk0NrQiz6PPyBUFsY+Bj3xn6Nz1RW5YaP+Q1Hjnks
PEyQu4vLgfTSGYBHLD4gvs8wDWY7aaKf8DfuP7Ov74Qlj2GOxnmiDEF4tirlko0r
qQcvBgujCqA7rNoG+QDmkn3VrxtX8mKF72bxQ7USCyoxD4cWV2mU2HD2Maed3KHj
KAvDAzSyBMjI+qi9IlPN5MR7rVqUV0VlSKXBVPct6NG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