Enable central logging without deploying elasticsearch/kibana
This changed introduces 4 new parameters to be able to use an existing elasticsearch service for central logging. * elasticsearch_address - address of elasticsearch server * elasticsearch_protocol - protocol (HTTP/HTTPS) used by elasticsearch server * enable_elasticsearch - deploy elasticsearch container * enable_kibana - deploy kibana container Closes-bug: #1584861 Change-Id: Ia1ff9ae8b6d9929c3826da02693d1e2fc9ea2522
This commit is contained in:
parent
63d448fe2e
commit
4cd95dbcc5
@ -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
|
||||
####################
|
||||
|
@ -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
|
||||
|
@ -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 }}
|
||||
|
@ -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:
|
||||
|
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user