Puppet Class: cdh::hadoop::jmxtrans::resourcemanager

Defined in:
modules/cdh/manifests/hadoop/jmxtrans/resourcemanager.pp

Overview

Class cdh::hadoop::jmxtrans::resourcemanager

Sets up a jmxtrans instance for a Hadoop ResourceManager running on the current host. Note: This requires the jmxtrans puppet module found at github.com/wikimedia/puppet-jmxtrans.

Parameters

$jmx_port - ResourceManager JMX port. Default: 9983 $ganglia - Ganglia host:port $graphite - Graphite host:port $statsd - statsd host:port $outfile - outfile to which Kafka stats will be written. $objects - objects parameter to pass to jmxtrans::metrics. Only use

this if you need to override the default ones that this
class provides.

Usage

class { 'cdh::hadoop::jmxtrans::resourcemanager':

ganglia => 'ganglia.example.org:8649'

}

Parameters:

  • jmx_port (Any) (defaults to: 9983)
  • ganglia (Any) (defaults to: undef)
  • graphite (Any) (defaults to: undef)
  • statsd (Any) (defaults to: undef)
  • outfile (Any) (defaults to: undef)
  • objects (Any) (defaults to: undef)


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
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
# File 'modules/cdh/manifests/hadoop/jmxtrans/resourcemanager.pp', line 22

