Filebeat:輕量型日誌採集器。
html
這裏採用懶人安裝,Docker容器化安裝,安裝前先保證本身已經安裝Docker-compose,安裝地址:https://github.com/deviantony/docker-elk.git,安裝完訪問服務地址:http://localhost:5601,http://localhost:9200.
ELK中文官方文檔
Elasticsearch 權威指南中文版(2.x)
Kibana 中文手冊(6.0)
好了,ELK內容到這裏把!建議、最好看一首文檔,就不要去看博客了,由於都是抄來抄去,想罵人。分割線
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------git
<?xml version="1.0" encoding="utf-8" ?> <nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" autoReload="true" internalLogLevel="Warn" internalLogFile="internal-nlog.txt"> <extensions> <add assembly="NLog.Web.AspNetCore"/> </extensions > <variable name="logDirectory" value="${basedir}\logs\"/> <!--define various log targets--> <targets> <!--write logs to file--> <target xsi:type="File" name="allfile" fileName="${logDirectory}\nlog-all-${shortdate}.log" layout="${longdate}|${logger}|${uppercase:${level}}|${message} ${exception}" /> <target xsi:type="Network" name="elastic" keepConnection="false" address ="tcp://ip地址:5000" index="msglog-${shortdate}" layout="${longdate}|${logger}|${uppercase:${level}}|${message} ${exception}" /> /> <target xsi:type="Null" name="blackhole" /> </targets> <rules> <!--All logs, including from Microsoft--> <logger name="*" minlevel="Trace" writeTo="allfile" /> <!--Skip Microsoft logs and so log only own logs--> <logger name="Microsoft.*" minlevel="Trace" writeTo="blackhole" final="true" /> <logger name="*" minlevel="Trace" writeTo="elastic" /> </rules> </nlog>
注意:ip地址哪裏的端口爲你配置logstash的input地址:
github
ABP日誌經過屬性注入,直接看代碼了
docker