---
# Copyright 2015 FUJITSU LIMITED

# user and group
kibana_user: kibana
kibana_group: kibana

# host and port
kibana_host: "{{ hostvars[kibana_listen_ip]['ansible_ssh_host'] }}"
kibana_port: 5601

kibana_dest: "{{ elk_base_dir }}/kibana"
kibana_uncompress_dest: "{{ elk_base_dir }}"
kibana_server_base_path: "/dashboard/monitoring/logs_proxy"

# es_node_for_kibana is defined in inventory and points
# to node where elasticsearch lies
elasticsearch_url: "http://{{ hostvars[hostvars[es_node_for_kibana]['elastic_listen_ip']]['ansible_ssh_host'] }}:{{ elasticsearch_port }}"
elasticsearch_wait_for_timeout: "{{ monasca_wait_for_period }}"

kibana_plugins:
  'monasca-kibana-plugin':
    url: '{{ kibana_plugins_repo_url }}/monasca-kibana-plugin-0.0.5.tar.gz'
    configuration:
      'monasca-kibana-plugin.enabled': true
      'monasca-kibana-plugin.url': 'http://{{ keystone_host }}'
      'monasca-kibana-plugin.port': "{{ keystone_user_port|int }}"
      'monasca-kibana-plugin.cookie.isSecure': false

logrotate_scripts:
  - name: kibana
    path: "{{ kibana_log_dir }}/*.log"
    options:
      - daily
      - missingok
      - rotate 10
      - compress
      - delaycompress
      - notifempty
      - create 06400 {{ kibana_user }} {{ kibana_group }}
      - copytruncate
      - nomail
