-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjvm-sun-hotspot.conf
156 lines (147 loc) · 4.93 KB
/
jvm-sun-hotspot.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
# This is the monitoring configuration for standalone JVMs.
# Look for JMX_HOST and JMX_PORT to adjust your configuration file.
# Replace JMX_PORT below with the value configured in your JVM deployment.
LoadPlugin java
<Plugin "java">
JVMARG "-Djava.class.path=/opt/stackdriver/collectd/share/collectd/java/collectd-api.jar:/opt/stackdriver/collectd/share/collectd/java/generic-jmx.jar"
LoadPlugin "org.collectd.java.GenericJMX"
<Plugin "GenericJMX">
<MBean "jvm_localhost_Threading">
ObjectName "java.lang:type=Threading"
<Value>
Type "gauge"
InstancePrefix "threading-daemon_thread_count"
Table false
Attribute "DaemonThreadCount"
</Value>
<Value>
Type "gauge"
InstancePrefix "threading-thread_count"
Table false
Attribute "ThreadCount"
</Value>
<Value>
Type "gauge"
InstancePrefix "threading-peak_thread_count"
Table false
Attribute "PeakThreadCount"
</Value>
</MBean>
<MBean "jvm_localhost_Memory">
ObjectName "java.lang:type=Memory"
<Value>
Type "memory"
InstancePrefix "memory-heap_usage_committed"
Table false
Attribute "HeapMemoryUsage.committed"
</Value>
<Value>
Type "memory"
InstancePrefix "memory-non_heap_usage_committed"
Table false
Attribute "NonHeapMemoryUsage.committed"
</Value>
<Value>
Type "memory"
InstancePrefix "memory-heap_usage_used"
Table false
Attribute "HeapMemoryUsage.used"
</Value>
<Value>
Type "memory"
InstancePrefix "memory-non_heap_usage_used"
Table false
Attribute "NonHeapMemoryUsage.used"
</Value>
<Value>
Type "memory"
InstancePrefix "memory-heap_usage_max"
Table false
Attribute "HeapMemoryUsage.max"
</Value>
<Value>
Type "memory"
InstancePrefix "memory-non_heap_usage_max"
Table false
Attribute "NonHeapMemoryUsage.max"
</Value>
</MBean>
<MBean "jvm_localhost_Runtime">
ObjectName "java.lang:type=Runtime"
<Value>
Type "counter"
InstancePrefix "runtime-uptime"
Table false
Attribute "Uptime"
</Value>
</MBean>
<MBean "jvm_localhost_os">
ObjectName "java.lang:type=OperatingSystem"
<Value>
Type "gauge"
InstancePrefix "os-open_fd_count"
Table false
Attribute "OpenFileDescriptorCount"
</Value>
<Value>
Type "counter"
InstancePrefix "os-process_cpu_time"
Table false
Attribute "ProcessCpuTime"
</Value>
</MBean>
<MBean "jvm_localhost_gc">
ObjectName "java.lang:type=GarbageCollector,name=*"
InstanceFrom "name"
<Value>
Type "counter"
InstancePrefix "gc-collection_count"
Table false
Attribute "CollectionCount"
</Value>
<Value>
Type "counter"
InstancePrefix "gc-collection_time"
Table false
Attribute "CollectionTime"
</Value>
</MBean>
<Connection>
# When using non-standard JVM configurations, replace the below with
#ServiceURL "service:jmx:rmi:///jndi/rmi://JMX_HOST:JMX_PORT/jmxrmi"
ServiceURL "service:jmx:rmi:///jndi/rmi://localhost:5000/jmxrmi"
InstancePrefix "jvm"
Collect "jvm_localhost_Threading"
Collect "jvm_localhost_Memory"
Collect "jvm_localhost_Runtime"
Collect "jvm_localhost_os"
Collect "jvm_localhost_gc"
</Connection>
</Plugin>
</Plugin>
LoadPlugin match_regex
LoadPlugin target_set
LoadPlugin target_replace
<Chain "GenericJMX_jvm">
<Rule "rewrite_genericjmx_to_jvm">
<Match regex>
Plugin "^GenericJMX$"
PluginInstance "^jvm.*$"
</Match>
<Target "replace">
PluginInstance "jvm" ""
</Target>
<Target "set">
Plugin "jvm"
</Target>
Target "return"
</Rule>
</Chain>
<Chain "PreCache">
<Rule "jump_to_GenericJMX_jvm">
<Target "jump">
Chain "GenericJMX_jvm"
</Target>
</Rule>
</Chain>
PreCacheChain "PreCache"