elkstack-based on Java Engineering Tomcat Application log processing-02

Source: Internet
Author: User
Tags syslog kibana logstash

Logstash How do I pull logs from Redis and write to Es?

Input {

Redis {

Batch_count = 1

Host = "Sz-a-xxxxxredis01-redis-xen.xxxxx.com"

Type = "Syslog"

data_type = "List"

Key = "Logstash:syslog-log"

}

Redis {

Batch_count = 1

Host = "Sz-a-xxxxxredis01-redis-xen.xxxxx.com"

Type = "Log4j-json-web"

data_type = "List"

Key = "Logstash:xxxxxweb-web-log"

}

Redis {

Batch_count = 1

Host = "Sz-a-xxxxxredis01-redis-xen.xxxxx.com"

Type = "Log4j-json-tomcat"

data_type = "List"

Key = "Logstash:xxxxxweb-tomcat-log"

}

}

output{

if [type] = = "Syslog" {

Elasticsearch {hosts = ["Sz-a-xxxxxes01-es-hw.xxxxx.com"]

index = "dev-system-logs-%{+yyyy. MM.DD} "

Document_type = "System-logs"}

}

if [type] = = "Log4j-json-web" {

Elasticsearch {hosts = ["Sz-a-xxxxxes01-es-hw.xxxxx.com"]

index = "dev-xxxxxweb-master-logs-%{+yyyy. MM.DD} "

Document_type = "%{class}"}

}

if [type] = = "Log4j-json-tomcat" {

Elasticsearch {hosts = ["Sz-a-xxxxxes01-es-hw.xxxxx.com"]

index = "dev-xxxxxweb-master-logs-%{+yyyy. MM.DD} "

Document_type = "Tomcat_logs"}

}

}

The above configuration also involves the transmission of Rsyslog logs, drawing on the configuration of another great God, his blog address: http://dl528888.blog.51cto.com

Summarize

In the end of this article is actually less kibana effect display, is because the display diagram is still in perfect, in the later narrative, will show some kibana rendering effect.

elkstack-based on Java Engineering Tomcat Application log processing-02

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.