Skip to content

Instantly share code, notes, and snippets.

@mdeeks
Created November 13, 2013 05:07
Show Gist options
  • Save mdeeks/7444030 to your computer and use it in GitHub Desktop.
Save mdeeks/7444030 to your computer and use it in GitHub Desktop.
DataDog agent JMX config to monitor all java garbage collector types. Bucketed as "major" and "minor" collections.
init_config:
instances:
- host: localhost
port: 9999
conf:
# Young Gen Collectors (Minor Collections)
- include:
domain: java.lang
type: GarbageCollector
name: Copy
attribute:
CollectionCount:
metric_type: gauge
alias: jmx.gc.minor_collection_count
CollectionTime:
metric_type: gauge
alias: jmx.gc.minor_collection_time
- include:
domain: java.lang
type: GarbageCollector
name: PS Scavenge
attribute:
CollectionCount:
metric_type: gauge
alias: jmx.gc.minor_collection_count
CollectionTime:
metric_type: gauge
alias: jmx.gc.minor_collection_time
- include:
domain: java.lang
type: GarbageCollector
name: ParNew
attribute:
CollectionCount:
metric_type: gauge
alias: jmx.gc.minor_collection_count
CollectionTime:
metric_type: gauge
alias: jmx.gc.minor_collection_time
- include:
domain: java.lang
type: GarbageCollector
name: G1 Young Generation
attribute:
CollectionCount:
metric_type: gauge
alias: jmx.gc.minor_collection_count
CollectionTime:
metric_type: gauge
alias: jmx.gc.minor_collection_time
# Old Gen Collectors (Major collections)
- include:
domain: java.lang
type: GarbageCollector
name: MarkSweepCompact
attribute:
CollectionCount:
metric_type: gauge
alias: jmx.gc.major_collection_count
CollectionTime:
metric_type: gauge
alias: jmx.gc.major_collection_time
- include:
domain: java.lang
type: GarbageCollector
name: PS MarkSweep
attribute:
CollectionCount:
metric_type: gauge
alias: jmx.gc.major_collection_count
CollectionTime:
metric_type: gauge
alias: jmx.gc.major_collection_time
- include:
domain: java.lang
type: GarbageCollector
name: ConcurrentMarkSweep
attribute:
CollectionCount:
metric_type: gauge
alias: jmx.gc.major_collection_count
CollectionTime:
metric_type: gauge
alias: jmx.gc.major_collection_time
- include:
domain: java.lang
type: GarbageCollector
name: G1 Mixed Generation
attribute:
CollectionCount:
metric_type: gauge
alias: jmx.gc.major_collection_count
CollectionTime:
metric_type: gauge
alias: jmx.gc.major_collection_time
@jkoppe
Copy link

jkoppe commented Feb 12, 2015

This is awesome, thanks!! I second that this would be nice to see in the JVM monitoring for datadog.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment