Merge "Enable central logging without deploying elasticsearch/kibana"

This commit is contained in:
Jenkins 2016-08-05 03:23:43 +00:00 committed by Gerrit Code Review
commit 05f381df6a
5 changed files with 29 additions and 4 deletions

View File

@ -243,6 +243,16 @@ enable_nova_fake: "no"
num_nova_fake_per_node: 5
####################
# Logging options
####################
elasticsearch_address: "{{ kolla_internal_vip_address }}"
elasticsearch_protocol: "{{ internal_protocol }}"
enable_elasticsearch: "{{ 'yes' if enable_central_logging | bool }}"
enable_kibana: "{{ 'yes' if enable_central_logging | bool }}"
####################
# RabbitMQ options
####################

View File

@ -6,7 +6,7 @@ fields = ["Timestamp", "Type", "Logger", "Severity", "Payload", "Pid", "Hostname
[elasticsearch_output]
type = "ElasticSearchOutput"
server = "{{ internal_protocol }}://{{ kolla_internal_vip_address }}:{{ elasticsearch_port }}"
server = "{{ elasticsearch_protocol }}://{{ elasticsearch_address }}:{{ elasticsearch_port }}"
message_matcher = "Type == 'log'"
encoder = "elasticsearch_json_encoder"
use_buffering = true

View File

@ -364,7 +364,7 @@ listen radosgw_external
{% endif %}
{% endif %}
{% if enable_central_logging | bool %}
{% if enable_kibana | bool %}
userlist kibanauser
user {{ kibana_user }} insecure-password {{ kibana_password }}
@ -388,7 +388,9 @@ listen kibana_external
server {{ hostvars[host]['ansible_hostname'] }} {{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ kibana_server_port }} check inter 2000 rise 2 fall 5
{% endfor %}
{% endif %}
{% endif %}
{% if enable_elasticsearch | bool %}
listen elasticsearch
option dontlog-normal
bind {{ kolla_internal_vip_address }}:{{ elasticsearch_port }}

View File

@ -12,7 +12,7 @@
roles:
- { role: elasticsearch,
tags: elasticsearch,
when: enable_central_logging | bool }
when: enable_elasticsearch | bool }
- hosts:
- cinder-api
@ -39,7 +39,7 @@
roles:
- { role: kibana,
tags: kibana,
when: enable_central_logging | bool }
when: enable_kibana | bool }
- hosts: memcached
roles:

View File

@ -194,3 +194,16 @@ adding:
Note this method is not recommended and generally not tested by the
Kolla community, but included since sometimes a free IP is not available
in a testing environment.
External Elasticsearch/Kibana environment
=========================================
It is possible to use an external Elasticsearch/Kibana environment. To do this
first disable the deployment of the central logging.
::
enable_central_logging: "no"
Now you can use the parameter ``elasticsearch_address`` to configure the address
of the external Elasticsearch environment.