注:此处只关注logstash部分,其他部分此处省略
Logstash配置文件
1. logstash.conf文件内容
input {
# 自动模拟生成数据2次
generator {
count => 2
message => '[
{"env":"test", "timestamp":"2020-06-02 01:04:39.978", "logLevel":"ERROR", "source":"request", "type":"metrics", "message":"username not exists"},
{"env":"test", "timestamp":"2020-06-02 01:04:39.978", "logLevel":"ERROR", "source":"request", "type":"metrics", "message":"username not exists"},
{"env":"test", "timestamp":"2020-06-02 01:04:39.978", "logLevel":"ERROR", "source":"request", "type":"metrics", "message&