diff --git a/az_crowd_dc_node.yml b/az_crowd_dc_node.yml
index badf836..7d7077f 100644
--- a/az_crowd_dc_node.yml
+++ b/az_crowd_dc_node.yml
@@ -11,13 +11,13 @@
atl_startup_systemd_params:
- "Environment=JDBC_DRIVER={{ atl_db_driver }}"
- - "Environment=JDBC_DIALECT=org.hibernate.dialect.PostgreSQLDialect"
- - "Environment=JDBC_USER={{ atl_db_root_user_login }}"
+ - "Environment=JDBC_DIALECT={{atl_jdbc_dialect}}"
+ - "Environment=JDBC_USER={{ atl_jdbc_user }}"
- "Environment=JDBC_PASSWORD={{ atl_jdbc_password }}"
- "Environment=JDBC_URL={{ atl_jdbc_url }}"
atl_jdbc_encoding: 'UNICODE'
- atl_jdbc_collation: 'C'
+ atl_jdbc_collation: 'Latin1_General_CS_AS'
atl_jdbc_ctype: 'C'
atl_jdbc_template: 'template0'
diff --git a/group_vars/all.yml b/group_vars/all.yml
index 5ddb2f6..75eb328 100644
--- a/group_vars/all.yml
+++ b/group_vars/all.yml
@@ -77,13 +77,23 @@ atl_aws_iam_role_arn: "{{ lookup('env', 'ATL_AWS_IAM_ROLE_ARN') }}"
atl_aws_enable_cloudwatch: "{{ lookup('env', 'ATL_AWS_ENABLE_CLOUDWATCH')|bool or false }}"
atl_aws_enable_cloudwatch_logs: "{{ lookup('env', 'ATL_AWS_ENABLE_CLOUDWATCH_LOGS')|bool or false }}"
-atl_db_engine: "{{ lookup('env', 'ATL_DB_ENGINE') }}"
+atl_db_engine: "{{ lookup('env', 'ATL_DB_ENGINE') or 'rds_postgres' }}"
+atl_dbms_for_db_engine:
+ aurora_postgres: "postgres"
+ rds_postgres: "postgres"
+ postgres: "postgres"
+ sql_server: "sql_server"
+ azure_sql: "sql_server"
+atl_dbms: "{{ atl_dbms_for_db_engine[atl_db_engine] }}"
atl_db_host: "{{ lookup('env', 'ATL_DB_HOST') }}"
atl_db_port: "{{ lookup('env', 'ATL_DB_PORT') or '5432' }}"
atl_db_root_db_name: "{{ lookup('env', 'ATL_DB_ROOT_DB_NAME') or 'postgres' }}"
atl_db_root_user: "{{ lookup('env', 'ATL_DB_ROOT_USER') or 'postgres' }}"
atl_db_root_password: "{{ lookup('env', 'ATL_DB_ROOT_PASSWORD') }}"
-atl_db_driver: "{{ lookup('env', 'ATL_DB_DRIVER') or 'org.postgresql.Driver' }}"
+atl_db_driver_for_dbms:
+ postgres: "org.postgresql.Driver"
+ sql_server: "net.sourceforge.jtds.jdbc.Driver"
+atl_db_driver: "{{ lookup('env', 'ATL_DB_DRIVER') or atl_db_driver_for_dbms[atl_dbms] }}"
atl_db_poolminsize: "{{ lookup('env', 'ATL_DB_POOLMINSIZE') or '20' }}"
atl_db_poolmaxsize: "{{ lookup('env', 'ATL_DB_POOLMAXSIZE') or '100' }}"
@@ -101,6 +111,7 @@ atl_db_engine_to_db_type_map:
aurora_postgres: "postgresaurora96"
rds_postgres: "postgres72"
atl_db_type: "{{ atl_db_engine_to_db_type_map[atl_db_engine] | default('postgres72') }}"
+atl_db_sql_collation: "{{ lookup('env', 'ATL_SQL_SERVER_COLLATION') or 'Latin1_General_CS_AS' }}"
atl_jdbc_db_name: "{{ lookup('env', 'ATL_JDBC_DB_NAME') }}"
atl_jdbc_user: "{{ lookup('env', 'ATL_JDBC_USER') }}"
@@ -109,9 +120,14 @@ atl_jdbc_encoding: "{{ lookup('env', 'ATL_JDBC_ENCODING') or 'UTF-8' }}"
atl_jdbc_collation: "{{ lookup('env', 'ATL_JDBC_COLLATION') or 'en_US.UTF-8' }}"
atl_jdbc_ctype: "{{ lookup('env', 'ATL_JDBC_CTYPE') or 'en_US.UTF-8' }}"
atl_jdbc_template: "{{ lookup('env', 'ATL_JDBC_TEMPLATE') or 'template1' }}"
-atl_jdbc_query_params_for_engine:
- aurora_postgres: "?targetServerType=master"
-atl_jdbc_url: "jdbc:postgresql://{{ atl_db_host }}:{{ atl_db_port }}/{{ atl_jdbc_db_name }}{{ atl_jdbc_query_params_for_engine[atl_db_engine]| default('') }}"
+atl_jdbc_url_subprotocol_for_dbms:
+ postgres: "jdbc:postgresql"
+ sql_server: "jdbc:jtds:sqlserver"
+atl_jdbc_dialect_for_dbms:
+ postgres: "org.hibernate.dialect.PostgreSQLDialect"
+ sql_server: "com.atlassian.crowd.util.persistence.hibernate.SQLServerIntlDialect"
+atl_jdbc_dialect: "{{ atl_jdbc_dialect_for_dbms[atl_dbms] }}"
+atl_jdbc_url: "{{ atl_jdbc_url_subprotocol_for_dbms[atl_dbms]}}://{{ atl_db_host }}:{{ atl_db_port }}/{{ atl_jdbc_db_name }}{{ atl_jdbc_query_params_for_engine[atl_db_engine]| default('') }}"
atl_jvm_heap: "{{ lookup('env', 'ATL_JVM_HEAP') or '2048m' }}"
atl_jvm_opts: "{{ lookup('env', 'ATL_JVM_OPTS') or '' }}"
diff --git a/roles/az_app_insights_install/.yamllint b/roles/az_app_insights_install/.yamllint
index a87f8ff..b256613 100644
--- a/roles/az_app_insights_install/.yamllint
+++ b/roles/az_app_insights_install/.yamllint
@@ -1,12 +1,12 @@
extends: default
rules:
+ line-length: disable
braces:
max-spaces-inside: 1
level: error
brackets:
max-spaces-inside: 1
level: error
- line-length: disable
truthy: disable
trailing-spaces: false
diff --git a/roles/az_app_insights_install/defaults/main.yml b/roles/az_app_insights_install/defaults/main.yml
index 4881dcd..e383cd7 100644
--- a/roles/az_app_insights_install/defaults/main.yml
+++ b/roles/az_app_insights_install/defaults/main.yml
@@ -1,5 +1,5 @@
---
-app_insights_version: "{{ lookup('env', 'APPINSIGHTS_VER') or '2.3.1' }}"
+app_insights_version: "{{ lookup('env', 'APPINSIGHTS_VER') or '2.6.0' }}"
app_insights_instrumentation_key: "{{ lookup('env', 'APPINSIGHTS_INSTRUMENTATION_KEY') or 'XXX' }}"
app_insights_jaxb_version: 2.3.1
diff --git a/roles/az_app_insights_install/molecule/default/tests/test_default.py b/roles/az_app_insights_install/molecule/default/tests/test_default.py
index a7b1771..18e38d3 100644
--- a/roles/az_app_insights_install/molecule/default/tests/test_default.py
+++ b/roles/az_app_insights_install/molecule/default/tests/test_default.py
@@ -20,19 +20,19 @@ def test_jaxb_installed(host):
f = host.file('/usr/share/collectd/java/jaxb-api-2.3.1.jar')
assert f.exists
-# @pytest.mark.parametrize('filename', [
-# '/opt/atlassian/crowd/current/crowd-webapp/WEB-INF/lib/applicationinsights-core-2.3.1.jar',
-# '/opt/atlassian/crowd/current/crowd-webapp/WEB-INF/lib/applicationinsights-web-2.3.1.jar',
-# '/opt/atlassian/crowd/current/crowd-webapp/WEB-INF/lib/applicationinsights-collectd-2.3.1.jar'
-# ])
-# def test_app_insight_jars_downloaded(host, filename):
-# f = host.file(filename)
-# assert f.exists
-
-def test_app_insights_collectd_file(host):
- f = host.file('/usr/share/collectd/java/applicationinsights-collectd-2.3.1.jar')
+@pytest.mark.parametrize('filename', [
+ '/opt/atlassian/crowd/current/crowd-webapp/WEB-INF/lib/applicationinsights-core-2.6.0.jar',
+ '/opt/atlassian/crowd/current/crowd-webapp/WEB-INF/lib/applicationinsights-web-2.6.0.jar',
+ '/opt/atlassian/crowd/current/crowd-webapp/WEB-INF/lib/applicationinsights-agent-2.6.0.jar'
+])
+def test_app_insight_jars_downloaded(host, filename):
+ f = host.file(filename)
assert f.exists
-# def test_applicationinsights_xml_installed(host):
-# f = host.file('/opt/atlassian/crowd/current/crowd-webapp/WEB-INF/classes/ApplicationInsights.xml')
-# assert f.exists
+def test_app_insights_collectd_file(host):
+ f = host.file('/usr/share/collectd/java/applicationinsights-collectd-2.6.0.jar')
+ assert f.exists
+
+def test_applicationinsights_xml_installed(host):
+ f = host.file('/opt/atlassian/crowd/current/crowd-webapp/WEB-INF/classes/ApplicationInsights.xml')
+ assert f.exists
diff --git a/roles/az_app_insights_install/tasks/main.yml b/roles/az_app_insights_install/tasks/main.yml
index 4189544..58e4121 100644
--- a/roles/az_app_insights_install/tasks/main.yml
+++ b/roles/az_app_insights_install/tasks/main.yml
@@ -5,6 +5,13 @@
name:
- collectd
+- name: Download Collectd App Insights jar
+ get_url:
+ url: "https://github.com/Microsoft/ApplicationInsights-Java/releases/download/{{ app_insights_version }}/{{ item }}"
+ dest: "/usr/share/collectd/java/applicationinsights-collectd-{{ app_insights_version }}.jar"
+ with_items:
+ - "applicationinsights-collectd-{{ app_insights_version }}.jar"
+
- name: Configure Collectd
template: src=collectd.conf.j2 dest=/etc/collectd/collectd.conf
notify:
@@ -20,27 +27,45 @@
url: "https://repo1.maven.org/maven2/javax/xml/bind/jaxb-api/{{ app_insights_jaxb_version }}/jaxb-api-{{ app_insights_jaxb_version }}.jar"
dest: "/usr/share/collectd/java/"
-# - name: Download App Insights jars
-# get_url:
-# url: "https://github.com/Microsoft/ApplicationInsights-Java/releases/download/{{ app_insights_version }}/{{ item }}"
-# dest: "{{ atl_product_installation_versioned }}/crowd-webapp/WEB-INF/lib/"
-# with_items:
-# - "applicationinsights-core-{{ app_insights_version }}.jar"
-# - "applicationinsights-web-{{ app_insights_version }}.jar"
-# - "applicationinsights-collectd-{{ app_insights_version }}.jar"
-#
-# - name: Copy applicationinsights-collectd to collectd
-# copy:
-# src: "{{ atl_product_installation_versioned }}/crowd-webapp/WEB-INF/lib/applicationinsights-collectd-{{ app_insights_version }}.jar"
-# dest: "/usr/share/collectd/java/applicationinsights-collectd-{{ app_insights_version }}.jar"
-# remote_src: true
-#
-# - name: Add ApplicationInsights.xml configuration
-# template: src=ApplicationInsights.xml.j2 dest={{ atl_product_installation_versioned }}/crowd-webapp/WEB-INF/classes/ApplicationInsights.xml
-
-- name: Download applicationinsights-collectd to collectd
+- name: Download App Insights jars
get_url:
url: "https://github.com/Microsoft/ApplicationInsights-Java/releases/download/{{ app_insights_version }}/{{ item }}"
- dest: "/usr/share/collectd/java/applicationinsights-collectd-{{ app_insights_version }}.jar"
+ dest: "{{ atl_product_installation_versioned }}/crowd-webapp/WEB-INF/lib/"
with_items:
- - "applicationinsights-collectd-{{ app_insights_version }}.jar"
+ - "applicationinsights-core-{{ app_insights_version }}.jar"
+ - "applicationinsights-web-{{ app_insights_version }}.jar"
+ - "applicationinsights-agent-{{ app_insights_version }}.jar"
+
+- name: Add java agent to JAVA_OPTS
+ lineinfile:
+ path: "{{ atl_product_installation_versioned }}/apache-tomcat/bin/setenv.sh"
+ regexp: '^export JAVA_OPTS'
+ line: "export JAVA_OPTS=\"$JAVA_OPTS -javaagent:{{ atl_product_installation_versioned }}\
+ /crowd-webapp/WEB-INF/lib/applicationinsights-agent-{{ app_insights_version }}.jar\""
+
+- name: Add ApplicationInsights.xml configuration
+ template: src=ApplicationInsights.xml.j2 dest={{ atl_product_installation_versioned }}/crowd-webapp/WEB-INF/classes/ApplicationInsights.xml
+
+- name: Check for existing App Insights Filter
+ xml:
+ path: "/opt/atlassian/crowd/current/crowd-webapp/WEB-INF/web.xml"
+ xpath: //*[.="ApplicationInsightsWebFilter"]
+ count: yes
+ register: appInsightsFilter
+
+- name: Add App Insights Filter
+ xml:
+ path: "/opt/atlassian/crowd/current/crowd-webapp/WEB-INF/web.xml"
+ xpath: /*[name()='web-app']
+ input_type: xml
+ pretty_print: yes
+ add_children:
+ - "\
+ ApplicationInsightsWebFilter\
+ com.microsoft.applicationinsights.web.internal.WebRequestTrackingFilter\
+ "
+ - "\
+ ApplicationInsightsWebFilter\
+ /*\
+ "
+ when: appInsightsFilter.count < 1
diff --git a/roles/az_app_insights_install/templates/collectd.conf.j2 b/roles/az_app_insights_install/templates/collectd.conf.j2
index 14ed72c..71bec46 100644
--- a/roles/az_app_insights_install/templates/collectd.conf.j2
+++ b/roles/az_app_insights_install/templates/collectd.conf.j2
@@ -92,672 +92,6 @@ LoadPlugin java
InstrumentationKey "{{ app_insights_instrumentation_key }}"
SDKLogger true
-
- LoadPlugin "org.collectd.java.GenericJMX"
-
-
- # Confluence indexing statistics
-
- ObjectName "Confluence:name=IndexingStatistics"
- InstancePrefix "confluence-IndexingStatistics"
-
-
- InstancePrefix "last_elapsed_ms"
- Type "total_time_in_ms"
- Table false
- Attribute "LastElapsedMilliseconds"
-
-
-
- InstancePrefix "task_queue_length"
- Type "queue_length"
- Table false
- Attribute "TaskQueueLength"
-
-
-
-
- ObjectName "Confluence:name=MailTaskQueue"
- InstancePrefix "confluence-MailTaskQueue"
-
-
- Type "email_count"
- InstancePrefix "retry_count"
- Table false
- Attribute "RetryCount"
-
-
-
- Type "email_count"
- InstancePrefix "tasks"
- Table false
- Attribute "TasksSize"
-
-
-
- Type "email_count"
- InstancePrefix "error_queue"
- Table false
- Attribute "ErrorQueueSize"
-
-
-
-
- ObjectName "Confluence:name=RequestMetrics"
- InstancePrefix "confluence-RequestMetrics"
-
-
- Type "requests"
- InstancePrefix "avg_exec_time_for_last_ten_requests"
- Table false
- Attribute "AverageExecutionTimeForLastTenRequests"
-
-
-
- Type "requests"
- InstancePrefix "current_num_requests_being_served"
- Table false
- Attribute "CurrentNumberOfRequestsBeingServed"
-
-
-
- Type "requests"
- InstancePrefix "error_count"
- Table false
- Attribute "ErrorCount"
-
-
-
- Type "requests"
- InstancePrefix "num_requests_in_last_ten_secs"
- Table false
- Attribute "NumberOfRequestsInLastTenSeconds"
-
-
-
- Type "requests"
- InstancePrefix "requests_began"
- Table false
- Attribute "RequestsBegan"
-
-
-
- Type "requests"
- InstancePrefix "requests_served"
- Table false
- Attribute "RequestsServed"
-
-
-
-
- ObjectName "Confluence:name=SystemInformation"
- InstancePrefix "confluence-SystemInformation"
-
-
- Type "latency"
- InstancePrefix "database_example_latency"
- Table false
- Attribute "DatabaseExampleLatency"
-
-
-
- Type "response_time"
- InstancePrefix "start_time"
- Table false
- Attribute "StartTime"
-
-
-
- # Hazelcast statistic JMX configuration
-
- ObjectName "com.hazelcast:instance=confluence,name=operationServiceconfluence,type=HazelcastInstance.OperationService"
- InstancePrefix "confluence-Hazelcast-OperationService"
-
-
- Type "derive"
- InstancePrefix "executedOperationCount"
- Attribute "executedOperationCount"
-
-
-
- Type "gauge"
- InstancePrefix "operationThreadCount"
- Attribute "operationThreadCount"
-
-
-
- Type "gauge"
- InstancePrefix "remoteOperationCount"
- Attribute "remoteOperationCount"
-
-
-
- Type "gauge"
- InstancePrefix "responseQueueSize"
- Attribute "responseQueueSize"
-
-
-
- Type "gauge"
- InstancePrefix "runningOperationsCount"
-
- Attribute "runningOperationsCount"
-
-
-
-
- ObjectName "com.hazelcast:instance=confluence,name=confluence,type=HazelcastInstance.EventService"
- InstancePrefix "confluence-Hazelcast-EventService"
-
-
- Type "gauge"
- InstancePrefix "eventThreadCount"
- Attribute "eventThreadCount"
-
-
-
- Type "gauge"
- InstancePrefix "eventQueueCapacity"
- Attribute "eventQueueCapacity"
-
-
-
- Type "gauge"
- InstancePrefix "eventQueueSize"
- Attribute "eventQueueSize"
-
-
-
-
- ObjectName "Confluence:name=HibernateStatistics"
- InstancePrefix "confluence-HibernateStatistics"
-
-
- Type "gauge"
- InstancePrefix "CloseStatementCount"
- Attribute "CloseStatementCount"
-
-
-
- Type "gauge"
- InstancePrefix "CollectionFetchCount"
- Attribute "CollectionFetchCount"
-
-
-
- Type "gauge"
- InstancePrefix "CollectionLoadCount"
- Attribute "CollectionLoadCount"
-
-
-
- Type "gauge"
- InstancePrefix "CollectionRecreateCount"
- Attribute "CollectionRecreateCount"
-
-
-
- Type "gauge"
- InstancePrefix "CollectionRemoveCount"
- Attribute "CollectionRemoveCount"
-
-
-
- Type "gauge"
- InstancePrefix "CollectionUpdateCount"
- Attribute "CollectionUpdateCount"
-
-
-
- Type "gauge"
- InstancePrefix "ConnectCount"
- Attribute "ConnectCount"
-
-
-
- Type "gauge"
- InstancePrefix "EntityDeleteCount"
- Attribute "EntityDeleteCount"
-
-
-
- Type "gauge"
- InstancePrefix "EntityFetchCount"
- Attribute "EntityFetchCount"
-
-
-
- Type "gauge"
- InstancePrefix "EntityInsertCount"
- Attribute "EntityInsertCount"
-
-
-
- Type "gauge"
- InstancePrefix "EntityLoadCount"
- Attribute "EntityLoadCount"
-
-
- # fqname = org.hibernate.core/#EntityUpdateCount
-
- Type "gauge"
- InstancePrefix "EntityUpdateCount"
- Attribute "EntityUpdateCount"
-
-
- # fqname = org.hibernate.core/#FlushCount
-
- Type "gauge"
- InstancePrefix "FlushCount"
- Attribute "FlushCount"
-
-
- # fqname = org.hibernate.core/#NaturalIdCacheHitCount
-
- Type "gauge"
- InstancePrefix "NaturalIdCacheHitCount"
- Attribute "NaturalIdCacheHitCount"
-
-
- # fqname = org.hibernate.core/#NaturalIdCacheMissCount
-
- Type "gauge"
- InstancePrefix "NaturalIdCacheMissCount"
- Attribute "NaturalIdCacheMissCount"
-
-
- # fqname = org.hibernate.core/#NaturalIdCachePutCount
-
- Type "gauge"
- InstancePrefix "NaturalIdCachePutCount"
- Attribute "NaturalIdCachePutCount"
-
-
- # fqname = org.hibernate.core/#NaturalIdQueryExecutionCount
-
- Type "gauge"
- InstancePrefix "NaturalIdQueryExecutionCount"
- Attribute "NaturalIdQueryExecutionCount"
-
-
- # fqname = org.hibernate.core/#NaturalIdQueryExecutionMaxTime
-
- Type "gauge"
- InstancePrefix "NaturalIdQueryExecutionMaxTime"
- Attribute "NaturalIdQueryExecutionMaxTime"
-
-
- # fqname = org.hibernate.core/#OptimisticFailureCount
-
- Type "gauge"
- InstancePrefix "OptimisticFailureCount"
- Attribute "OptimisticFailureCount"
-
-
- # fqname = org.hibernate.core/#PrepareStatementCount
-
- Type "gauge"
- InstancePrefix "PrepareStatementCount"
- Attribute "PrepareStatementCount"
-
-
- # fqname = org.hibernate.core/#QueryCacheHitCount
-
- Type "gauge"
- InstancePrefix "QueryCacheHitCount"
- Attribute "QueryCacheHitCount"
-
-
- # fqname = org.hibernate.core/#QueryCacheMissCount
-
- Type "gauge"
- InstancePrefix "QueryCacheMissCount"
- Attribute "QueryCacheMissCount"
-
-
- # fqname = org.hibernate.core/#QueryCachePutCount
-
- Type "gauge"
- InstancePrefix "QueryCachePutCount"
- Attribute "QueryCachePutCount"
-
-
- # fqname = org.hibernate.core/#QueryExecutionCount
-
- Type "gauge"
- InstancePrefix "QueryExecutionCount"
- Attribute "QueryExecutionCount"
-
-
- # fqname = org.hibernate.core/#QueryExecutionMaxTime
-
- Type "gauge"
- InstancePrefix "QueryExecutionMaxTime"
- Attribute "QueryExecutionMaxTime"
-
-
- # fqname = org.hibernate.core/#SecondLevelCacheHitCount
-
- Type "gauge"
- InstancePrefix "SecondLevelCacheHitCount"
- Attribute "SecondLevelCacheHitCount"
-
-
- # fqname = org.hibernate.core/#SecondLevelCacheMissCount
-
- Type "gauge"
- InstancePrefix "SecondLevelCacheMissCount"
- Attribute "SecondLevelCacheMissCount"
-
-
- # fqname = org.hibernate.core/#SecondLevelCachePutCount
-
- Type "gauge"
- InstancePrefix "SecondLevelCachePutCount"
- Attribute "SecondLevelCachePutCount"
-
-
- # fqname = org.hibernate.core/#SessionCloseCount
-
- Type "gauge"
- InstancePrefix "SessionCloseCount"
- Attribute "SessionCloseCount"
-
-
- # fqname = org.hibernate.core/#TransactionCount
-
- Type "gauge"
- InstancePrefix "TransactionCount"
- Attribute "TransactionCount"
-
-
- # fqname = org.hibernate.core/#UpdateTimestampsCacheHitCount
-
- Type "gauge"
- InstancePrefix "UpdateTimestampsCacheHitCount"
- Attribute "UpdateTimestampsCacheHitCount"
-
-
- # fqname = org.hibernate.core/#UpdateTimestampsCacheMissCount
-
- Type "gauge"
- InstancePrefix "UpdateTimestampsCacheMissCount"
- Attribute "UpdateTimestampsCacheMissCount"
-
-
- # fqname = org.hibernate.core/#UpdateTimestampsCachePutCount
-
- Type "gauge"
- InstancePrefix "UpdateTimestampsCachePutCount"
- Attribute "UpdateTimestampsCachePutCount"
-
-
-
- # C3P0 Connection pool JMX Configuration
-
- ObjectName "com.mchange.v2.c3p0:type=PooledDataSource,*"
- InstancePrefix "confluence-c3p0-PooledDataSource"
-
-
- Type "gauge"
- InstancePrefix "numBusyConnections"
- Attribute "numBusyConnections"
-
-
-
- Type "gauge"
- InstancePrefix "numIdleConnections"
- Attribute "numIdleConnections"
-
-
-
- Type "gauge"
- InstancePrefix "threadPoolNumIdleThreads"
- Attribute "threadPoolNumIdleThreads"
-
-
-
- Type "gauge"
- InstancePrefix "numConnections"
- Attribute "numConnections"
-
-
-
- # Apache Tomcat JMX configuration
-
- ObjectName "*:type=GlobalRequestProcessor,*"
- InstancePrefix "catalina_request_processor-"
- InstanceFrom "name"
-
-
- Type "io_octets"
- InstancePrefix "global"
- #InstanceFrom ""
- Table false
- Attribute "bytesReceived"
- Attribute "bytesSent"
-
-
-
- Type "total_requests"
- InstancePrefix "global"
- #InstanceFrom ""
- Table false
- Attribute "requestCount"
-
-
-
- Type "total_time_in_ms"
- InstancePrefix "global-processing"
- #InstanceFrom ""
- Table false
- Attribute "processingTime"
-
-
-
-
- ObjectName "*:type=RequestProcessor,*"
- InstancePrefix "catalina_request_processor-"
- InstanceFrom "worker"
-
-
- Type "io_octets"
- #InstancePrefix ""
- InstanceFrom "name"
- Table false
- Attribute "bytesReceived"
- Attribute "bytesSent"
-
-
-
- Type "total_requests"
- #InstancePrefix ""
- InstanceFrom "name"
- Table false
- Attribute "requestCount"
-
-
-
- Type "total_time_in_ms"
- InstancePrefix "processing-"
- InstanceFrom "name"
- Table false
- Attribute "processingTime"
-
-
-
-
- ObjectName "*:type=ThreadPool,*"
- InstancePrefix "request_processor-"
- InstanceFrom "name"
-
-
- Type "threads"
- InstancePrefix "total"
- #InstanceFrom ""
- Table false
- Attribute "currentThreadCount"
-
-
-
- Type "threads"
- InstancePrefix "running"
- #InstanceFrom ""
- Table false
- Attribute "currentThreadsBusy"
-
-
-
- # General JVM configuration
-
- ObjectName "java.lang:type=Memory,*"
- InstancePrefix "java_memory"
- #InstanceFrom "name"
-
-
- Type "memory"
- InstancePrefix "heap-"
- #InstanceFrom ""
- Table true
- Attribute "HeapMemoryUsage"
-
-
-
- Type "memory"
- InstancePrefix "nonheap-"
- #InstanceFrom ""
- Table true
- Attribute "NonHeapMemoryUsage"
-
-
-
-
- ObjectName "java.lang:type=MemoryPool,*"
- InstancePrefix "java_memory_pool-"
- InstanceFrom "name"
-
-
- Type "memory"
- #InstancePrefix ""
- #InstanceFrom ""
- Table true
- Attribute "Usage"
-
-
-
-
- ObjectName "java.lang:type=ClassLoading"
- InstancePrefix "java"
- #InstanceFrom ""
-
-
- Type "gauge"
- InstancePrefix "loaded_classes"
- #InstanceFrom ""
- Table false
- Attribute "LoadedClassCount"
-
-
-
-
- ObjectName "java.lang:type=Compilation"
- InstancePrefix "java"
- #InstanceFrom ""
-
-
- Type "total_time_in_ms"
- InstancePrefix "compilation_time"
- #InstanceFrom ""
- Table false
- Attribute "TotalCompilationTime"
-
-
-
-
- ObjectName "java.lang:type=GarbageCollector,*"
- InstancePrefix "java_gc-"
- InstanceFrom "name"
-
-
- Type "invocations"
- #InstancePrefix ""
- #InstanceFrom ""
- Table false
- Attribute "CollectionCount"
-
-
-
- Type "total_time_in_ms"
- InstancePrefix "collection_time"
- #InstanceFrom ""
- Table false
- Attribute "CollectionTime"
-
-
-
-
- ObjectName "java.lang:type=OperatingSystem"
-
- # Open file descriptors
-
- Type "gauge"
- InstancePrefix "os-open_fd_count"
- Table false
- Attribute "OpenFileDescriptorCount"
-
-
- # Max. allowed handles for user under which the JavaVM is running
-
- Type "gauge"
- InstancePrefix "os-max_fd_count"
- Table false
- Attribute "MaxFileDescriptorCount"
-
-
- # Process time used by the JavaVM
-
- Type "counter"
- InstancePrefix "os-process_cpu_time"
- Table false
- Attribute "ProcessCpuTime"
-
-
-
-
- #Host "localhost"
- ServiceURL "service:jmx:rmi:///jndi/rmi://localhost:9999/jmxrmi"
- User "monitorRole"
-
- # Confluence
- Collect "confluence/IndexingStatistics"
- Collect "confluence/MailTaskQueue"
- Collect "confluence/RequestMetrics"
- Collect "confluence/SystemInformation"
-
- # Hazelcast
- Collect "com.hazelcast/HazelcastInstance.OperationService.hazelcast.operationServicehazelcast"
- Collect "com.hazelcast/HazelcastInstance.EventService.hazelcast.hazelcast"
-
- # Hibernate
- Collect "com.atlassian.confluence/HibernateStatistics"
-
- # C3P0
- Collect "com.mchange.v2.c3p0/PooledDataSource"
-
- # Tomcat
- Collect "catalina/global_request_processor"
- Collect "catalina/detailed_request_processor"
- Collect "catalina/thread_pool"
-
- # JVM
- Collect "memory"
- Collect "memory_pool"
- Collect "classes"
- Collect "compilation"
- Collect "garbage_collector"
- Collect "jvm_localhost_os"
-
-
diff --git a/roles/az_common/defaults/main.yml b/roles/az_common/defaults/main.yml
deleted file mode 100644
index 0477c28..0000000
--- a/roles/az_common/defaults/main.yml
+++ /dev/null
@@ -1,7 +0,0 @@
----
-# Values taken from https://docs.microsoft.com/en-us/sql/connect/jdbc/connecting-to-an-azure-sql-database
-# Windows values are milliseconds, Linux values are seconds
-sysctl_config:
- net.ipv4.tcp_keepalive_time: 30
- net.ipv4.tcp_keepalive_intvl: 1
- net.ipv6.tcp_keepalive_probes: 10
diff --git a/roles/az_common/tasks/main.yml b/roles/az_common/tasks/main.yml
index 7c3003e..ddb6b53 100644
--- a/roles/az_common/tasks/main.yml
+++ b/roles/az_common/tasks/main.yml
@@ -19,15 +19,3 @@
atl_cluster_node_id: "{{ az_vm_id.stdout }}"
tags:
- runtime_pkg
-
-- name: Tune TCP Keep Alive
- sysctl:
- name: '{{ item.key }}'
- value: '{{ item.value }}'
- reload: yes
- ignoreerrors: yes
- sysctl_file: /etc/sysctl.conf
- sysctl_set: yes
- with_dict: '{{ sysctl_config }}'
- tags:
- - runtime_pkg
diff --git a/roles/confluence_config/tasks/main.yml b/roles/confluence_config/tasks/main.yml
index 887324e..6030c90 100644
--- a/roles/confluence_config/tasks/main.yml
+++ b/roles/confluence_config/tasks/main.yml
@@ -1,5 +1,11 @@
---
+- debug:
+ msg: atl_db_engine {{ atl_db_engine }}
+
+- debug:
+ msg: atl_dbms {{ atl_dbms }}
+
- name: Create application directories
file:
path: "{{ item }}"
diff --git a/roles/crowd_config/tasks/main.yml b/roles/crowd_config/tasks/main.yml
index e72e934..7da6280 100644
--- a/roles/crowd_config/tasks/main.yml
+++ b/roles/crowd_config/tasks/main.yml
@@ -51,7 +51,7 @@
lineinfile:
path: "{{ atl_product_installation_versioned }}/apache-tomcat/bin/setenv.sh"
insertafter: "EOF"
- line: "export JAVA_HOME={{ java_home | default('/usr/lib/jvm/jre-{{ java_version }}-openjdk')}}"
+ line: "export JAVA_HOME={{ java_home | default('/usr/lib/jvm/jre-{{ java_version }}-openjdk') }}"
- name: Create application directories
file:
@@ -139,8 +139,8 @@
xpath: "/application-configuration/properties/property[@name='hibernate.connection.url']"
value: "{{ atl_jdbc_url }}?reWriteBatchedInserts=true"
when: crowd_cfg_stat_result.stat.exists
-
+
- name: Remove crowd.xml to prevent duplicates from appearing in cluster reporting
file:
path: "{{ atl_product_installation_versioned }}/apache-tomcat/conf/Catalina/localhost/crowd.xml"
- state: absent
\ No newline at end of file
+ state: absent
diff --git a/roles/crowd_config/templates/server.xml.j2 b/roles/crowd_config/templates/server.xml.j2
index 77b9128..3af55c7 100644
--- a/roles/crowd_config/templates/server.xml.j2
+++ b/roles/crowd_config/templates/server.xml.j2
@@ -4,10 +4,6 @@
shutdown="SHUTDOWN">
-
@@ -50,6 +52,7 @@
redirectPort="{{ atl_tomcat_redirectport }}"
protocol=""AJP/1.3"" />
-->
+ {% if atl_tomcat_redirectport is defined and atl_tomcat_redirectport != '' %}
+ {% endif %}