# cat syslog02.conf #filename: syslog02.conf #注意这个是要用 # comment out input{ file{= ["/var/ Log/*.log"] }}output{ elasticsearch { = = ["12x.xx.15.1xx : 9200"] }}
See if there is a problem with the configuration file:
# .. /bin/logstash-f syslog02.conf-tsending logstash's logs to/usr/local/logstash/logs which is now C onfigured via log4j2.properties[]--01t09: Wu,][fatal ][logstash.runner is 11 (byte1
Add an index configuration under Output->elasticsearch:
cat syslog02.conf #filename: syslog02.confinput{ file{ = ["/var/log/*.log " ] }}output{ elasticsearch { = = ["123.57.15.154:9200" ] "syslog02_log" }}
Once again, simply test the configuration file:
# .. /bin/logstash-f syslog02.conf-tsending logstash's logs to/usr/local/logstash/logs which is now C onfigured via log4j2.propertiesConfiguration ok[- -01t11:56 ,791][info][logstash.runner ] Using config.test_and_exit mode. Config Validation Result:ok. Exiting Logstash
Start and execute in the background:
# .. /bin/logstash-f syslog02.conf &
How to view data Logstash hit Elasticsearch in Elasticsearch