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
No known key found for this signature in database
GPG Key ID: 9443251A787B9FB3
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

View File

@ -11,6 +11,8 @@ all_systems:
skydive_password: "{{ haproxy_stats_password }}"
skydive_elasticsearch_servers: "{{ groups['elastic-logstash'] | map('extract', hostvars, ['ansible_host']) | list | join(',') }}"
skydive_bind_address: "{{ container_address | default(ansible_host) }}"
elastic_skydive_retention: 2 # Elastic retention set to 2 days max
elastic_skydive_size: 51200 # Elastic retention set to 50GiB max
haproxy_extra_services:
- service:
haproxy_service_name: skydive_analyzer
@ -32,6 +34,7 @@ all_systems:
- "httpchk HEAD / HTTP/1.0\\r\\nUser-agent:\\ osa-haproxy-healthcheck"
haproxy_backend_httpcheck_options:
- expect rstatus 200|401
children:
traefik_all:
children: