From e3eb653b378de8294e7c4eab7c006c10e79e2b7d Mon Sep 17 00:00:00 2001 From: Jonathan Rosser Date: Mon, 18 Jun 2018 13:03:40 +0100 Subject: [PATCH] Add apm-server to loadbalancer Change-Id: I7442296d0ff984839e7f63ffcf82a77db722b72e --- elk_metrics_6x/readme.rst | 16 ++++++++++++++++ elk_metrics_6x/templates/apm-server.yml.j2 | 2 +- elk_metrics_6x/vars/variables.yml | 4 ++++ 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/elk_metrics_6x/readme.rst b/elk_metrics_6x/readme.rst index 603aa1af..ed60d933 100644 --- a/elk_metrics_6x/readme.rst +++ b/elk_metrics_6x/readme.rst @@ -69,6 +69,22 @@ Configure the Kibana endpoints: haproxy_port: 81 # This is set using the "Kibana_nginx_port" variable haproxy_balance_type: tcp +Configure the APM endpoints: + It is recommented to use a load balancer for submitting Application + Performance Monitoring data to the APM server. A load balancer will provide + a highly available address which APM clients can use to connect to a pool of + APM nodes. If using HAProxy, edit the `/etc/openstack_deploy/user_variables.yml` + and add the following lines + +.. code-block:: yaml + + haproxy_extra_services: + - service: + haproxy_service_name: apm-server + haproxy_ssl: False + haproxy_backend_nodes: "{{ groups['apm-server'] | default([]) }}" + haproxy_port: 8200 # this is set using the "apm_port" variable + haproxy_balance_type: tcp Optional | add OSProfiler to an OpenStack-Ansible deployment ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/elk_metrics_6x/templates/apm-server.yml.j2 b/elk_metrics_6x/templates/apm-server.yml.j2 index c1da8a8b..5cd45d92 100644 --- a/elk_metrics_6x/templates/apm-server.yml.j2 +++ b/elk_metrics_6x/templates/apm-server.yml.j2 @@ -4,7 +4,7 @@ apm-server: # Defines the host and port the server is listening on - #host: "localhost:8200" + host: "{{ apm_interface }}:{{ apm_port }}" # Maximum permitted size in bytes of an unzipped request accepted by the server to be processed. #max_unzipped_size: 52428800 diff --git a/elk_metrics_6x/vars/variables.yml b/elk_metrics_6x/vars/variables.yml index 6110ef6c..d4dbbac1 100644 --- a/elk_metrics_6x/vars/variables.yml +++ b/elk_metrics_6x/vars/variables.yml @@ -41,6 +41,10 @@ kibana_server_name: "{{ ansible_hostname }}" logstash_beat_input_port: 5044 logstash_deploy_filters: true +# APM vars +apm_interface: 0.0.0.0 +apm_port: 8200 + # Beat options heartbeat_services: - group: "{{ groups['galera_all'] | default([]) }}"