Move heartbeat from utility_all to kibana

The heartbeat probe was making an assumption that the deployment will
always be an OSA one by using the group "utility_all" as a deployment
target. This change moves heartbeat to the first kibana three kibana
nodes by default which corrects the previous assumption.

Change-Id: Ic1b90eb94dd20dc2273542333de47bfd690af1dd
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
This commit is contained in:
Kevin Carter
2018-07-20 11:52:04 -05:00
parent 47aff12e6c
commit 0ab9d82545
4 changed files with 37 additions and 23 deletions

View File

@@ -1,6 +1,22 @@
--- ---
- name: Set heartbeat host deployment group
hosts: kibana
gather_facts: false
connection: local
tasks:
- name: Add hosts to dynamic inventory group
group_by:
key: heatbeat_deployment_targets
parents: kibana
when:
- inventory_hostname in groups['kibana'][:3]
tags:
- always
- name: Install Heartbeat - name: Install Heartbeat
hosts: utility_all hosts: heatbeat_deployment_targets
become: true become: true
vars: vars:
haproxy_ssl: false haproxy_ssl: false

View File

@@ -1,7 +1,7 @@
--- ---
- name: Load Heartbeat Dashboards - name: Load Heartbeat Dashboards
hosts: utility_all[0] hosts: kibana[0]
gather_facts: false gather_facts: false
vars_files: vars_files:
- vars/variables.yml - vars/variables.yml

View File

@@ -65,7 +65,6 @@ heartbeat.monitors:
#fields_under_root: false #fields_under_root: false
{% for item in heartbeat_services %} {% for item in heartbeat_services %}
{% if inventory_hostname in groups['utility_all'] | default([]) %}
{% if item.type == 'tcp' %} {% if item.type == 'tcp' %}
{% set hosts = [] %} {% set hosts = [] %}
{% for port in item.ports | default([]) %} {% for port in item.ports | default([]) %}
@@ -232,7 +231,6 @@ heartbeat.monitors:
{% endif %} {% endif %}
{% endif %} {% endif %}
{% endif %} {% endif %}
{% endif %}
{% endfor %} {% endfor %}
heartbeat.scheduler: heartbeat.scheduler:

View File

@@ -44,7 +44,7 @@ elastic_beat_retention_policy_hosts:
apm: "{{ groups['apm-server'] | default([null]) | length }}" apm: "{{ groups['apm-server'] | default([null]) | length }}"
auditbeat: "{{ groups['hosts'] | default([null]) | length }}" auditbeat: "{{ groups['hosts'] | default([null]) | length }}"
filebeat: "{{ groups['hosts'] | default([null]) | length }}" filebeat: "{{ groups['hosts'] | default([null]) | length }}"
heartbeat: "{{ groups['utility_all'] | default([null]) | length }}" heartbeat: "{{ groups['kibana'][:3] | default([null]) | length }}"
journalbeat: "{{ groups['all'] | default([null]) | length }}" journalbeat: "{{ groups['all'] | default([null]) | length }}"
metricbeat: "{{ groups['all'] | default([null]) | length }}" metricbeat: "{{ groups['all'] | default([null]) | length }}"
packetbeat: "{{ groups['hosts'] | default([null]) | length }}" packetbeat: "{{ groups['hosts'] | default([null]) | length }}"