x轴为metrics,如account,max,min等 y轴为聚合条件,如按时间显示,按地区显示,按host显示等等
能够定义语句与正则表达式匹配 filter { if [source] == "/var/log/httpd/access_log" { grok { match => { "message" => "%{COMBINEDAPACHELOG}" } } } else if [source] == "/var/log/messages" { grok { match => { "message" => "%{SYSLOGBASE2}"} match => { "message" => "%{SYSLOGPAMSESSION}"} } } }
%{COMBINEDAPACHELOG}是已经定义好的正则表达式,能够在官网中查询应用所须要的正则表达式,也能够本身定义
可是使用正则表达式将会大大占用CPU资源正则表达式logstash中定义index
能够使用命令直接定义elasticsearch
input { udp { ... type => "foo" } file { ... type => "bar" } } output { if [type] == "foo" { elasticsearch { ... index => "foo-index" } } else { elasticsearch { ... index => "bar-index" } } }