I want to send 3 input to the graylog using filebeats, which are: auth.log, access.log, and error.log. and i want to differentiate them into 3 output in graylog, with 3 different port ( i have 1 server graylog). so i have 3 different input in graylog. i have tried this configuration but it doesnt appear any logs:
filebeat.yml
filebeat.inputs:
- type: log
enabled: true
paths:
- /path/auth.log
fields:
log_type: auth_logs
fields_under_root: true
- type: log
enabled: true
paths:
- /path/access.log
fields:
log_type: access_logs
fields_under_root: true
- type: log
enabled: true
paths:
- /path/error.log
fields:
log_type: error_logs
fields_under_root: true
output:
if:
equals:
log_type: "auth_logs"
logstash:
host: graylog_server_ip
port: 12201
else if:
equals:
log_type: "access_logs"
logstash:
host: graylog_server_ip
port: 12202
else if:
equals:
log_type: "error_logs"
logstash:
host: graylog_server_ip
port: 12203
else:
logstash:
host: graylog_server_ip
port: 12204
in graylog inputs, i tried to used gelf tcp and beats but both not works. i think the problem is in the output, but i dont know how. please help