1. List Logstash-plugins
Bin/logstash-plugin List
******
Logstash-output-kafka
Logstash-output-nagios
Logstash-output-null
Logstash-output-pagerduty
Logstash-output-pipe
Logstash-output-rabbitmq
Logstash-output-redis
******
2. Plugin to install MongoDB output in the output format
Install Logstash-output-mongodb
3. Configure the output profile for Logstash
MongoDB { "%{message}"} "mongodb://asrlog-1 : 27017 "" Service "" Trace_log " }
4. Restart Logstash
Note: The Logstash, which is started as follows, also needs to be restarted Logstash, after all, the output plugin has been reinstalled (for a while ...). )
Bin/logstash-f config/logstash-onlne.yml--config.reload.automatic &
5. Log in to MongoDB and verify that the data is written.
The pro-test is feasible and can be written successfully.
Improper, welcome the great God of the generous enlighten.
Logstash writing to the MongoDB database