default["bcpc"]["hadoop"]["zabbix"]["cookbook"] = nil 
default["bcpc"]["hadoop"]["zabbix"]["mail_source"] = "zabbix.zbx_logger.sh.erb"
default["bcpc"]["hadoop"]["zabbix"]["cron_check_time"] = 240

# Time (in seconds) between Steps performed in a Zabbix Action.
# Refer following link for documentation on Zabbix Action Escalations:
# https://www.zabbix.com/documentation/2.2/manual/config/notifications/action/escalations 
# This can be used to delay the operation after a trigger changes to PROBLEM state.
# For eg: In Zabbix Action, make the first step as Step#2. Then that operation/step will
# be executed after #{escalation_period} seconds after the problem occurs (if the
# problem is not fixed during that time). If the trigger state oscillates often, this can
# be used to prevent unnecessary notifications. All events generated by triggers
# for eg: it going to PROBLEM state are still recorded and displayed on Zabbix;
# just that it will delay execution of the set action.
# Can override this setting by specifying 'esc_period' attribute in Action definition
default["bcpc"]["hadoop"]["zabbix"]["escalation_period"] = 300

# Interval within which chef-client is expected to run
default["bcpc"]["hadoop"]["zabbix"]["chef_client_check_interval"] =
  "#{(node['bcpc']['zabbix']['chef_client_check_interval'] / 60).ceil}m"

# Enable/Disable Zabbix alarming (Metrics will be collected and Triggers will change to
# problem state but no alarms will be generated. One can still see the System State on Zabbix UI)
default["bcpc"]["hadoop"]["zabbix"]["enable_alarming"] = true

# Number of workers to process graphite-to-zabbix queries
default["bcpc"]["hadoop"]["graphite"]["worker_count"] = [node['cpu']['total'] / 2, 3].max 

# Amount of metric data to be fetched from graphite and sent to zabbix
default["bcpc"]["hadoop"]["graphite"]["default_query_range"] = "-2min"

# The sensitivity of the triggers in zabbix (in minute)
default["bcpc"]["hadoop"]["zabbix"]["triggers_sensitivity"] = 15

# Override Graphite/Zabbix queries/triggers here
default["bcpc"]["hadoop"]["graphite"]["basic_queries"] = {} # Basic OS/Node Queries
default["bcpc"]["hadoop"]["graphite"]["service_queries"] = {} # Service specific queries

default["bcpc"]["hadoop"]["zabbix"]["query_graphite"] = {
  'log_file' => '/var/log/zabbix/query_graphite.log',
  'config_file' => '/usr/local/etc/query_graphite.config',
  'logging_level' => 'DEBUG',
  'rolling_max_bytes' => 20971520, # 20mb
  'rolling_backup_count' => 3 
}
