I am not getting that how to run this filebeat in order to send output to elasticsearch.
This is from the filebeat.yml file,
- input_type: log
# Paths that should be crawled and fetched. Glob based paths.
paths:
- /var/log/nginx/access.log
output.elasticsearch:
# Array of hosts to connect to.
hosts: ["localhost:9200"]
index: 'filebeat_nginx'
elasticsearch is up and running.
Now, how to run filebeat to send the log info to elasticsearch.
If I go to bin directory of filebeat, and run this command,
luvpreet@DHARI-Inspiron-3542:/usr/share/filebeat/bin$ sudo ./filebeat -configtest -e
then it shows ,
filebeat2017/04/19 06:54:22.450440 beat.go:339: CRIT Exiting: error loading config file: stat filebeat.yml: no such file or directory
Exiting: error loading config file: stat filebeat.yml: no such file or directory
The filebeat.yml file is in the /etc/filebeat folder. How to run it ? Please clarify the process to run this with elasticsearch.