Add a default retention policy for skydive indexes

Given the ops tools now have a skydive deployment capability there needs
curator needs to be able to detect the addition of skydive indexes and
build a curator policy accordingly.

This change adds the new retention policy to the overlay inventory
providing a sane default for most environments.

The retention action files have been updated to remove the "-" as an
index separator. This was done because not all indexes use a dash as a
divider.

Change-Id: I5b61720f27da00e0c3b92341355b09ea6c01caba
This commit is contained in:
Kevin Carter
2019-01-15 17:18:14 -06:00
parent 6c553e1495
commit 892d617dc6
4 changed files with 11 additions and 3 deletions

View File

@@ -36,7 +36,7 @@
{
'filtertype': 'pattern',
'kind': 'prefix',
'value': key + '-'
'value': key
}
)
-%}

View File

@@ -36,7 +36,7 @@
{
'filtertype': 'pattern',
'kind': 'prefix',
'value': key + '-'
'value': key
}
)
-%}

View File

@@ -27,6 +27,7 @@ elastic_index_retention_algorithm: default
# elastic_journalbeat_retention: 1
# elastic_metricbeat_retention: 1
# elastic_packetbeat_retention: 1
# elastic_skydive_retention: 1
## These options are all in megabytes.
# elastic_logstash_size: 1024
@@ -37,6 +38,7 @@ elastic_index_retention_algorithm: default
# elastic_journalbeat_size: 1024
# elastic_metricbeat_size: 1024
# elastic_packetbeat_size: 1024
# elastic_skydive_size: 1024
## WHen a static retention policy option is not defined these options will be
## used for dynamic fact generation.
@@ -94,6 +96,9 @@ elastic_beat_retention_policy_hosts:
packetbeat:
weight: 1
hosts: "{{ groups['hosts'] | default([]) }}"
skydive:
weight: 1
hosts: "{{ groups['skydive_analyzers'] | default([]) }}"
# Refresh the elasticsearch retention policy local facts.
elastic_retention_refresh: false
elastic_retention_refresh: false