From 3fb0383df48ec5c978a32fbee5b9ba9633962ee2 Mon Sep 17 00:00:00 2001 From: Hassan Zamani Date: Mon, 24 Jul 2017 12:55:38 +0430 Subject: [PATCH] Add etcd metrics flag --- inventory/group_vars/all.yml | 3 +++ roles/etcd/defaults/main.yml | 2 ++ roles/etcd/templates/etcd.env.yml | 1 + 3 files changed, 6 insertions(+) diff --git a/inventory/group_vars/all.yml b/inventory/group_vars/all.yml index 21b81a6de..15d4037ff 100644 --- a/inventory/group_vars/all.yml +++ b/inventory/group_vars/all.yml @@ -101,3 +101,6 @@ kernel_upgrade: false ## Etcd auto compaction retention for mvcc key value store in hour #etcd_compaction_retention: 0 + +## Set level of detail for etcd exported metrics, specify 'extensive' to include histogram metrics. +#etcd_metrics: basic diff --git a/roles/etcd/defaults/main.yml b/roles/etcd/defaults/main.yml index 06714cd90..a17c6d4fa 100644 --- a/roles/etcd/defaults/main.yml +++ b/roles/etcd/defaults/main.yml @@ -15,6 +15,8 @@ etcd_script_dir: "{{ bin_dir }}/etcd-scripts" etcd_heartbeat_interval: "250" etcd_election_timeout: "5000" +etcd_metrics: "basic" + # Limits etcd_memory_limit: 512M diff --git a/roles/etcd/templates/etcd.env.yml b/roles/etcd/templates/etcd.env.yml index 115aa14b5..00ac5d844 100644 --- a/roles/etcd/templates/etcd.env.yml +++ b/roles/etcd/templates/etcd.env.yml @@ -3,6 +3,7 @@ ETCD_ADVERTISE_CLIENT_URLS={{ etcd_client_url }} ETCD_INITIAL_ADVERTISE_PEER_URLS={{ etcd_peer_url }} ETCD_INITIAL_CLUSTER_STATE={% if etcd_cluster_is_healthy.rc != 0 | bool %}new{% else %}existing{% endif %} +ETCD_METRICS={{ etcd_metrics }} ETCD_LISTEN_CLIENT_URLS=https://{{ etcd_address }}:2379,https://127.0.0.1:2379 ETCD_ELECTION_TIMEOUT={{ etcd_election_timeout }} ETCD_HEARTBEAT_INTERVAL={{ etcd_heartbeat_interval }}