Elasticsearch + Logstash + Kibana Configuration

Source: Internet
Author: User
Tags kibana logstash

Elasticsearch + Logstash + Kibana Configuration
Elasticsearch + Logstash + Kibana Configuration

There are many articles about the installation of Elasticsearch + Logstash + Kibana. I will not repeat them here, but I will only record some details here.

Precautions for installing AWS EC2

Remember to open the elasticsearch address on ports 9200,9300 and 5601. Do not write external IP addresses; otherwise, it will waste data and write internal ip addresses.
elasticsearch {host => "ip-10-160-94-102.ap-northeast-1.compute.internal"port => 9200cluster => "elasticsearch"protocol => http}

What pattern does grok have?

All lists are available here;

It is worth mentioning that QUOTEDSTRING and GREEDYDATA are good pattern when there are many texts;

Grok debugger is a powerful tool;

How can I lose unnecessary logs?

Grep filter is used on the Internet, but on the one hand, grep is not an official plug-in (but in logstash-contrib), and the new version does not seem to have been used. So I finally used only the if statement and grok.

The basic logic is

Each match adds a tag to determine whether a useful tag exists before the end of the tag.

 

if !(“tagA” in [tags] or “tagB” in [tags]) {
drop { }
}

Why can't the index value be sum/average? Why is my field not of the Number type but String type?

The grok document is very misleading. % {NUMBER: myfield} means to use the regular expression of a NUMBER to match, and the matched result grok is indexed as a string by default.

To specify the index type, you must enter % {NUMBER: myfield: int} And: float.

If the index of a field is already string, you can use the Mapping API of elasticsearch to change it to int, but I have not succeeded. My final success was to delete all the previous indexes and redo them.

$ curl -XDELETE ‘http://localhost:9200/twitter/’

How to Create visualization?

I don't understand a lot of things either. If you have the energy, you can read the documents written by the great gods. Let's briefly describe some basic principles and tips:

"Split" is equivalent to setting the size to 0 after the group by "search" is created in "discover" terms. If no limit terms is selected, you can use include or exclude to limit this field, equivalent to where

Finally, I posted a piece of mutual encouragement for three days:

 

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.