---
# Copyright 2016 FUJITSU LIMITED
# file: host_vars/monasca-agent-node

# Monasca Agent user credentials
monasca_agent_user: monasca-agent
monasca_agent_password: "{{ keystone_monasca_agent_password }}"
monasca_agent_project: monasca

# Monasca Agent Configuration
monasca_agent_service: monitoring

# Variables for installing Python bindings for postgresql check
postgresql_version: 9.1
postgresql_dir: "{{ opt_dir }}/postgresql/{{ postgresql_version }}"
postgresql_bin_dir: "{{ postgresql_dir }}/bin"

# Additionally you can specify any number of name:value pairs in 'init_config'
# which will be available on every run in 'self.init_config'
# Designate unique name into each instances section
monasca_checks:
  - plugin: host_alive
    init_config:
      ssh_port: 22
      ssh_timeout: 0.5
      ping_timeout: 1
    instances:
      - name: openstack
        host_name: "{{ keystone_host }}"
        alive_test: ssh
  - plugin: elastic
    init_config:
    instances:
      - name: elasticsearch
        url: "{{ elasticsearch_url }}"
        dimensions:
          component: elasticsearch
          service: monitoring
  - plugin: http_check
    init_config:
    instances:
      - name: Kibana
        url: "{{ kibana_url }}"
        timeout: 1
        dimensions:
          component: kibana
          service: monitoring
      - name: Monasca Log Api
        url: "http://{{ log_api_ip|trim|safe }}:{{ log_api_port }}/healthcheck"
        timeout: 1
        dimensions:
          component: monasca-log-api
          service: monitoring
  # this one's different because concatenated with default file
  - plugin: process
    init_config:
    instances:
      - built_by: MonLogMetrics
        detailed: true
        name: monasca.log.metrics
        search_string: ['monasca-log-metrics']
        exact_match: False
        dimensions:
          component: monasca-log-metrics
          service: monitoring
      - built_by: MonLogAgent
        detailed: true
        name: monasca.log.agent
        search_string: ['monasca-log-agent']
        exact_match: False
        dimensions:
          component: monasca-log-agent
          service: monitoring
      - built_by: MonLogTransformer
        detailed: true
        name: monasca.log.transformer
        search_string: ['transformer.conf']
        exact_match: False
        dimensions:
          component: monasca-log-transformer
          service: monitoring
      - built_by: MonLogPersister
        detailed: true
        name: monasca.log.persister
        search_string: ['persister.conf']
        exact_match: False
        dimensions:
          component: monasca-log-persister
          service: monitoring
      - built_by: MonLogApi
        detailed: true
        name: monasca.log.api
        search_string: ['monasca-log-api']
        exact_match: False
        dimensions:
           component: monasca-log-api
           service: monitoring

pip_extra_depedencies:
 - { name: pymysql, version: 0.7.2 }
 - { name: kafka-python, version: 0.9.5 }
