cgroup: "{{ host }}"
children: "CGROUP%{{ cgroup }}"
jcheck_mark: "{{ host }}"
cfengine_on_host: True

default_check:
  host: "{{ host }}"
  children: "{{ children }}"
  namespace: "search.common"
  jcheck_mark: "{{ jcheck_mark }}"
  alert_method: [ GOLEM ]
  #responsible: "{{ golem_resps | default(['xgen','bgleb']) }}"
  aggregator: logic_or
  flap: true
  ttl: "{{ ttl | default(900) }}"
  refresh_time: "{{ rtime | default(60) }}"
  tags: "{{ juggler_tags }}"
  notifications: ["{{ telegram_chat_qloud_ops }}"]

elastic_timed_more_than_limit_is_problem:
  aggregator: timed_more_than_limit_is_problem
  aggregator_kwargs:
    ignore_nodata: 'no'
    limits:
    - {day_end: 7, day_start: 1, time_end: 2, time_start: 8, crit: 2, warn: 1}
    - {crit: 4, day_end: 7, day_start: 1, time_end: 7, time_start: 3, warn: 4}
  flap: {stable: 600, critical: 3000}
  tags: "{{ juggler_tags }}"
  notifications: ["{{ telegram_chat_qloud_ops }}"]


unreach_ok:
    aggregator_kwargs:
        unreach_mode: force_ok
        unreach_service:
          - check: ":UNREACHABLE"

unreach_skip:
    aggregator_kwargs:
        unreach_mode: skip

force_warn:
    aggregator_kwargs:
        mode: warn

half_crit:
  aggregator: timed_more_than_limit_is_problem
  aggregator_kwargs:
    ignore_nodata: "no"
    limits:
      - warn: 0
        crit: "50%"
        time_start: 0
        time_end: 23
        day_start: 1
        day_end: 7

warning:
  aggregator: timed_more_than_limit_is_problem
  aggregator_kwargs:
    ignore_nodata: "no"
    limits:
      - time_start: 0
        time_end: 23
        day_start: 1
        day_end: 7
        crit: "101%"
        warn: 0

only_day_half_crit:
  aggregator: timed_more_than_limit_is_problem
  aggregator_kwargs:
    ignore_nodata: "no"
    limits:
      - time_start: 9
        time_end: 22
        day_start: 1
        day_end: 7
        crit: "50%"
        warn: 0
      - time_start: 23
        time_end: 8
        day_start: 1
        day_end: 7
        crit: "101%"
        warn: 0

only_day_workdays:
  aggregator: timed_more_than_limit_is_problem
  aggregator_kwargs:
    ignore_nodata: "no"
    limits:
      - time_start: 12
        time_end: 20
        day_start: 1
        day_end: 5
        crit: 0
        warn: 0
      - time_start: 21
        time_end: 11
        day_start: 1
        day_end: 5
        crit: "101%"
        warn: 0
      - time_start: 0
        time_end: 23
        day_start: 6
        day_end: 7
        crit: "101%"
        warn: 0

only_day_workdays_half_crit:
  aggregator: timed_more_than_limit_is_problem
  aggregator_kwargs:
    ignore_nodata: "no"
    limits:
      - time_start: 12
        time_end: 20
        day_start: 1
        day_end: 5
        crit: "50%"
        warn: 0
      - time_start: 21
        time_end: 11
        day_start: 1
        day_end: 5
        crit: "101%"
        warn: 0
      - time_start: 0
        time_end: 23
        day_start: 6
        day_end: 7
        crit: "101%"
        warn: 0

only_workdays:
  aggregator: timed_more_than_limit_is_problem
  aggregator_kwargs:
    ignore_nodata: "no"
    limits:
      - time_start: 0
        time_end: 23
        day_start: 1
        day_end: 5
        crit: 0
        warn: 0
      - time_start: 0
        time_end: 23
        day_start: 6
        day_end: 7
        crit: "101%"
        warn: 0

#

ignore_nodata_24x7:
  aggregator: timed_more_than_limit_is_problem
  aggregator_kwargs:
    ignore_nodata: "yes"
    limits:
      - time_start: 0
        time_end: 23
        day_start: 1
        day_end: 7
        crit: 0
        warn: 0

jserver_api: "http://juggler.search.yandex.net:8998/api"

do_unreachable: False
call_on_weekend: True
always_warning: False
iptruler: False

telegram_chat_qloud_ops:
  template: on_status_change
  status: [
  {"from": "OK", "to": "CRIT"},
  {"from": "CRIT", "to": "OK"},
  {"from": "CRIT", "to": "WARN"},
  {"from": "WARN", "to": "CRIT"}
  ]
  method: [telegram]
  login: [qloud-ops]
  fallback_delay: 0

telegram_notify:
  notifications:
  - "{{ telegram_chat_qloud_ops }}"

st_qloudops_queue:
  template: on_status_change
  status: [
    {"from": "OK", "to": "CRIT"},
    {"from": "WARN", "to": "CRIT"},
  ]
  method: [email]
  login: [qloudops-bug]
  fallback_delay: 0

email_qloudops_notify:
  notifications:
  - "{{ st_qloudops_queue }}"
