'2020/06/03'에 해당되는 글 2건

  1. 2020.06.03 [Filebeat] ilm 조심 하자.
  2. 2020.06.03 [Filebeat] template 설정 setup.template.append_fields

[Filebeat] ilm 조심 하자.

Elastic/Beats 2020. 6. 3. 14:19

참고 문서)

https://www.elastic.co/guide/en/beats/filebeat/current/ilm.html

 

setup.ilm.check_exists

When set to false, disables the check for an existing lifecycle policy.

The default is true.

You need to disable this check if the Filebeat user connecting to a secured cluster doesn’t have the read_ilm privilege.

If you set this option to false, set setup.ilm.overwrite: true so the lifecycle policy can be installed.

 

setup.ilm.overwrite

When set to true, the lifecycle policy is overwritten at startup. The default is false.

 

이 설정은 template  설정과 output.elasticsearch.index 랑도 연관이 됩니다.

아주 삽질을 하게 만드는 설정이 될 수도 있습니다.

단, 알고 쓰면 삽질 안하고 모르고 쓰면 삽질 할 수도 있습니다.

 

늘 그렇지만, Elastic 사는 그냥 모르면 기본 설정만 사용하세요. :)

:

[Filebeat] template 설정 setup.template.append_fields

Elastic/Beats 2020. 6. 3. 14:15

참고 문서)

https://www.elastic.co/guide/en/beats/filebeat/current/configuration-template.html

 

설정 중에 필요한 내용이 있어서 기록해 봅니다.

 

setup.template.append_fields

 

A list of fields to be added to the template and Kibana index pattern.

This setting adds new fields. It does not overwrite or change existing fields.

This setting is useful when your data contains fields that Filebeat doesn’t know about in advance.

If append_fields is specified along with overwrite: true,

Filebeat overwrites the existing template and applies the new template when creating new indices.

Existing indices are not affected.

If you’re running multiple instances of Filebeat with different append_fields settings,

the last one writing the template takes precedence.

Any changes to this setting also affect the Kibana index pattern.

 

Example config:

setup.template.overwrite: true

setup.template.append_fields:

  - name: test.name

     type: keyword

  - name: test.hostname

     type: long

 

이 설정으로 dynamic mapping 이나 template 관련 번거로움을 간단하게 해결 할 수 있습니다.

저는 몇 개 field 에 대해서 date 로 설정을 해야 해서 이 설정을 사용했습니다.

 

: