f89dd344c3
Elasticsearch 7 introduced Index Lifecycle Management, my aim is to eventually replace curator with this. This update allows for a default ILM policy to be configured for all beats. The default policy is quite basic: an index will be written to for 15 days or until the index reaches 30GB in size, then it will remain in the hot stage (no performance degradation) for another 15 days, after which it will be deleted. This still may lead to a situation where the disk space on log nodes could be filled. ILM policies can be configured for each beat by overriding the defaults that are in the role for each beat. ILM is set up for beats when undergoing an update (elk_package_state="latest"). During ILM set up elasticsearch creates an ILM ready template for the beat and uses the ILM policy we provision to nodes for the initial ILM policy. Subsequent ILM policy updates use ES APIs. New ILM policy files are not provisioned to nodes outside of using the beat upgrade flags, so the policy file on the node may fall out of step. Change-Id: I2c5c3abd4bb65075f2377227cbbfe31b68b0dc38
28 lines
1.3 KiB
YAML
28 lines
1.3 KiB
YAML
---
|
|
# Copyright 2018, Vexxhost, Inc.
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
# you may not use this file except in compliance with the License.
|
|
# You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
|
|
heartbeat_service_state: restarted
|
|
|
|
heartbeat_ilm_policy_name: "heartbeat-{{ beat_version }}"
|
|
heartbeat_ilm_policy_template: "heartbeat-{{ beat_version}}"
|
|
heartbeat_ilm_policy_filename: "heartbeat-ilm-policy.json"
|
|
heartbeat_ilm_policy_file_location: "/etc/heartbeat"
|
|
|
|
ilm_policy_name: "{{ heartbeat_ilm_policy_name | default('') }}"
|
|
ilm_policy: "{{ (heartbeat_ilm_policy | default(default_ilm_policy)) | default({}) }}"
|
|
ilm_policy_template: "{{ heartbeat_ilm_policy_template | default('') }}"
|
|
ilm_policy_filename: "{{ (heartbeat_ilm_policy_filename | default(heartbeat_ilm_policy_filename)) | default('') }}"
|
|
ilm_policy_file_location: "{{ (heartbeat_ilm_policy_file_location | default(default_ilm_policy_file_location)) | default('') }}"
|