default['datadog']['enabled'] = false
default['datadog']['templates'] = []

# To report custom Alfresco Solr metrics
# default['datadog']['templates'] = ['alfSolr']

# TODO: the following should be optional (or in chef-alfresco)
# Common params
# default['datadog']['tomcat']['jmx_databag'] = ''
# default['datadog']['tomcat']['jmx_databag_item'] = ''
# default['datadog']['tomcat']['jmx_username'] = 'systemsMonitorRole'
# default['datadog']['tomcat']['jmx_password'] = 'changeme'
default['datadog']['tomcat']['jmx_hostname'] = 'localhost'
default['datadog']['tomcat']['java_options'] = '-Xmx512m -Xms50m'

default['datadog']['tomcat']['instances']['alfresco']['port'] = 400_00
default['datadog']['tomcat']['instances']['share']['port'] = 400_10
default['datadog']['tomcat']['instances']['solr']['port'] = 400_20

default['datadog']['tomcat']['instances']['alfresco']['enabled'] = false
default['datadog']['tomcat']['instances']['share']['enabled'] = false
default['datadog']['tomcat']['instances']['solr']['enabled'] = false
default['datadog']['tomcat']['instances']['alfSolr']['enabled'] = false

default['datadog']['tomcat']['instances']['alfresco']['java_options'] = node['datadog']['tomcat']['java_options']
default['datadog']['tomcat']['instances']['share']['java_options'] = node['datadog']['tomcat']['java_options']
default['datadog']['tomcat']['instances']['solr']['java_options'] = node['datadog']['tomcat']['java_options']

default['datadog']['tomcat']['instances']['alfresco']['jmx_hostname'] = node['datadog']['tomcat']['jmx_hostname']
default['datadog']['tomcat']['instances']['share']['jmx_hostname'] = node['datadog']['tomcat']['jmx_hostname']
default['datadog']['tomcat']['instances']['solr']['jmx_hostname'] = node['datadog']['tomcat']['jmx_hostname']
default['datadog']['tomcat']['instances']['alfSolr']['hostname'] = node['datadog']['tomcat']['jmx_hostname']

default['datadog']['tomcat']['instances']['alfresco']['jmx_username'] = node['datadog']['tomcat']['jmx_username']
default['datadog']['tomcat']['instances']['share']['jmx_username'] = node['datadog']['tomcat']['jmx_username']
default['datadog']['tomcat']['instances']['solr']['jmx_username'] = node['datadog']['tomcat']['jmx_username']

default['datadog']['tomcat']['instances']['alfresco']['jmx_password'] = node['datadog']['tomcat']['jmx_password']
default['datadog']['tomcat']['instances']['share']['jmx_password'] = node['datadog']['tomcat']['jmx_password']
default['datadog']['tomcat']['instances']['solr']['jmx_password'] = node['datadog']['tomcat']['jmx_password']

# TODO: the following should be optional (or in chef-alfresco)
default['datadog']['haproxy']['url'] = 'http://localhost:1936/'
default['datadog']['haproxy']['username'] = 'admin'
default['datadog']['haproxy']['password'] = 'changeme'
default['datadog']['haproxy']['collect_aggregates_only'] = false
default['datadog']['haproxy']['collect_status_metrics'] = true
default['datadog']['haproxy']['collect_status_by_host'] = true

# TODO: the following should be optional (or in chef-alfresco)
default['datadog']['nginx']['instance']['url'] = 'http://localhost:2100/nginx_status/'

default['datadog']['process']['auditd']['search_string'] = ['auditd']
default['datadog']['process']['crond']['search_string'] = %w(crond CROND)
default['datadog']['process']['sshd']['search_string'] = %w(ssh sshd)
default['datadog']['process']['snortd']['search_string'] = ['snortd']
default['datadog']['process']['iptables']['search_string'] = ['iptables']
default['datadog']['process']['logstash-forwarder']['search_string'] = ['logstash-forwarder']
default['datadog']['process']['salt-minion']['search_string'] = ['salt-minion']
default['datadog']['process']['datadog-agent']['search_string'] = ['datadog-agent']
default['datadog']['process']['ossec']['search_string'] = ['ossec-analysisd', 'ossec-logcollector', 'ossec-syscheckd', 'ossec-monitord']

# TODO: these should go into chef-alfresco
default['datadog']['process']['soffice.bin']['search_string'] = ['soffice.bin']
default['datadog']['process']['pdf2swf']['search_string'] = ['pdf2swf']
default['datadog']['process']['tomcat-repo']['search_string'] = ['tomcat-alfresco/alfresco.log']
default['datadog']['process']['tomcat-share']['search_string'] = ['tomcat-share']
default['datadog']['process']['tomcat-solr']['search_string'] = ['tomcat-solr']
default['datadog']['process']['haproxy']['search_string'] = ['haproxy', 'haproxy-systemd-wrapper']
default['datadog']['process']['nginx']['search_string'] = ['nginx']
default['datadog']['process']['rsyslogd']['search_string'] = ['rsyslogd']

# TODO: add libreoffice, imagemagick, pdfbox, pdf2swf, ...
