🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
[TOC] ## 教程 1. 修改 td-agent.conf ``` <source> @type tail path /var/log/apache2/access_log pos_file /var/log/td-agent/apache2.access_log.pos <parse> @type apache2 </parse> tag mongo.apache.access </source> <match mongo.**> # plugin type @type mongo # mongodb db + collection database apache collection access # mongodb host + port host localhost port 27017 # interval <buffer> flush_interval 10s </buffer> # make sure to include the time key <inject> time_key time </inject> </match> ``` 2. 测试 ``` ab -n 100 -c 10 http://localhost/ ```