class cdh::hadoop::jmxtrans::resourcemanager(
    $jmx_port       = 9983,
    $ganglia        = undef,
    $graphite       = undef,
    $statsd         = undef,
    $outfile        = undef,
    $objects        = undef,
) {
    $jmx = "${::fqdn}:${jmx_port}"
    $group_name = 'Hadoop.ResourceManager'

    # query for metrics from Hadoop ResourceManager's JVM
    jmxtrans::metrics::jvm { 'hadoop-hdfs-resourcemanager':
        jmx          => $jmx,
        group_prefix => "${group_name}.",
        outfile      => $outfile,
        ganglia      => $ganglia,
        graphite     => $graphite,
        statsd       => $statsd,
    }


    $resourcemanager_objects = $objects ? {
        # if $objects was not set, then use this as the
        # default set of JMX MBean objects to query.
        undef   => [
            {
                'name'          => 'Hadoop:name=ClusterMetrics,service=ResourceManager',
                'resultAlias'   => "${group_name}.ClusterMetrics",
                'attrs'         => {
                    'NumActiveNMs'                     => { 'slope' => 'both' },
                    'NumDecommissionedNMs'             => { 'slope' => 'both' },
                    'NumLostNMs'                       => { 'slope' => 'both' },
                    'NumRebootedNMs'                   => { 'slope' => 'both' },
                    'NumUnhealthyNMs'                  => { 'slope' => 'both' },
                },
            },

            {
                'name'          => 'Hadoop:name=JvmMetrics,service=ResourceManager',
                'resultAlias'   => "${group_name}.JvmMetrics",
                'attrs'         => {
                    'GcCount'                          => { 'slope' => 'positive' },
                    'GcCountPS MarkSweep'              => { 'slope' => 'positive' },
                    'GcCountPS Scavenge'               => { 'slope' => 'positive' },
                    'GcTimeMillis'                     => { 'slope' => 'both' },
                    'GcTimeMillisPS MarkSweep'         => { 'slope' => 'both' },
                    'GcTimeMillisPS Scavenge'          => { 'slope' => 'both' },
                    'LogError'                         => { 'slope' => 'positive' },
                    'LogFatal'                         => { 'slope' => 'positive' },
                    'LogInfo'                          => { 'slope' => 'both' },
                    'LogWarn'                          => { 'slope' => 'positive' },
                    'MemHeapCommittedM'                => { 'slope' => 'both' },
                    'MemHeapUsedM'                     => { 'slope' => 'both' },
                    'MemNonHeapCommittedM'             => { 'slope' => 'both' },
                    'MemNonHeapUsedM'                  => { 'slope' => 'both' },
                    'ThreadsBlocked'                   => { 'slope' => 'both' },
                    'ThreadsNew'                       => { 'slope' => 'both' },
                    'ThreadsRunnable'                  => { 'slope' => 'both' },
                    'ThreadsTerminated'                => { 'slope' => 'both' },
                    'ThreadsTimedWaiting'              => { 'slope' => 'both' },
                    'ThreadsWaiting'                   => { 'slope' => 'both' },
                },
            },


            {
                'name'          => 'Hadoop:name=QueueMetrics,q0=root,q1=adhoc,service=ResourceManager',
                'resultAlias'   => "${group_name}.QueueMetrics,q0=root,q1=adhoc",
                'attrs'         => {
                    'ActiveApplications'               => { 'slope' => 'both' },
                    'ActiveUsers'                      => { 'slope' => 'both' },
                    'AggregateContainersAllocated'     => { 'slope' => 'positive' },
                    'AggregateContainersReleased'      => { 'slope' => 'positive' },
                    'AllocatedContainers'              => { 'slope' => 'both' },
                    'AllocatedMB'                      => { 'slope' => 'both' },
                    'AppsCompleted'                    => { 'slope' => 'positive' },
                    'AppsFailed'                       => { 'slope' => 'positive' },
                    'AppsKilled'                       => { 'slope' => 'positive' },
                    'AppsPending'                      => { 'slope' => 'both' },
                    'AppsRunning'                      => { 'slope' => 'both' },
                    'AppsSubmitted'                    => { 'slope' => 'both' },
                    'AvailableMB'                      => { 'slope' => 'both' },
                    'PendingContainers'                => { 'slope' => 'both' },
                    'PendingMB'                        => { 'slope' => 'both' },
                    'ReservedContainers'               => { 'slope' => 'both' },
                    'ReservedMB'                       => { 'slope' => 'both' },
                    'running_0'                        => { 'slope' => 'both' },
                    'running_1440'                     => { 'slope' => 'both' },
                    'running_300'                      => { 'slope' => 'both' },
                    'running_60'                       => { 'slope' => 'both' },
                },
            },

            {
                'name'          => 'Hadoop:name=QueueMetrics,q0=root,q1=default,service=ResourceManager',
                'resultAlias'   => "${group_name}.QueueMetrics,q0=root,q1=default",
                'attrs'         => {
                    'ActiveApplications'               => { 'slope' => 'both' },
                    'ActiveUsers'                      => { 'slope' => 'both' },
                    'AggregateContainersAllocated'     => { 'slope' => 'positive' },
                    'AggregateContainersReleased'      => { 'slope' => 'positive' },
                    'AllocatedContainers'              => { 'slope' => 'both' },
                    'AllocatedMB'                      => { 'slope' => 'both' },
                    'AppsCompleted'                    => { 'slope' => 'positive' },
                    'AppsFailed'                       => { 'slope' => 'positive' },
                    'AppsKilled'                       => { 'slope' => 'positive' },
                    'AppsPending'                      => { 'slope' => 'both' },
                    'AppsRunning'                      => { 'slope' => 'both' },
                    'AppsSubmitted'                    => { 'slope' => 'both' },
                    'AvailableMB'                      => { 'slope' => 'both' },
                    'PendingContainers'                => { 'slope' => 'both' },
                    'PendingMB'                        => { 'slope' => 'both' },
                    'ReservedContainers'               => { 'slope' => 'both' },
                    'ReservedMB'                       => { 'slope' => 'both' },
                    'running_0'                        => { 'slope' => 'both' },
                    'running_1440'                     => { 'slope' => 'both' },
                    'running_300'                      => { 'slope' => 'both' },
                    'running_60'                       => { 'slope' => 'both' },
                },
            },

            {
                'name'          => 'Hadoop:name=QueueMetrics,q0=root,q1=default,service=ResourceManager,user=hdfs',
                'resultAlias'   => "${group_name}.QueueMetrics,q0=root,q1=default,user=hdfs",
                'attrs'         => {
                    'ActiveApplications'               => { 'slope' => 'both' },
                    'ActiveUsers'                      => { 'slope' => 'both' },
                    'AggregateContainersAllocated'     => { 'slope' => 'positive' },
                    'AggregateContainersReleased'      => { 'slope' => 'positive' },
                    'AllocatedContainers'              => { 'slope' => 'both' },
                    'AllocatedMB'                      => { 'slope' => 'both' },
                    'AppsCompleted'                    => { 'slope' => 'positive' },
                    'AppsFailed'                       => { 'slope' => 'positive' },
                    'AppsKilled'                       => { 'slope' => 'positive' },
                    'AppsPending'                      => { 'slope' => 'both' },
                    'AppsRunning'                      => { 'slope' => 'both' },
                    'AppsSubmitted'                    => { 'slope' => 'both' },
                    'AvailableMB'                      => { 'slope' => 'both' },
                    'PendingContainers'                => { 'slope' => 'both' },
                    'PendingMB'                        => { 'slope' => 'both' },
                    'ReservedContainers'               => { 'slope' => 'both' },
                    'ReservedMB'                       => { 'slope' => 'both' },
                    'running_0'                        => { 'slope' => 'both' },
                    'running_1440'                     => { 'slope' => 'both' },
                    'running_300'                      => { 'slope' => 'both' },
                    'running_60'                       => { 'slope' => 'both' },
                },
            },

            {
                'name'          => 'Hadoop:name=QueueMetrics,q0=root,q1=standard,service=ResourceManager',
                'resultAlias'   => "${group_name}.QueueMetrics,q0=root,q1=standard",
                'attrs'         => {
                    'ActiveApplications'               => { 'slope' => 'both' },
                    'ActiveUsers'                      => { 'slope' => 'both' },
                    'AggregateContainersAllocated'     => { 'slope' => 'positive' },
                    'AggregateContainersReleased'      => { 'slope' => 'positive' },
                    'AllocatedContainers'              => { 'slope' => 'both' },
                    'AllocatedMB'                      => { 'slope' => 'both' },
                    'AppsCompleted'                    => { 'slope' => 'positive' },
                    'AppsFailed'                       => { 'slope' => 'positive' },
                    'AppsKilled'                       => { 'slope' => 'positive' },
                    'AppsPending'                      => { 'slope' => 'both' },
                    'AppsRunning'                      => { 'slope' => 'both' },
                    'AppsSubmitted'                    => { 'slope' => 'both' },
                    'AvailableMB'                      => { 'slope' => 'both' },
                    'PendingContainers'                => { 'slope' => 'both' },
                    'PendingMB'                        => { 'slope' => 'both' },
                    'ReservedContainers'               => { 'slope' => 'both' },
                    'ReservedMB'                       => { 'slope' => 'both' },
                    'running_0'                        => { 'slope' => 'both' },
                    'running_1440'                     => { 'slope' => 'both' },
                    'running_300'                      => { 'slope' => 'both' },
                    'running_60'                       => { 'slope' => 'both' },
                },
            },

            {
                'name'          => 'Hadoop:name=QueueMetrics,q0=root,service=ResourceManager',
                'resultAlias'   => "${group_name}.QueueMetrics,q0=root",
                'attrs'         => {
                    'ActiveApplications'               => { 'slope' => 'both' },
                    'ActiveUsers'                      => { 'slope' => 'both' },
                    'AggregateContainersAllocated'     => { 'slope' => 'positive' },
                    'AggregateContainersReleased'      => { 'slope' => 'positive' },
                    'AllocatedContainers'              => { 'slope' => 'both' },
                    'AllocatedMB'                      => { 'slope' => 'both' },
                    'AppsCompleted'                    => { 'slope' => 'positive' },
                    'AppsFailed'                       => { 'slope' => 'positive' },
                    'AppsKilled'                       => { 'slope' => 'positive' },
                    'AppsPending'                      => { 'slope' => 'both' },
                    'AppsRunning'                      => { 'slope' => 'both' },
                    'AppsSubmitted'                    => { 'slope' => 'both' },
                    'AvailableMB'                      => { 'slope' => 'both' },
                    'PendingContainers'                => { 'slope' => 'both' },
                    'PendingMB'                        => { 'slope' => 'both' },
                    'ReservedContainers'               => { 'slope' => 'both' },
                    'ReservedMB'                       => { 'slope' => 'both' },
                    'running_0'                        => { 'slope' => 'both' },
                    'running_1440'                     => { 'slope' => 'both' },
                    'running_300'                      => { 'slope' => 'both' },
                    'running_60'                       => { 'slope' => 'both' },
                },
            },

            {
                'name'          => 'Hadoop:name=QueueMetrics,q0=root,service=ResourceManager,user=dr.who',
                'resultAlias'   => "${group_name}.QueueMetrics,q0=root,user=dr.who",
                'attrs'         => {
                    'ActiveApplications'               => { 'slope' => 'both' },
                    'ActiveUsers'                      => { 'slope' => 'both' },
                    'AggregateContainersAllocated'     => { 'slope' => 'positive' },
                    'AggregateContainersReleased'      => { 'slope' => 'positive' },
                    'AllocatedContainers'              => { 'slope' => 'both' },
                    'AllocatedMB'                      => { 'slope' => 'both' },
                    'AppsCompleted'                    => { 'slope' => 'positive' },
                    'AppsFailed'                       => { 'slope' => 'positive' },
                    'AppsKilled'                       => { 'slope' => 'positive' },
                    'AppsPending'                      => { 'slope' => 'both' },
                    'AppsRunning'                      => { 'slope' => 'both' },
                    'AppsSubmitted'                    => { 'slope' => 'both' },
                    'AvailableMB'                      => { 'slope' => 'both' },
                    'PendingContainers'                => { 'slope' => 'both' },
                    'PendingMB'                        => { 'slope' => 'both' },
                    'ReservedContainers'               => { 'slope' => 'both' },
                    'ReservedMB'                       => { 'slope' => 'both' },
                    'running_0'                        => { 'slope' => 'both' },
                    'running_1440'                     => { 'slope' => 'both' },
                    'running_300'                      => { 'slope' => 'both' },
                    'running_60'                       => { 'slope' => 'both' },
                },
            },

            {
                'name'          => 'Hadoop:name=QueueMetrics,q0=root,service=ResourceManager,user=hdfs',
                'resultAlias'   => "${group_name}.QueueMetrics,q0=root,user=hdfs",
                'attrs'         => {
                    'ActiveApplications'               => { 'slope' => 'both' },
                    'ActiveUsers'                      => { 'slope' => 'both' },
                    'AggregateContainersAllocated'     => { 'slope' => 'positive' },
                    'AggregateContainersReleased'      => { 'slope' => 'positive' },
                    'AllocatedContainers'              => { 'slope' => 'both' },
                    'AllocatedMB'                      => { 'slope' => 'both' },
                    'AppsCompleted'                    => { 'slope' => 'positive' },
                    'AppsFailed'                       => { 'slope' => 'positive' },
                    'AppsKilled'                       => { 'slope' => 'positive' },
                    'AppsPending'                      => { 'slope' => 'both' },
                    'AppsRunning'                      => { 'slope' => 'both' },
                    'AppsSubmitted'                    => { 'slope' => 'both' },
                    'AvailableMB'                      => { 'slope' => 'both' },
                    'PendingContainers'                => { 'slope' => 'both' },
                    'PendingMB'                        => { 'slope' => 'both' },
                    'ReservedContainers'               => { 'slope' => 'both' },
                    'ReservedMB'                       => { 'slope' => 'both' },
                    'running_0'                        => { 'slope' => 'both' },
                    'running_1440'                     => { 'slope' => 'both' },
                    'running_300'                      => { 'slope' => 'both' },
                    'running_60'                       => { 'slope' => 'both' },
                },
            },

            {
                'name'          => 'Hadoop:name=RpcActivityForPort8030,service=ResourceManager',
                'resultAlias'   => "${group_name}.RpcActivityForPort8030",
                'attrs'         => {
                    'CallQueueLength'                  => { 'slope' => 'both' },
                    'NumOpenConnections'               => { 'slope' => 'both' },
                    'ReceivedBytes'                    => { 'slope' => 'positive' },
                    'RpcAuthenticationFailures'        => { 'slope' => 'positive' },
                    'RpcAuthenticationSuccesses'       => { 'slope' => 'positive' },
                    'RpcAuthorizationFailures'         => { 'slope' => 'positive' },
                    'RpcAuthorizationSuccesses'        => { 'slope' => 'positive' },
                    'RpcProcessingTimeAvgTime'         => { 'slope' => 'both' },
                    'RpcProcessingTimeNumOps'          => { 'slope' => 'positive' },
                    'RpcQueueTimeAvgTime'              => { 'slope' => 'both' },
                    'RpcQueueTimeNumOps'               => { 'slope' => 'positive' },
                    'SentBytes'                        => { 'slope' => 'positive' },
                },
            },

            {
                'name'          => 'Hadoop:name=RpcActivityForPort8031,service=ResourceManager',
                'resultAlias'   => "${group_name}.RpcActivityForPort8031",
                'attrs'         => {
                    'CallQueueLength'                  => { 'slope' => 'both' },
                    'NumOpenConnections'               => { 'slope' => 'both' },
                    'ReceivedBytes'                    => { 'slope' => 'positive' },
                    'RpcAuthenticationFailures'        => { 'slope' => 'positive' },
                    'RpcAuthenticationSuccesses'       => { 'slope' => 'positive' },
                    'RpcAuthorizationFailures'         => { 'slope' => 'positive' },
                    'RpcAuthorizationSuccesses'        => { 'slope' => 'positive' },
                    'RpcProcessingTimeAvgTime'         => { 'slope' => 'both' },
                    'RpcProcessingTimeNumOps'          => { 'slope' => 'positive' },
                    'RpcQueueTimeAvgTime'              => { 'slope' => 'both' },
                    'RpcQueueTimeNumOps'               => { 'slope' => 'positive' },
                    'SentBytes'                        => { 'slope' => 'positive' },
                },
            },

            {
                'name'          => 'Hadoop:name=RpcActivityForPort8032,service=ResourceManager',
                'resultAlias'   => "${group_name}.RpcActivityForPort8032",
                'attrs'         => {
                    'CallQueueLength'                  => { 'slope' => 'both' },
                    'NumOpenConnections'               => { 'slope' => 'both' },
                    'ReceivedBytes'                    => { 'slope' => 'positive' },
                    'RpcAuthenticationFailures'        => { 'slope' => 'positive' },
                    'RpcAuthenticationSuccesses'       => { 'slope' => 'positive' },
                    'RpcAuthorizationFailures'         => { 'slope' => 'positive' },
                    'RpcAuthorizationSuccesses'        => { 'slope' => 'positive' },
                    'RpcProcessingTimeAvgTime'         => { 'slope' => 'both' },
                    'RpcProcessingTimeNumOps'          => { 'slope' => 'positive' },
                    'RpcQueueTimeAvgTime'              => { 'slope' => 'both' },
                    'RpcQueueTimeNumOps'               => { 'slope' => 'positive' },
                    'SentBytes'                        => { 'slope' => 'positive' },
                },
            },

            {
                'name'          => 'Hadoop:name=RpcActivityForPort8033,service=ResourceManager',
                'resultAlias'   => "${group_name}.RpcActivityForPort8033",
                'attrs'         => {
                    'CallQueueLength'                  => { 'slope' => 'both' },
                    'NumOpenConnections'               => { 'slope' => 'both' },
                    'ReceivedBytes'                    => { 'slope' => 'positive' },
                    'RpcAuthenticationFailures'        => { 'slope' => 'positive' },
                    'RpcAuthenticationSuccesses'       => { 'slope' => 'positive' },
                    'RpcAuthorizationFailures'         => { 'slope' => 'positive' },
                    'RpcAuthorizationSuccesses'        => { 'slope' => 'positive' },
                    'RpcProcessingTimeAvgTime'         => { 'slope' => 'both' },
                    'RpcProcessingTimeNumOps'          => { 'slope' => 'positive' },
                    'RpcQueueTimeAvgTime'              => { 'slope' => 'both' },
                    'RpcQueueTimeNumOps'               => { 'slope' => 'positive' },
                    'SentBytes'                        => { 'slope' => 'positive' },
                },
            },
        ],

        # else use $objects
        default => $objects,
    }

    # query for jmx metrics
    jmxtrans::metrics { "hadoop-yarn-resourcemanager-${::hostname}-${jmx_port}":
        jmx                  => $jmx,
        outfile              => $outfile,
        ganglia              => $ganglia,
        ganglia_group_name   => $group_name,
        graphite             => $graphite,
        graphite_root_prefix => $group_name,
        statsd               => $statsd,
        statsd_root_prefix   => $group_name,
        objects              => $resourcemanager_objects,
    }
}