From 31d0161a39204787b28c992817b5d1e2862c90b1 Mon Sep 17 00:00:00 2001 From: Steven Fitzpatrick Date: Fri, 13 Dec 2019 15:33:48 -0600 Subject: [PATCH] Check Elasticsearch and Curator Compatibility This change updated the script used by zuul to check elasticsearch deployment so that the curator will be ran during the timeframe of the check, verifying the compatibility of the ES and Curator versions being used. Change-Id: I309530d71061fbb42c80e133948a0e0c3cf1927e --- .../osh-infra-logging/050-elasticsearch.sh | 46 ++++++++++++++++++- 1 file changed, 45 insertions(+), 1 deletion(-) diff --git a/tools/deployment/osh-infra-logging/050-elasticsearch.sh b/tools/deployment/osh-infra-logging/050-elasticsearch.sh index b05abd45c..5f551044e 100755 --- a/tools/deployment/osh-infra-logging/050-elasticsearch.sh +++ b/tools/deployment/osh-infra-logging/050-elasticsearch.sh @@ -23,6 +23,8 @@ make elasticsearch tee /tmp/elasticsearch.yaml << EOF jobs: verify_repositories: + cron: "*/3 * * * *" + curator: cron: "*/10 * * * *" monitoring: prometheus: @@ -47,7 +49,7 @@ conf: timeout_override: continue_if_exception: False ignore_empty_list: True - disable_action: True + disable_action: False filters: - filtertype: pattern kind: prefix @@ -58,6 +60,48 @@ conf: timestring: '%Y.%m.%d' unit: days unit_count: 365 + 2: + action: snapshot + description: >- + "Snapshot all indices older than 365 days" + options: + repository: logstash_snapshots + name: "snapshot-%Y-.%m.%d" + wait_for_completion: True + max_wait: 36000 + wait_interval: 30 + ignore_empty_list: True + continue_if_exception: False + disable_action: False + filters: + - filtertype: age + source: name + direction: older + timestring: '%Y.%m.%d' + unit: days + unit_count: 365 + 3: + action: delete_snapshots + description: >- + "Delete index snapshots older than 365 days" + options: + repository: logstash_snapshots + timeout_override: 1200 + retry_interval: 120 + retry_count: 5 + ignore_empty_list: True + continue_if_exception: False + disable_action: False + filters: + - filtertype: pattern + kind: prefix + value: snapshot- + - filtertype: age + source: name + direction: older + timestring: '%Y.%m.%d' + unit: days + unit_count: 365 EOF