-
Notifications
You must be signed in to change notification settings - Fork 91
/
hq-plugin.xml
669 lines (577 loc) · 22.6 KB
/
hq-plugin.xml
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
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
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
<?xml version="1.0"?>
<!--
NOTE: This copyright does *not* cover user programs that use HQ
program services by normal system calls through the application
program interfaces provided as part of the Hyperic Plug-in Development
Kit or the Hyperic Client Development Kit - this is merely considered
normal use of the program, and does *not* fall under the heading of
"derived work".
Copyright (C) [2004-2010], VMware, Inc.
This file is part of HQ.
HQ is free software; you can redistribute it and/or modify
it under the terms version 2 of the GNU General Public License as
published by the Free Software Foundation. This program is distributed
in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. See the GNU General Public License for more
details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
USA.
-->
<!DOCTYPE plugin [
<!ENTITY process-metrics SYSTEM "/pdk/plugins/process-metrics.xml">
<!ENTITY internal-services SYSTEM "/etc/hq-internal-services.xml">
<!ENTITY hibernate-services SYSTEM "/pdk/plugins/hibernate-services.xml">
]>
<plugin package="org.hyperic.hq.plugin.tomcat" class="TomcatProductPlugin" name="tomcat">
<property name="PLUGIN_VERSION" value="@project.version@"/>
<classpath>
<include name="pdk/lib/mx4j"/>
<!-- relative to auto-discovered installpath (see PROC_HOME_PROPERTY) -->
<include name="server/lib/commons-modeler-*.jar"/>
<!-- JBoss Web classpath -->
<include name="client/jnp-client.jar"/>
<include name="client/jboss-common-client.jar"/>
<include name="client/jboss-jsr77-client.jar"/>
<include name="client/jbossall-client.jar"/>
<include name="client/log4j.jar"/>
<include name="client/jmx-rmi-connector-client.jar"/>
<include name="lib/jboss-system.jar"/>
<include name="lib/jboss-jmx.jar"/>
<include name="lib/jboss-management.jar"/>
<include name="lib/dom4j.jar"/>
<!-- used underneath javax.management.Query.match() -->
<include name="lib/gnu-regexp.jar"/>
<!-- required for MainDeployer.listDeployed() -->
<include name="lib/endorsed/xercesImpl.jar"/>
<include name="lib/endorsed/xml-apis.jar"/>
<include name="server/default/lib/jboss-management.jar"/>
<include name="server/all/lib/jboss-management.jar"/>
<!-- for jndi authentication -->
<include name="server/default/lib/jbosssx.jar"/>
<include name="server/all/lib/jbosssx.jar"/>
<!-- relative to $installpath incase
server/{default,all} do not exist -->
<include name="lib/jboss-management.jar"/>
<include name="lib/jbosssx.jar"/>
</classpath>
<filter name="template"
value="${OBJECT_NAME}:${alias}"/>
<property name="template" value="${OBJECT_NAME}:${alias}" />
<property name="measurement-class" value="org.hyperic.hq.product.jmx.MxMeasurementPlugin" />
<property name="control-class" value="org.hyperic.hq.product.jmx.MxControlPlugin" />
<metrics name="Thread Metrics">
<metric name="Thread Count"
alias="ThreadCount"
indicator="false"
template="${OBJECT_NAME}:${alias}"
units="none"
collectionType="trendsup"/>
<metric name="Current Thread Cpu Time"
alias="CurrentThreadCpuTime"
indicator="false"
template="${OBJECT_NAME}:${alias}"
units="ms"
collectionType="trendsup"/>
<metric name="Current Thread User Time"
alias="CurrentThreadUserTime"
indicator="false"
template="${OBJECT_NAME}:${alias}"
units="ms"
collectionType="trendsup"/>
<metric name="Daemon Thread Count"
alias="DaemonThreadCount"
indicator="false"
template="${OBJECT_NAME}:${alias}"
units="none"
collectionType="dynamic"/>
<metric name="Peak Thread Count"
alias="PeakThreadCount"
indicator="false"
template="${OBJECT_NAME}:${alias}"
units="none"
collectionType="static"/>
</metrics>
<metrics name="OS Metrics">
<metric name="Free Swap Space Size"
alias="FreeSwapSpaceSize"
template="${OBJECT_NAME}:${alias}"
units="B"
collectionType="dynamic"/>
<metric name="Free Physical Memory Size"
alias="FreePhysicalMemorySize"
template="${OBJECT_NAME}:${alias}"
units="B"
collectionType="dynamic"/>
<metric name="Process Cpu Time"
alias="ProcessCpuTime"
indicator="true"
template="${OBJECT_NAME}:${alias}"
units="ns"
collectionType="trendsup"/>
<metric name="Open File Descriptor Count"
alias="OpenFileDescriptorCount"
indicator="false"
template="${OBJECT_NAME}:${alias}"
units="none"
collectionType="dynamic"/>
</metrics>
<metrics name="Runtime Metrics">
<metric name="UpTime"
alias="Uptime"
indicator="true"
template="${OBJECT_NAME}:${alias}"
units="ms"
collectionType="static"/>
</metrics>
<filter name="memory" value="java.lang:type=Memory"/>
<metrics name="Heap Metrics">
<metric name="Heap Memory Used"
units="B"
template="${memory}:Composite.HeapMemoryUsage.used"/>
<metric name="Heap Memory Committed"
units="B"
template="${memory}:Composite.HeapMemoryUsage.committed"/>
<metric name="Heap Memory Free"
indicator="true"
units="B"
template="${memory}:Composite.HeapMemoryUsage.free"/>
<metric name="Heap Memory Max"
units="B"
collectionType="static"
template="${memory}:Composite.HeapMemoryUsage.max"/>
</metrics>
<server name="Apache Tomcat"
version="5.5"
platforms="Unix,Win32">
<property name="VERSION_FILE"
value="server/lib/catalina-storeconfig.jar"/>
<property name="tomcatVersion" value="1.0"/>
<plugin type="autoinventory"
class="org.hyperic.hq.plugin.tomcat.TomcatServerDetector"/>
<property name="domain"
value="Catalina"/>
<property name="OBJECT_NAME"
value="java.lang:type=Runtime"/>
<metrics include="Runtime Metrics"/>
<property name="OBJECT_NAME"
value="java.lang:type=OperatingSystem"/>
<metrics include="OS Metrics"/>
<property name="OBJECT_NAME"
value="java.lang:type=Threading"/>
<metrics include="Thread Metrics"/>
<metrics include="Heap Metrics"/>
<property name="PROC_HOME_PROPERTY"
value="catalina.base"/>
<property name="PROC_QUERY"
value="State.Name.re=java|jsvc,State.Name.Pne=jsvc,Args.*.sw=-Dcatalina.base="/>
<property name="DEFAULT_CONF"
value="conf/server.xml"/>
<property name="DEFAULT_LOG_FILE"
value="logs/catalina.out"/>
<plugin type="log_track"
class="org.hyperic.hq.product.Log4JLogTrackPlugin"/>
<plugin type="config_track"
class="org.hyperic.hq.product.FileChangeTrackPlugin">
<monitored>
<folder path="conf" recursive="true" filter=".*\.properties|.*\.xml|.*.policy|.*\.cfg|.*\.cnf|.*\.conf"/>
<folder path="bin" recursive="false" filter=".*\.bat|.*\.xml|.*\.sh"/>
<folder path="lib" recursive="false" filter=".*\.jar"/>
<folder path="webapps" recursive="true" filter=".*\.properties|.*\.xml|.*\.jar|.*\.dll|.*\.class|.*\.pl|.*\.py|.*\.pyc|.*\.cgi"/>
</monitored>
</plugin>
<property name="DEFAULT_CONFIG_TRACK_ENABLE" value="false" />
<property name="DEFAULT_PROGRAM"
value="bin/catalina.sh"/>
<plugin type="control"
class="org.hyperic.hq.product.jmx.MxServerControlPlugin"/>
<property name="start.args"
value="start"/>
<property name="stop.args"
value="stop"/>
<plugin type="control"
platform="Win32"
class="org.hyperic.hq.product.Win32ControlPlugin"/>
<actions platform="Win32"
include="start,stop,restart"/>
<config type="control" platform="Win32">
<option name="service_name"
default="Apache Tomcat"
description="Tomcat Service Name"/>
</config>
<config>
<option name="jmx.url"
description="JMX URL to MBeanServer"
default="service:jmx:rmi:///jndi/rmi://localhost:6969/jmxrmi"/>
<option name="jmx.username"
description="JMX username"
optional="true"
default="system"/>
<option name="jmx.password"
description="JMX password"
optional="true"
default="manager"
type="secret"/>
<option name="process.query"
description="PTQL for Tomcat Process"
default="${PROC_QUERY}"/>
<option name="listen.ports"
description="Listening Ports" optional="true"/>
</config>
<plugin type="measurement"
class="org.hyperic.hq.product.jmx.MxMeasurementPlugin"/>
<metric name="Availability"
template="sigar:Type=ProcState,Arg=%process.query%:State"
indicator="true"/>
<service name="Web Module Stats">
<property name="OBJECT_NAME"
value="${domain}:j2eeType=WebModule,name=*,J2EEApplication=*,J2EEServer=*"/>
<plugin type="autoinventory"/>
<plugin type="control"
class="org.hyperic.hq.product.jmx.MxControlPlugin"/>
<actions include="stop,start,reload"/>
<!-- listen for JMX notifications -->
<plugin type="log_track"
class="org.hyperic.hq.product.jmx.MxNotificationPlugin"/>
<config>
<option name="name"
description="Name Of Web Module"
default=""/>
<option name="J2EEApplication"
description="J2EE Application"
default=""/>
<option name="J2EEServer"
description="J2EE Server"
default=""/>
</config>
<metric name="Availability"
indicator="true"/>
<metric name="Processing Time"
alias="processingTime"
indicator="true"
template="${OBJECT_NAME}:${alias}"
units="sec"/>
</service>
<service name="Thread Pools">
<property name="OBJECT_NAME"
value="${domain}:type=ThreadPool,name=*"/>
<plugin type="autoinventory"/>
<plugin type="control"
class="org.hyperic.hq.product.jmx.MxControlPlugin"/>
<actions include="start,shutdown"/>
<!-- listen for JMX notifications -->
<plugin type="log_track"
class="org.hyperic.hq.product.jmx.MxNotificationPlugin"/>
<config>
<option name="name"
description="Listener Name"
default=""/>
</config>
<metric name="Availability"
indicator="true"/>
<metric name="Current Thread Count"
alias="currentThreadCount"
indicator="true"
template="${OBJECT_NAME}:${alias}"
units="none"/>
<metric name="Current Thread Busy"
alias="currentThreadsBusy"
indicator="true"
template="${OBJECT_NAME}:${alias}"
units="none"/>
</service>
<service name="Servlet Monitor">
<property name="OBJECT_NAME"
value="${domain}:j2eeType=Servlet,name=*,WebModule=*,J2EEApplication=*,J2EEServer=*"/>
<plugin type="autoinventory"/>
<!-- listen for JMX notifications -->
<plugin type="log_track"
class="org.hyperic.hq.product.jmx.MxNotificationPlugin"/>
<config>
<option name="WebModule"
description="Deployed Module"
default=""/>
<option name="J2EEApplication"
description="J2EE Application"
default=""/>
<option name="J2EEServer"
description="J2EE Server"
default=""/>
</config>
<metric name="Availability"
indicator="true"/>
<metric name="Class Load Time"
alias="classLoadTime"
indicator="false"
template="${OBJECT_NAME}:${alias}"
units="none"/>
<metric name="Error Count"
alias="errorCount"
indicator="true"
template="${OBJECT_NAME}:${alias}"
collectionType="trendsup"
units="none"/>
<metric name="Load Time"
alias="loadTime"
indicator="false"
template="${OBJECT_NAME}:${alias}"
units="none"/>
<metric name="Processing Time"
alias="processingTime"
indicator="false"
template="${OBJECT_NAME}:${alias}"
collectionType="trendsup"
units="none"/>
<metric name="Request Count"
alias="requestCount"
indicator="true"
template="${OBJECT_NAME}:${alias}"
collectionType="trendsup"
units="none"/>
</service>
<service name="JSP Monitor">
<property name="OBJECT_NAME"
value="${domain}:type=JspMonitor,name=jsp,WebModule=*,J2EEApplication=*,J2EEServer=*"/>
<plugin type="autoinventory"/>
<!-- listen for JMX notifications -->
<plugin type="log_track"
class="org.hyperic.hq.product.jmx.MxNotificationPlugin"/>
<config>
<option name="WebModule"
description="Deployed Module"
default=""/>
<option name="J2EEApplication"
description="J2EE Application"
default=""/>
<option name="J2EEServer"
description="J2EE Server"
default=""/>
</config>
<metric name="Availability"
indicator="true"/>
<metric name="JSP Count"
alias="jspCount"
indicator="true"
template="${OBJECT_NAME}:${alias}"
collectionType="trendsup"
units="none"/>
<metric name="JSP Reload Count"
alias="jspReloadCount"
indicator="true"
template="${OBJECT_NAME}:${alias}"
collectionType="trendsup"
units="none"/>
</service>
<service name="Global Request Processor">
<property name="OBJECT_NAME"
value="${domain}:type=GlobalRequestProcessor,name=*"/>
<plugin type="autoinventory"/>
<!-- listen for JMX notifications -->
<plugin type="log_track"
class="org.hyperic.hq.product.jmx.MxNotificationPlugin"/>
<config>
<option name="name"
description="Listener Name"
default=""/>
</config>
<metric name="Availability"
indicator="true"/>
<metric name="Bytes Sent"
alias="bytesSent"
indicator="false"
template="${OBJECT_NAME}:${alias}"
collectionType="trendsup"
units="none"/>
<metric name="Bytes Received"
alias="bytesReceived"
indicator="false"
template="${OBJECT_NAME}:${alias}"
collectionType="trendsup"
units="none"/>
<metric name="Error Count"
alias="errorCount"
indicator="true"
template="${OBJECT_NAME}:${alias}"
collectionType="trendsup"
units="none"/>
<metric name="Processing Time"
alias="processingTime"
indicator="true"
template="${OBJECT_NAME}:${alias}"
collectionType="trendsup"
units="none"/>
<metric name="Request Count"
alias="requestCount"
indicator="true"
template="${OBJECT_NAME}:${alias}"
collectionType="trendsup"
units="none"/>
</service>
<service name="Cache">
<property name="OBJECT_NAME"
value="${domain}:type=Cache,host=*,path=*"/>
<plugin type="autoinventory"/>
<!-- listen for JMX notifications -->
<plugin type="log_track"
class="org.hyperic.hq.product.jmx.MxNotificationPlugin"/>
<config>
<option name="path"
description="Context Path of Deployed Application"
default=""/>
<option name="host"
description="Hostname"
default=""/>
description="Associated Java Class"
default=""/>
</config>
<metric name="Availability"
indicator="true"/>
<metric name="Access Count"
alias="accessCount"
indicator="true"
template="${OBJECT_NAME}:${alias}"
collectionType="trendsup"
units="none"/>
<metric name="Hits Count"
alias="hitsCount"
indicator="true"
template="${OBJECT_NAME}:${alias}"
collectionType="trendsup"
units="none"/>
</service>
<service name="DataSource Pool">
<property name="OBJECT_NAME"
value="${domain}:type=DataSource,path=*,host=*,class=*,name=*"/>
<plugin type="autoinventory"/>
<!-- listen for JMX notifications -->
<plugin type="log_track"
class="org.hyperic.hq.product.jmx.MxNotificationPlugin"/>
<config>
<option name="path"
description="Context Path of Deployed Application"
default=""/>
<option name="host"
description="Hostname"
default=""/>
<option name="class"
description="Associated Java Class"
default=""/>
<option name="name"
description="Name of Attribute"
default=""/>
</config>
<metric name="Availability"
indicator="true"/>
<metric name="Idle DataSource Connections"
alias="numIdle"
indicator="true"
template="${OBJECT_NAME}:${alias}"
units="none"/>
<metric name="Active DataSource Connections"
alias="numActive"
indicator="true"
template="${OBJECT_NAME}:${alias}"
units="none"/>
</service>
<service name="Java Process Metrics">
<config>
<option name="process.query"
default="${PROC_QUERY}"
description="PTQL for Tomcat Java Process"/>
</config>
<metric name="Availability"
template="sigar:Type=ProcState,Arg=%process.query%:State"
indicator="true"/>
&process-metrics;
</service>
<service name="HTTP">
<config include="http"/>
<filter name="template"
value="${http.template}:${alias}"/>
<metric name="Availability"
indicator="true"/>
<metric name="Inbound Connections"
indicator="true"/>
<metric name="Outbound Connections"
indicator="true"/>
</service>
</server>
<server name="Apache Tomcat"
version="6.0"
include="5.5">
<property name="VERSION_FILE"
value="lib/catalina-ha.jar"/>
<!-- derive installpath from -Dcatalina.base=... -->
<property name="PROC_HOME_PROPERTY"
value="catalina.base"/>
<property name="tomcatVersion" value="6.0"/>
&internal-services;
&hibernate-services;
</server>
<server name="Apache Tomcat"
version="7.0"
include="6.0">
<property name="VERSION_FILE"
value="lib/tomcat-api.jar"/>
<property name="PROC_HOME_PROPERTY"
value="catalina.base"/>
<property name="tomcatVersion" value="7.0"/>
&internal-services;
&hibernate-services;
</server>
<server name="JBoss Web" version="2.0" include="Apache Tomcat 6.0">
<property name="JBOSS_VERSION" value="4"/>
<property name="VERSION_FILE" value="deploy/jboss-web.deployer/jbossweb.jar"/>
<property name="PROC_QUERY" value="State.Name.re=java|jsvc,State.Name.Pne=jsvc,Args.*.eq=org.jboss.Main"/>
<plugin type="autoinventory" class="org.hyperic.hq.plugin.tomcat.JBossWebServerDetector"/>
<plugin type="measurement" class="org.hyperic.hq.plugin.tomcat.JBossWeb2XMeasurementPlugin"/>
&hibernate-services;
</server>
<server name="JBoss Web" version="2.1" include="Apache Tomcat 6.0">
<property name="JBOSS_VERSION" value="5"/>
<property name="VERSION_FILE" value="deploy/jbossweb.sar/jbossweb.jar"/>
<property name="PROC_QUERY" value="State.Name.re=java|jsvc,State.Name.Pne=jsvc,Args.*.eq=org.jboss.Main"/>
<plugin type="autoinventory" class="org.hyperic.hq.plugin.tomcat.JBossWebServerDetector"/>
<plugin type="measurement" class="org.hyperic.hq.plugin.tomcat.JBossWeb2XMeasurementPlugin"/>
&hibernate-services;
</server>
<server name="JBoss Web" version="3.0" include="Apache Tomcat 6.0">
<property name="JBOSS_VERSION" value="6"/>
<property name="VERSION_FILE" value="deploy/jbossweb.sar/jbossweb.jar"/>
<property name="PROC_QUERY" value="State.Name.re=java|jsvc,State.Name.Pne=jsvc,Args.*.eq=org.jboss.Main"/>
<plugin type="autoinventory" class="org.hyperic.hq.plugin.tomcat.JBossWebServerDetector"/>
<plugin type="measurement" class="org.hyperic.hq.plugin.tomcat.JBossWebMeasurementPlugin"/>
&hibernate-services;
</server>
<!-- ==================== Plugin Help =========================== -->
<help name="Apache Tomcat">
<![CDATA[
<p>
<h3>Configure Apache Tomcat for JMX</h3>
</p>
To configure Tomcat for JMX monitoring see http://tomcat.apache.org/tomcat-${product.version}-doc/monitoring.html.
<br>
For a quick down and dirty method follow these instructions,
<br>
in <installpath>/bin/catalina.sh add:
<br>
[ $1 != "stop" ] &&
JAVA_OPTS="-Dcom.sun.management.jmxremote \
<br>
-Dcom.sun.management.jmxremote.port=6969 \
<br>
-Dcom.sun.management.jmxremote.ssl=false \
<br>
-Dcom.sun.management.jmxremote.authenticate=false $JAVA_OPTS"
<br>
export JAVA_OPTS
<br>
From there restart Tomcat and that is it.
</p>
]]>
</help>
<help name="Apache Tomcat 5.5" include="Apache Tomcat"/>
<help name="Apache Tomcat 6.0" include="Apache Tomcat"/>
</plugin>