...
# ---------------------------- Elasticsearch Output ----------------------------
output.elasticsearch:
# Array of hosts to connect to.
hosts: ["localhost:9200"]
# Protocol - either `http` (default) or `https`.
protocol: "https"
# Authentication credentials - either API key or username/password.
#api_key: "id:api_key"
username: "filebeat_system"
password: "filebeat_system"
ssl.certificate_authorities: ["/etc/elasticsearch/certs/http_ca.crt"]
...
Filebeat 출력 테스트
filebeat test output
$ filebeat test output
elasticsearch: https://localhost:9200...
parse url... OK
connection...
parse host... OK
dns lookup... OK
addresses: 127.0.0.1
dial up... OK
TLS...
security: server's certificate chain verification is enabled
handshake... OK
TLS version: TLSv1.3
dial up... OK
talk to server... OK
version: 8.6.2
Filebeat load
filebeat setup -e
$ filebeat setup -e
{"log.level":"info","@timestamp":"2023-03-20T15:22:55.612+0900","log.origin":{"file.name":"instance/beat.go","file.line":724},"message":"Home path: [/usr/share/filebeat] Config path: [/etc/filebeat] Data path: [/var/lib/filebeat] Logs path: [/var/log/filebeat]","service.name":"filebeat","ecs.version":"1.6.0"}
...
Loading dashboards (Kibana must be running and reachable)
{"log.level":"info","@timestamp":"2023-03-20T16:01:50.260+0900","log.logger":"kibana","log.origin":{"file.name":"kibana/client.go","file.line":179},"message":"Kibana url: http://localhost:5601","service.name":"filebeat","ecs.version":"1.6.0"}