Skip to content

Instantly share code, notes, and snippets.

@flah00
Created January 22, 2014 03:05
Show Gist options
  • Save flah00/8552834 to your computer and use it in GitHub Desktop.
Save flah00/8552834 to your computer and use it in GitHub Desktop.
name "java-management"
description "java-management configuration"
run_list(*%w[
recipe[java]
recipe[java-management::management]
recipe[datadog::jmx]
])
default_attributes(
java: {
install_flavor: 'oracle',
oracle: {
accept_oracle_download_terms: true
}
},
"java-management" => {
owner: 'app',
group: 'app',
jmxremote: {
local_only: false,
ssl: false,
port: 54321
}
},
datadog: {
jmx: {
instances: [
{
server: "localhost",
port: 54321,
username: "u",
password: "p",
name: "aname",
exclude: [],
include: [
{
domain: "java.lang",
bean: "java.lang:type=Runtime",
attributes: {
Uptime: {
metric_type: "gauge",
alias: "jmx.uptime"
}
}
},
{
domain: "java.lang",
bean: "java.lang:type=Threading",
attributes: {
ThreadCount: {
metric_type: "gauge",
alias: "jmx.thread_count"
}
}
},
{
domain: "java.lang",
bean: "java.lang:type=OperatingSystem",
attributes: {
OpenFileDescriptorCount: {
metric_type: "gauge",
alias: "jmx.open_file_descriptor_count"
},
MaxFileDescriptorCount: {
metric_type: "gauge",
alias: "jmx.max_file_descriptor_count"
}
}
},
]
}
]
}
}
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment