mirror of
https://bitbucket.org/atlassian/dc-deployments-automation.git
synced 2025-12-17 02:13:06 -06:00
AZURE-210 Deploy Crowd DC to Azure
This commit is contained in:
12
roles/az_app_insights_install/.yamllint
Normal file
12
roles/az_app_insights_install/.yamllint
Normal file
@@ -0,0 +1,12 @@
|
||||
extends: default
|
||||
|
||||
rules:
|
||||
braces:
|
||||
max-spaces-inside: 1
|
||||
level: error
|
||||
brackets:
|
||||
max-spaces-inside: 1
|
||||
level: error
|
||||
line-length: disable
|
||||
truthy: disable
|
||||
trailing-spaces: false
|
||||
5
roles/az_app_insights_install/defaults/main.yml
Normal file
5
roles/az_app_insights_install/defaults/main.yml
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
|
||||
app_insights_version: "{{ lookup('env', 'APPINSIGHTS_VER') or '2.3.1' }}"
|
||||
app_insights_instrumentation_key: "{{ lookup('env', 'APPINSIGHTS_INSTRUMENTATION_KEY') or 'XXX' }}"
|
||||
app_insights_jaxb_version: 2.3.1
|
||||
3
roles/az_app_insights_install/handlers/main.yml
Normal file
3
roles/az_app_insights_install/handlers/main.yml
Normal file
@@ -0,0 +1,3 @@
|
||||
---
|
||||
- name: Restart Collectd
|
||||
service: name=collectd state=restarted
|
||||
14
roles/az_app_insights_install/molecule/default/Dockerfile.j2
Normal file
14
roles/az_app_insights_install/molecule/default/Dockerfile.j2
Normal file
@@ -0,0 +1,14 @@
|
||||
# Molecule managed
|
||||
|
||||
{% if item.registry is defined %}
|
||||
FROM {{ item.registry.url }}/{{ item.image }}
|
||||
{% else %}
|
||||
FROM {{ item.image }}
|
||||
{% endif %}
|
||||
|
||||
RUN if [ $(command -v apt-get) ]; then apt-get update && apt-get install -y python sudo bash ca-certificates && apt-get clean; \
|
||||
elif [ $(command -v dnf) ]; then dnf makecache && dnf --assumeyes install python sudo python-devel python*-dnf bash && dnf clean all; \
|
||||
elif [ $(command -v yum) ]; then yum makecache fast && yum install -y python sudo yum-plugin-ovl bash && sed -i 's/plugins=0/plugins=1/g' /etc/yum.conf && yum clean all; \
|
||||
elif [ $(command -v zypper) ]; then zypper refresh && zypper install -y python sudo bash python-xml && zypper clean -a; \
|
||||
elif [ $(command -v apk) ]; then apk update && apk add --no-cache python sudo bash ca-certificates; \
|
||||
elif [ $(command -v xbps-install) ]; then xbps-install -Syu && xbps-install -y python sudo bash ca-certificates && xbps-remove -O; fi
|
||||
28
roles/az_app_insights_install/molecule/default/molecule.yml
Normal file
28
roles/az_app_insights_install/molecule/default/molecule.yml
Normal file
@@ -0,0 +1,28 @@
|
||||
---
|
||||
dependency:
|
||||
name: galaxy
|
||||
driver:
|
||||
name: docker
|
||||
lint:
|
||||
name: yamllint
|
||||
platforms:
|
||||
- name: ubuntu_lts
|
||||
image: ubuntu:bionic
|
||||
groups:
|
||||
- az_node_local
|
||||
provisioner:
|
||||
name: ansible
|
||||
options:
|
||||
skip-tags: runtime_pkg
|
||||
lint:
|
||||
name: ansible-lint
|
||||
options:
|
||||
x: ["701"]
|
||||
inventory:
|
||||
links:
|
||||
group_vars: ../../../../group_vars/
|
||||
verifier:
|
||||
name: testinfra
|
||||
lint:
|
||||
name: flake8
|
||||
enabled: false
|
||||
13
roles/az_app_insights_install/molecule/default/playbook.yml
Normal file
13
roles/az_app_insights_install/molecule/default/playbook.yml
Normal file
@@ -0,0 +1,13 @@
|
||||
---
|
||||
- name: Converge
|
||||
hosts: all
|
||||
vars:
|
||||
atl_product_family: "crowd"
|
||||
atl_product_edition: "crowd"
|
||||
atl_product_user: "crowd"
|
||||
atl_download_format: "tarball"
|
||||
roles:
|
||||
- role: linux_common
|
||||
- role: product_common
|
||||
- role: product_install
|
||||
- role: az_app_insights_install
|
||||
@@ -0,0 +1,38 @@
|
||||
import os
|
||||
import pytest
|
||||
|
||||
import testinfra.utils.ansible_runner
|
||||
|
||||
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
||||
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
|
||||
|
||||
def test_collectd_installed(host):
|
||||
package = host.package('collectd')
|
||||
assert package.is_installed
|
||||
|
||||
def test_collectd_file(host):
|
||||
f = host.file('/etc/collectd/collectd.conf')
|
||||
assert f.exists
|
||||
assert f.contains('InstrumentationKey "XXX"')
|
||||
assert f.mode == 0o0644
|
||||
|
||||
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')
|
||||
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
|
||||
46
roles/az_app_insights_install/tasks/main.yml
Normal file
46
roles/az_app_insights_install/tasks/main.yml
Normal file
@@ -0,0 +1,46 @@
|
||||
---
|
||||
|
||||
- name: Install collectd for app insights
|
||||
package:
|
||||
name:
|
||||
- collectd
|
||||
|
||||
- name: Configure Collectd
|
||||
template: src=collectd.conf.j2 dest=/etc/collectd/collectd.conf
|
||||
notify:
|
||||
- Restart Collectd
|
||||
|
||||
- name: Change collectd.conf permissions
|
||||
file:
|
||||
path: /etc/collectd/collectd.conf
|
||||
mode: '+r'
|
||||
|
||||
- name: Install JAXB
|
||||
get_url:
|
||||
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
|
||||
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"
|
||||
@@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ApplicationInsights xmlns="http://schemas.microsoft.com/ApplicationInsights/2013/Settings" schemaVersion="2014-05-30">
|
||||
|
||||
<!-- The key from the portal: -->
|
||||
<InstrumentationKey>{{ app_insights_instrumentation_key }}</InstrumentationKey>
|
||||
|
||||
<!-- HTTP request component (not required for bare API) -->
|
||||
<TelemetryModules>
|
||||
<Add type="com.microsoft.applicationinsights.web.extensibility.modules.WebRequestTrackingTelemetryModule"/>
|
||||
<Add type="com.microsoft.applicationinsights.web.extensibility.modules.WebSessionTrackingTelemetryModule"/>
|
||||
<Add type="com.microsoft.applicationinsights.web.extensibility.modules.WebUserTrackingTelemetryModule"/>
|
||||
</TelemetryModules>
|
||||
|
||||
<!-- Events correlation (not required for bare API) -->
|
||||
<!-- These initializers add context data to each event -->
|
||||
<TelemetryInitializers>
|
||||
<Add type="com.microsoft.applicationinsights.web.extensibility.initializers.WebOperationIdTelemetryInitializer"/>
|
||||
<Add type="com.microsoft.applicationinsights.web.extensibility.initializers.WebOperationNameTelemetryInitializer"/>
|
||||
<Add type="com.microsoft.applicationinsights.web.extensibility.initializers.WebSessionTelemetryInitializer"/>
|
||||
<Add type="com.microsoft.applicationinsights.web.extensibility.initializers.WebUserTelemetryInitializer"/>
|
||||
<Add type="com.microsoft.applicationinsights.web.extensibility.initializers.WebUserAgentTelemetryInitializer"/>
|
||||
</TelemetryInitializers>
|
||||
|
||||
</ApplicationInsights>
|
||||
764
roles/az_app_insights_install/templates/collectd.conf.j2
Normal file
764
roles/az_app_insights_install/templates/collectd.conf.j2
Normal file
@@ -0,0 +1,764 @@
|
||||
FQDNLookup true
|
||||
BaseDir "/var/lib/collectd"
|
||||
PIDFile "/var/run/collectd.pid"
|
||||
PluginDir "/usr/lib/collectd"
|
||||
TypesDB "/usr/share/collectd/types.db"
|
||||
Interval 10
|
||||
Timeout 2
|
||||
ReadThreads 5
|
||||
WriteThreads 5
|
||||
LoadPlugin logfile
|
||||
<Plugin "logfile">
|
||||
LogLevel "info"
|
||||
File "/var/log/collectd.log"
|
||||
Timestamp true
|
||||
</Plugin>
|
||||
LoadPlugin aggregation
|
||||
<Plugin aggregation>
|
||||
<Aggregation>
|
||||
Plugin "cpu"
|
||||
Type "cpu"
|
||||
GroupBy "Host"
|
||||
GroupBy "TypeInstance"
|
||||
CalculateSum true
|
||||
CalculateAverage true
|
||||
</Aggregation>
|
||||
</Plugin>
|
||||
|
||||
# Collect CPU statistics
|
||||
LoadPlugin cpu
|
||||
|
||||
# Write collected statistics in CSV format
|
||||
LoadPlugin csv
|
||||
<Plugin csv>
|
||||
DataDir "/var/lib/collectd/csv"
|
||||
StoreRates false
|
||||
</Plugin>
|
||||
|
||||
# Collect partition usage statistics
|
||||
LoadPlugin df
|
||||
<Plugin df>
|
||||
Device "/dev/xvda1"
|
||||
MountPoint "/media/atl"
|
||||
IgnoreSelected false
|
||||
ReportByDevice false
|
||||
ReportReserved false
|
||||
ReportInodes false
|
||||
ValuesAbsolute true
|
||||
ValuesPercentage false
|
||||
</Plugin>
|
||||
|
||||
# Collect disk IO statistics
|
||||
LoadPlugin disk
|
||||
<Plugin disk>
|
||||
Disk "/^[hs]d[a-f][0-9]?$/"
|
||||
IgnoreSelected false
|
||||
</Plugin>
|
||||
|
||||
# Collect network interface usage statistics
|
||||
LoadPlugin interface
|
||||
<Plugin interface>
|
||||
Interface "eth0"
|
||||
IgnoreSelected false
|
||||
</Plugin>
|
||||
|
||||
# Collect system load statistics
|
||||
LoadPlugin load
|
||||
|
||||
# Collect memory utilization statistics
|
||||
LoadPlugin memory
|
||||
<Plugin memory>
|
||||
# Don't use absolute as each AWS ec2 instance is different, use percentage instead to get a uniform view
|
||||
ValuesAbsolute false
|
||||
ValuesPercentage true
|
||||
</Plugin>
|
||||
|
||||
LoadPlugin swap
|
||||
<Plugin "swap">
|
||||
ReportByDevice false
|
||||
ReportBytes true
|
||||
</Plugin>
|
||||
|
||||
LoadPlugin java
|
||||
<Plugin java>
|
||||
JVMArg "-verbose:jni"
|
||||
JVMArg "-Djava.class.path=/usr/share/collectd/java/jaxb-api-2.3.1.jar:/usr/share/collectd/java/applicationinsights-collectd-{{ app_insights_version }}.jar:/usr/share/collectd/java/collectd-api.jar:/usr/share/collectd/java/generic-jmx.jar"
|
||||
|
||||
# Enabling Application Insights plugin
|
||||
LoadPlugin "com.microsoft.applicationinsights.collectd.ApplicationInsightsWriter"
|
||||
|
||||
# Configuring Application Insights plugin
|
||||
<Plugin ApplicationInsightsWriter>
|
||||
InstrumentationKey "{{ app_insights_instrumentation_key }}"
|
||||
SDKLogger true
|
||||
</Plugin>
|
||||
|
||||
LoadPlugin "org.collectd.java.GenericJMX"
|
||||
<Plugin "GenericJMX">
|
||||
|
||||
# Confluence indexing statistics
|
||||
<MBean "confluence/IndexingStatistics">
|
||||
ObjectName "Confluence:name=IndexingStatistics"
|
||||
InstancePrefix "confluence-IndexingStatistics"
|
||||
|
||||
<Value>
|
||||
InstancePrefix "last_elapsed_ms"
|
||||
Type "total_time_in_ms"
|
||||
Table false
|
||||
Attribute "LastElapsedMilliseconds"
|
||||
</Value>
|
||||
|
||||
<Value>
|
||||
InstancePrefix "task_queue_length"
|
||||
Type "queue_length"
|
||||
Table false
|
||||
Attribute "TaskQueueLength"
|
||||
</Value>
|
||||
</MBean>
|
||||
|
||||
<MBean "confluence/MailTaskQueue">
|
||||
ObjectName "Confluence:name=MailTaskQueue"
|
||||
InstancePrefix "confluence-MailTaskQueue"
|
||||
|
||||
<Value>
|
||||
Type "email_count"
|
||||
InstancePrefix "retry_count"
|
||||
Table false
|
||||
Attribute "RetryCount"
|
||||
</Value>
|
||||
|
||||
<Value>
|
||||
Type "email_count"
|
||||
InstancePrefix "tasks"
|
||||
Table false
|
||||
Attribute "TasksSize"
|
||||
</Value>
|
||||
|
||||
<Value>
|
||||
Type "email_count"
|
||||
InstancePrefix "error_queue"
|
||||
Table false
|
||||
Attribute "ErrorQueueSize"
|
||||
</Value>
|
||||
</MBean>
|
||||
|
||||
<MBean "confluence/RequestMetrics">
|
||||
ObjectName "Confluence:name=RequestMetrics"
|
||||
InstancePrefix "confluence-RequestMetrics"
|
||||
|
||||
<Value>
|
||||
Type "requests"
|
||||
InstancePrefix "avg_exec_time_for_last_ten_requests"
|
||||
Table false
|
||||
Attribute "AverageExecutionTimeForLastTenRequests"
|
||||
</Value>
|
||||
|
||||
<Value>
|
||||
Type "requests"
|
||||
InstancePrefix "current_num_requests_being_served"
|
||||
Table false
|
||||
Attribute "CurrentNumberOfRequestsBeingServed"
|
||||
</Value>
|
||||
|
||||
<Value>
|
||||
Type "requests"
|
||||
InstancePrefix "error_count"
|
||||
Table false
|
||||
Attribute "ErrorCount"
|
||||
</Value>
|
||||
|
||||
<Value>
|
||||
Type "requests"
|
||||
InstancePrefix "num_requests_in_last_ten_secs"
|
||||
Table false
|
||||
Attribute "NumberOfRequestsInLastTenSeconds"
|
||||
</Value>
|
||||
|
||||
<Value>
|
||||
Type "requests"
|
||||
InstancePrefix "requests_began"
|
||||
Table false
|
||||
Attribute "RequestsBegan"
|
||||
</Value>
|
||||
|
||||
<Value>
|
||||
Type "requests"
|
||||
InstancePrefix "requests_served"
|
||||
Table false
|
||||
Attribute "RequestsServed"
|
||||
</Value>
|
||||
</MBean>
|
||||
|
||||
<MBean "confluence/SystemInformation">
|
||||
ObjectName "Confluence:name=SystemInformation"
|
||||
InstancePrefix "confluence-SystemInformation"
|
||||
|
||||
<Value>
|
||||
Type "latency"
|
||||
InstancePrefix "database_example_latency"
|
||||
Table false
|
||||
Attribute "DatabaseExampleLatency"
|
||||
</Value>
|
||||
|
||||
<Value>
|
||||
Type "response_time"
|
||||
InstancePrefix "start_time"
|
||||
Table false
|
||||
Attribute "StartTime"
|
||||
</Value>
|
||||
</MBean>
|
||||
|
||||
# Hazelcast statistic JMX configuration
|
||||
<MBean "com.hazelcast/HazelcastInstance.OperationService.hazelcast.operationServicehazelcast">
|
||||
ObjectName "com.hazelcast:instance=confluence,name=operationServiceconfluence,type=HazelcastInstance.OperationService"
|
||||
InstancePrefix "confluence-Hazelcast-OperationService"
|
||||
|
||||
<Value>
|
||||
Type "derive"
|
||||
InstancePrefix "executedOperationCount"
|
||||
Attribute "executedOperationCount"
|
||||
</Value>
|
||||
|
||||
<Value>
|
||||
Type "gauge"
|
||||
InstancePrefix "operationThreadCount"
|
||||
Attribute "operationThreadCount"
|
||||
</Value>
|
||||
|
||||
<Value>
|
||||
Type "gauge"
|
||||
InstancePrefix "remoteOperationCount"
|
||||
Attribute "remoteOperationCount"
|
||||
</Value>
|
||||
|
||||
<Value>
|
||||
Type "gauge"
|
||||
InstancePrefix "responseQueueSize"
|
||||
Attribute "responseQueueSize"
|
||||
</Value>
|
||||
|
||||
<Value>
|
||||
Type "gauge"
|
||||
InstancePrefix "runningOperationsCount"
|
||||
|
||||
Attribute "runningOperationsCount"
|
||||
</Value>
|
||||
</MBean>
|
||||
|
||||
<MBean "com.hazelcast/HazelcastInstance.EventService.hazelcast.hazelcast">
|
||||
ObjectName "com.hazelcast:instance=confluence,name=confluence,type=HazelcastInstance.EventService"
|
||||
InstancePrefix "confluence-Hazelcast-EventService"
|
||||
|
||||
<Value>
|
||||
Type "gauge"
|
||||
InstancePrefix "eventThreadCount"
|
||||
Attribute "eventThreadCount"
|
||||
</Value>
|
||||
|
||||
<Value>
|
||||
Type "gauge"
|
||||
InstancePrefix "eventQueueCapacity"
|
||||
Attribute "eventQueueCapacity"
|
||||
</Value>
|
||||
|
||||
<Value>
|
||||
Type "gauge"
|
||||
InstancePrefix "eventQueueSize"
|
||||
Attribute "eventQueueSize"
|
||||
</Value>
|
||||
</MBean>
|
||||
|
||||
<MBean "com.atlassian.confluence/HibernateStatistics">
|
||||
ObjectName "Confluence:name=HibernateStatistics"
|
||||
InstancePrefix "confluence-HibernateStatistics"
|
||||
|
||||
<Value>
|
||||
Type "gauge"
|
||||
InstancePrefix "CloseStatementCount"
|
||||
Attribute "CloseStatementCount"
|
||||
</Value>
|
||||
|
||||
<Value>
|
||||
Type "gauge"
|
||||
InstancePrefix "CollectionFetchCount"
|
||||
Attribute "CollectionFetchCount"
|
||||
</Value>
|
||||
|
||||
<Value>
|
||||
Type "gauge"
|
||||
InstancePrefix "CollectionLoadCount"
|
||||
Attribute "CollectionLoadCount"
|
||||
</Value>
|
||||
|
||||
<Value>
|
||||
Type "gauge"
|
||||
InstancePrefix "CollectionRecreateCount"
|
||||
Attribute "CollectionRecreateCount"
|
||||
</Value>
|
||||
|
||||
<Value>
|
||||
Type "gauge"
|
||||
InstancePrefix "CollectionRemoveCount"
|
||||
Attribute "CollectionRemoveCount"
|
||||
</Value>
|
||||
|
||||
<Value>
|
||||
Type "gauge"
|
||||
InstancePrefix "CollectionUpdateCount"
|
||||
Attribute "CollectionUpdateCount"
|
||||
</Value>
|
||||
|
||||
<Value>
|
||||
Type "gauge"
|
||||
InstancePrefix "ConnectCount"
|
||||
Attribute "ConnectCount"
|
||||
</Value>
|
||||
|
||||
<Value>
|
||||
Type "gauge"
|
||||
InstancePrefix "EntityDeleteCount"
|
||||
Attribute "EntityDeleteCount"
|
||||
</Value>
|
||||
|
||||
<Value>
|
||||
Type "gauge"
|
||||
InstancePrefix "EntityFetchCount"
|
||||
Attribute "EntityFetchCount"
|
||||
</Value>
|
||||
|
||||
<Value>
|
||||
Type "gauge"
|
||||
InstancePrefix "EntityInsertCount"
|
||||
Attribute "EntityInsertCount"
|
||||
</Value>
|
||||
|
||||
<Value>
|
||||
Type "gauge"
|
||||
InstancePrefix "EntityLoadCount"
|
||||
Attribute "EntityLoadCount"
|
||||
</Value>
|
||||
|
||||
# fqname = org.hibernate.core/#EntityUpdateCount
|
||||
<Value>
|
||||
Type "gauge"
|
||||
InstancePrefix "EntityUpdateCount"
|
||||
Attribute "EntityUpdateCount"
|
||||
</Value>
|
||||
|
||||
# fqname = org.hibernate.core/#FlushCount
|
||||
<Value>
|
||||
Type "gauge"
|
||||
InstancePrefix "FlushCount"
|
||||
Attribute "FlushCount"
|
||||
</Value>
|
||||
|
||||
# fqname = org.hibernate.core/#NaturalIdCacheHitCount
|
||||
<Value>
|
||||
Type "gauge"
|
||||
InstancePrefix "NaturalIdCacheHitCount"
|
||||
Attribute "NaturalIdCacheHitCount"
|
||||
</Value>
|
||||
|
||||
# fqname = org.hibernate.core/#NaturalIdCacheMissCount
|
||||
<Value>
|
||||
Type "gauge"
|
||||
InstancePrefix "NaturalIdCacheMissCount"
|
||||
Attribute "NaturalIdCacheMissCount"
|
||||
</Value>
|
||||
|
||||
# fqname = org.hibernate.core/#NaturalIdCachePutCount
|
||||
<Value>
|
||||
Type "gauge"
|
||||
InstancePrefix "NaturalIdCachePutCount"
|
||||
Attribute "NaturalIdCachePutCount"
|
||||
</Value>
|
||||
|
||||
# fqname = org.hibernate.core/#NaturalIdQueryExecutionCount
|
||||
<Value>
|
||||
Type "gauge"
|
||||
InstancePrefix "NaturalIdQueryExecutionCount"
|
||||
Attribute "NaturalIdQueryExecutionCount"
|
||||
</Value>
|
||||
|
||||
# fqname = org.hibernate.core/#NaturalIdQueryExecutionMaxTime
|
||||
<Value>
|
||||
Type "gauge"
|
||||
InstancePrefix "NaturalIdQueryExecutionMaxTime"
|
||||
Attribute "NaturalIdQueryExecutionMaxTime"
|
||||
</Value>
|
||||
|
||||
# fqname = org.hibernate.core/#OptimisticFailureCount
|
||||
<Value>
|
||||
Type "gauge"
|
||||
InstancePrefix "OptimisticFailureCount"
|
||||
Attribute "OptimisticFailureCount"
|
||||
</Value>
|
||||
|
||||
# fqname = org.hibernate.core/#PrepareStatementCount
|
||||
<Value>
|
||||
Type "gauge"
|
||||
InstancePrefix "PrepareStatementCount"
|
||||
Attribute "PrepareStatementCount"
|
||||
</Value>
|
||||
|
||||
# fqname = org.hibernate.core/#QueryCacheHitCount
|
||||
<Value>
|
||||
Type "gauge"
|
||||
InstancePrefix "QueryCacheHitCount"
|
||||
Attribute "QueryCacheHitCount"
|
||||
</Value>
|
||||
|
||||
# fqname = org.hibernate.core/#QueryCacheMissCount
|
||||
<Value>
|
||||
Type "gauge"
|
||||
InstancePrefix "QueryCacheMissCount"
|
||||
Attribute "QueryCacheMissCount"
|
||||
</Value>
|
||||
|
||||
# fqname = org.hibernate.core/#QueryCachePutCount
|
||||
<Value>
|
||||
Type "gauge"
|
||||
InstancePrefix "QueryCachePutCount"
|
||||
Attribute "QueryCachePutCount"
|
||||
</Value>
|
||||
|
||||
# fqname = org.hibernate.core/#QueryExecutionCount
|
||||
<Value>
|
||||
Type "gauge"
|
||||
InstancePrefix "QueryExecutionCount"
|
||||
Attribute "QueryExecutionCount"
|
||||
</Value>
|
||||
|
||||
# fqname = org.hibernate.core/#QueryExecutionMaxTime
|
||||
<Value>
|
||||
Type "gauge"
|
||||
InstancePrefix "QueryExecutionMaxTime"
|
||||
Attribute "QueryExecutionMaxTime"
|
||||
</Value>
|
||||
|
||||
# fqname = org.hibernate.core/#SecondLevelCacheHitCount
|
||||
<Value>
|
||||
Type "gauge"
|
||||
InstancePrefix "SecondLevelCacheHitCount"
|
||||
Attribute "SecondLevelCacheHitCount"
|
||||
</Value>
|
||||
|
||||
# fqname = org.hibernate.core/#SecondLevelCacheMissCount
|
||||
<Value>
|
||||
Type "gauge"
|
||||
InstancePrefix "SecondLevelCacheMissCount"
|
||||
Attribute "SecondLevelCacheMissCount"
|
||||
</Value>
|
||||
|
||||
# fqname = org.hibernate.core/#SecondLevelCachePutCount
|
||||
<Value>
|
||||
Type "gauge"
|
||||
InstancePrefix "SecondLevelCachePutCount"
|
||||
Attribute "SecondLevelCachePutCount"
|
||||
</Value>
|
||||
|
||||
# fqname = org.hibernate.core/#SessionCloseCount
|
||||
<Value>
|
||||
Type "gauge"
|
||||
InstancePrefix "SessionCloseCount"
|
||||
Attribute "SessionCloseCount"
|
||||
</Value>
|
||||
|
||||
# fqname = org.hibernate.core/#TransactionCount
|
||||
<Value>
|
||||
Type "gauge"
|
||||
InstancePrefix "TransactionCount"
|
||||
Attribute "TransactionCount"
|
||||
</Value>
|
||||
|
||||
# fqname = org.hibernate.core/#UpdateTimestampsCacheHitCount
|
||||
<Value>
|
||||
Type "gauge"
|
||||
InstancePrefix "UpdateTimestampsCacheHitCount"
|
||||
Attribute "UpdateTimestampsCacheHitCount"
|
||||
</Value>
|
||||
|
||||
# fqname = org.hibernate.core/#UpdateTimestampsCacheMissCount
|
||||
<Value>
|
||||
Type "gauge"
|
||||
InstancePrefix "UpdateTimestampsCacheMissCount"
|
||||
Attribute "UpdateTimestampsCacheMissCount"
|
||||
</Value>
|
||||
|
||||
# fqname = org.hibernate.core/#UpdateTimestampsCachePutCount
|
||||
<Value>
|
||||
Type "gauge"
|
||||
InstancePrefix "UpdateTimestampsCachePutCount"
|
||||
Attribute "UpdateTimestampsCachePutCount"
|
||||
</Value>
|
||||
</MBean>
|
||||
|
||||
# C3P0 Connection pool JMX Configuration
|
||||
<MBean "com.mchange.v2.c3p0/PooledDataSource">
|
||||
ObjectName "com.mchange.v2.c3p0:type=PooledDataSource,*"
|
||||
InstancePrefix "confluence-c3p0-PooledDataSource"
|
||||
|
||||
<Value>
|
||||
Type "gauge"
|
||||
InstancePrefix "numBusyConnections"
|
||||
Attribute "numBusyConnections"
|
||||
</Value>
|
||||
|
||||
<Value>
|
||||
Type "gauge"
|
||||
InstancePrefix "numIdleConnections"
|
||||
Attribute "numIdleConnections"
|
||||
</Value>
|
||||
|
||||
<Value>
|
||||
Type "gauge"
|
||||
InstancePrefix "threadPoolNumIdleThreads"
|
||||
Attribute "threadPoolNumIdleThreads"
|
||||
</Value>
|
||||
|
||||
<Value>
|
||||
Type "gauge"
|
||||
InstancePrefix "numConnections"
|
||||
Attribute "numConnections"
|
||||
</Value>
|
||||
</MBean>
|
||||
|
||||
# Apache Tomcat JMX configuration
|
||||
<MBean "catalina/global_request_processor">
|
||||
ObjectName "*:type=GlobalRequestProcessor,*"
|
||||
InstancePrefix "catalina_request_processor-"
|
||||
InstanceFrom "name"
|
||||
|
||||
<Value>
|
||||
Type "io_octets"
|
||||
InstancePrefix "global"
|
||||
#InstanceFrom ""
|
||||
Table false
|
||||
Attribute "bytesReceived"
|
||||
Attribute "bytesSent"
|
||||
</Value>
|
||||
|
||||
<Value>
|
||||
Type "total_requests"
|
||||
InstancePrefix "global"
|
||||
#InstanceFrom ""
|
||||
Table false
|
||||
Attribute "requestCount"
|
||||
</Value>
|
||||
|
||||
<Value>
|
||||
Type "total_time_in_ms"
|
||||
InstancePrefix "global-processing"
|
||||
#InstanceFrom ""
|
||||
Table false
|
||||
Attribute "processingTime"
|
||||
</Value>
|
||||
</MBean>
|
||||
|
||||
<MBean "catalina/detailed_request_processor">
|
||||
ObjectName "*:type=RequestProcessor,*"
|
||||
InstancePrefix "catalina_request_processor-"
|
||||
InstanceFrom "worker"
|
||||
|
||||
<Value>
|
||||
Type "io_octets"
|
||||
#InstancePrefix ""
|
||||
InstanceFrom "name"
|
||||
Table false
|
||||
Attribute "bytesReceived"
|
||||
Attribute "bytesSent"
|
||||
</Value>
|
||||
|
||||
<Value>
|
||||
Type "total_requests"
|
||||
#InstancePrefix ""
|
||||
InstanceFrom "name"
|
||||
Table false
|
||||
Attribute "requestCount"
|
||||
</Value>
|
||||
|
||||
<Value>
|
||||
Type "total_time_in_ms"
|
||||
InstancePrefix "processing-"
|
||||
InstanceFrom "name"
|
||||
Table false
|
||||
Attribute "processingTime"
|
||||
</Value>
|
||||
</MBean>
|
||||
|
||||
<MBean "catalina/thread_pool">
|
||||
ObjectName "*:type=ThreadPool,*"
|
||||
InstancePrefix "request_processor-"
|
||||
InstanceFrom "name"
|
||||
|
||||
<Value>
|
||||
Type "threads"
|
||||
InstancePrefix "total"
|
||||
#InstanceFrom ""
|
||||
Table false
|
||||
Attribute "currentThreadCount"
|
||||
</Value>
|
||||
|
||||
<Value>
|
||||
Type "threads"
|
||||
InstancePrefix "running"
|
||||
#InstanceFrom ""
|
||||
Table false
|
||||
Attribute "currentThreadsBusy"
|
||||
</Value>
|
||||
</MBean>
|
||||
|
||||
# General JVM configuration
|
||||
<MBean "memory">
|
||||
ObjectName "java.lang:type=Memory,*"
|
||||
InstancePrefix "java_memory"
|
||||
#InstanceFrom "name"
|
||||
|
||||
<Value>
|
||||
Type "memory"
|
||||
InstancePrefix "heap-"
|
||||
#InstanceFrom ""
|
||||
Table true
|
||||
Attribute "HeapMemoryUsage"
|
||||
</Value>
|
||||
|
||||
<Value>
|
||||
Type "memory"
|
||||
InstancePrefix "nonheap-"
|
||||
#InstanceFrom ""
|
||||
Table true
|
||||
Attribute "NonHeapMemoryUsage"
|
||||
</Value>
|
||||
</MBean>
|
||||
|
||||
<MBean "memory_pool">
|
||||
ObjectName "java.lang:type=MemoryPool,*"
|
||||
InstancePrefix "java_memory_pool-"
|
||||
InstanceFrom "name"
|
||||
|
||||
<Value>
|
||||
Type "memory"
|
||||
#InstancePrefix ""
|
||||
#InstanceFrom ""
|
||||
Table true
|
||||
Attribute "Usage"
|
||||
</Value>
|
||||
</MBean>
|
||||
|
||||
<MBean "classes">
|
||||
ObjectName "java.lang:type=ClassLoading"
|
||||
InstancePrefix "java"
|
||||
#InstanceFrom ""
|
||||
|
||||
<Value>
|
||||
Type "gauge"
|
||||
InstancePrefix "loaded_classes"
|
||||
#InstanceFrom ""
|
||||
Table false
|
||||
Attribute "LoadedClassCount"
|
||||
</Value>
|
||||
</MBean>
|
||||
|
||||
<MBean "compilation">
|
||||
ObjectName "java.lang:type=Compilation"
|
||||
InstancePrefix "java"
|
||||
#InstanceFrom ""
|
||||
|
||||
<Value>
|
||||
Type "total_time_in_ms"
|
||||
InstancePrefix "compilation_time"
|
||||
#InstanceFrom ""
|
||||
Table false
|
||||
Attribute "TotalCompilationTime"
|
||||
</Value>
|
||||
</MBean>
|
||||
|
||||
<MBean "garbage_collector">
|
||||
ObjectName "java.lang:type=GarbageCollector,*"
|
||||
InstancePrefix "java_gc-"
|
||||
InstanceFrom "name"
|
||||
|
||||
<Value>
|
||||
Type "invocations"
|
||||
#InstancePrefix ""
|
||||
#InstanceFrom ""
|
||||
Table false
|
||||
Attribute "CollectionCount"
|
||||
</Value>
|
||||
|
||||
<Value>
|
||||
Type "total_time_in_ms"
|
||||
InstancePrefix "collection_time"
|
||||
#InstanceFrom ""
|
||||
Table false
|
||||
Attribute "CollectionTime"
|
||||
</Value>
|
||||
</MBean>
|
||||
|
||||
<MBean "jvm_localhost_os">
|
||||
ObjectName "java.lang:type=OperatingSystem"
|
||||
|
||||
# Open file descriptors
|
||||
<Value>
|
||||
Type "gauge"
|
||||
InstancePrefix "os-open_fd_count"
|
||||
Table false
|
||||
Attribute "OpenFileDescriptorCount"
|
||||
</Value>
|
||||
|
||||
# Max. allowed handles for user under which the JavaVM is running
|
||||
<Value>
|
||||
Type "gauge"
|
||||
InstancePrefix "os-max_fd_count"
|
||||
Table false
|
||||
Attribute "MaxFileDescriptorCount"
|
||||
</Value>
|
||||
|
||||
# Process time used by the JavaVM
|
||||
<Value>
|
||||
Type "counter"
|
||||
InstancePrefix "os-process_cpu_time"
|
||||
Table false
|
||||
Attribute "ProcessCpuTime"
|
||||
</Value>
|
||||
</MBean>
|
||||
|
||||
<Connection>
|
||||
#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"
|
||||
</Connection>
|
||||
</Plugin>
|
||||
|
||||
</Plugin>
|
||||
|
||||
Include "/etc/collectd.d"
|
||||
Reference in New Issue
Block a user