Anda di halaman 1dari 56

2013 kippdata informationstechnologie GmbH 1 Monitoring Apache Tomcat and Web Serer ! "ainer #$ng !

Apache%on &A 2013


Monitoring Apache Tomcat
and the Apache Web Serer
"ainer #$ng
2013 kippdata informationstechnologie GmbH 2 Monitoring Apache Tomcat and Web Serer ! "ainer #$ng ! Apache%on &A 2013
Agenda

Motiation

#aa Management '(tensions )#M*+

Some "emarks

Monitoring Apache Tomcat

Monitoring the Apache Web Serer

,isc$ssion
2013 kippdata informationstechnologie GmbH 3 Monitoring Apache Tomcat and Web Serer ! "ainer #$ng ! Apache%on &A 2013

Motiation

#aa Management '(tensions )#M*+

Some "emarks

Monitoring Apache Tomcat

Monitoring the Apache Web Serer

,isc$ssion
2013 kippdata informationstechnologie GmbH - Monitoring Apache Tomcat and Web Serer ! "ainer #$ng ! Apache%on &A 2013
Motiation ! Monitoring

Monitoring Goals

.ail$re ,etection/ "ed0Green Stat$s/ Alarms/ &otifications

A$tomatic detection and notification of fail$res

&o false posities

Mostl1 onl1 $nderstood and implemented for platform


basics and end2to2end

.ile s1stem free percentage/ %34 5 b$s1

Application login/ s$ccess of test transactions

6nl1 notif1 abo$t root ca$se

Hard to f$lfill
2013 kippdata informationstechnologie GmbH 7 Monitoring Apache Tomcat and Web Serer ! "ainer #$ng ! Apache%on &A 2013
Motiation ! Monitoring

.$rther Monitoring Goals

%ontin$o$s collecting of r$ntime metrics

3olling

Storing

Acc$m$lating and is$ali8ing

4ses9

3roblem root ca$se anal1sis

Which metrics are e(actl1 needed not kno:n in adance

%apacit1 management

,o :e need to add reso$rces

,o :e need to ad;$st soft:are si8ing0config$ration


2013 kippdata informationstechnologie GmbH < Monitoring Apache Tomcat and Web Serer ! "ainer #$ng ! Apache%on &A 2013
Motiation ! %ategories of Monitoring ,ata

What kind of metrics are :e looking for=

Application load and response times

4tili8ation of soft:are components

3ools/ caches

"eso$rce $sage

#aa memor1 and G% behaior

This talk is abo$t metrics readil1 aailable in httpd


and Tomcat/ not abo$t

'nd to end monitoring/ Application specific monitoring/


log file monitoring
2013 kippdata informationstechnologie GmbH > Monitoring Apache Tomcat and Web Serer ! "ainer #$ng ! Apache%on &A 2013
Motiation ! &on2Monitoring ,ata

What :e can?t get from monitoring

@s the application :aiting on another s1stem )back end/


database/ A+=

@s the application :aiting to acB$ire locks )lock


contention/ soft:are design problem+=

Are :e looping in code/ or e(ample d$e to an


$ne(pected error condition=

.or this :e :o$ld need to anal18e thread d$mps

That :o$ld be another talk


2013 kippdata informationstechnologie GmbH C Monitoring Apache Tomcat and Web Serer ! "ainer #$ng ! Apache%on &A 2013

Motiation

#aa Management '(tensions )#M*+

Some "emarks

Monitoring Apache Tomcat

Monitoring the Apache Web Serer

,isc$ssion
2013 kippdata informationstechnologie GmbH D Monitoring Apache Tomcat and Web Serer ! "ainer #$ng ! Apache%on &A 2013
#aa Management '(tensions

#aa Management '(tensions )#M*+

A standard in the #aa :orld

%an be $sed to e(pose internal application states

Si8es )pools etcE+/ co$nters )reB$ests/ errors/ etcE+

%onfig$ration settings

Str$ct$red and nested data s$pported

6perations s$pported

'(amples9 reset/ resi8e/ change log leel/ EEE

&otifications )'mitter/ Fistener+

'ents/ for e(ample threshold alarms


2013 kippdata informationstechnologie GmbH 10 Monitoring Apache Tomcat and Web Serer ! "ainer #$ng ! Apache%on &A 2013
#aa Management '(tensions ! MGeans

MGeans

@nformation is gro$ped in MGeans )Management Geans+

MGeans hae a str$ct$red name )the 6b;ect&ame+/ a list


of attrib$tes )the act$al data+ and sometimes operations

Attrib$tes are often scalar/ can also be nested str$ct$res

Simple e(ample9
Name: Catalina:type=ThreadPool,name="http-bio-8080"
^^Domain^^
currentThreadCount: 10
currentThread!uy: 1
ma"Thread: #00
connectionCount: #
2013 kippdata informationstechnologie GmbH 11 Monitoring Apache Tomcat and Web Serer ! "ainer #$ng ! Apache%on &A 2013
#aa Management '(tensions ! MGeans and MGeanSerer

MGeans and the MGeanSerer)s+

MGeans are registered ia their nameE


The registr1 is called an MGeanSerer

MGean attrib$tes can be retrieed ia )remote+ access to


the MGeanSerer $sing their name

There?s a common base set of MGeans aailable in each


#HM )not onl1 Tomcat+/ named 3latform MGeans

Tomcat )and most other containers+ proides lots of


additional more specific MGeans

@t is eas1 to proide application specific MGeansE


,eelopers sho$ld embrace thisI
2013 kippdata informationstechnologie GmbH 12 Monitoring Apache Tomcat and Web Serer ! "ainer #$ng ! Apache%on &A 2013
#aa Management '(tensions ! "emote #M* Access

"emote #M* Access to an MGeanSerer

&eeds a #M* client/ t1picall1 a #aa client

Some s1stem properties m$st be set

http900docsEoracleEcom0;aase0<0docs0technotes0g$ides0management0agentEhtmlJgdef

2,comEs$nEmanagementE;m(remote K
2,comEs$nEmanagementE;m(remoteEportLDC>< EEE

%a$tion9 for prod$ction s1stems al:a1s config$re access


control

Tro$ble :ith fire:alls )"M@ :hich opens additional ports+

Sol$tion for Tomcat9 #m("emoteFifec1cleFistener


See9 http900tomcatEapacheEorg0tomcat2>E02doc0config0listenersEhtml
2013 kippdata informationstechnologie GmbH 13 Monitoring Apache Tomcat and Web Serer ! "ainer #$ng ! Apache%on &A 2013
#aa Management '(tensions ! #M* %lients

#M*2%lients )fe: e(amples+

#His$alHM

%omes :ith the 6racle #,M

&ot an enterprise tool9

4sef$l for ad hoc inspecting MGeans

6nl1 G4@ mode

&o :a1 to contin$all1 persist data

;m(term )interactie #M* shell+

Most )all+ monitoring sol$tions offer #M* integration


2013 kippdata informationstechnologie GmbH 1- Monitoring Apache Tomcat and Web Serer ! "ainer #$ng ! Apache%on &A 2013
#aa Management '(tensions ! His$alHM ,emo

#His$alHM ,emo

#His$alHM connected to SleepE;aa

#His$alHM connected to #His$alHM

#His$alHM connected to Tomcat


2013 kippdata informationstechnologie GmbH 17 Monitoring Apache Tomcat and Web Serer ! "ainer #$ng ! Apache%on &A 2013
#aa Management '(tensions ! %lient 3roblems and Alternaties

3roblems :ith #M*2%lients

%reating a ne: #HM process for each monitoring poll is a


killer on the polling monitoring serer

So $se a persistent #M* client

Alternatie9 $se another protocol

"$n an agent in the #HM/ that can be reached b1 a non2


#aa technolog10protocolE '(ample9 HTT3

6r r$n a pro(1 :ritten in #aa that talks #M* to the


target b$t can be B$eried for e(ample $sing HTT3
2013 kippdata informationstechnologie GmbH 1< Monitoring Apache Tomcat and Web Serer ! "ainer #$ng ! Apache%on &A 2013

Motiation

#aa Management '(tensions )#M*+

Some "emarks

Monitoring Apache Tomcat

Monitoring the Apache Web Serer

,isc$ssion
2013 kippdata informationstechnologie GmbH 1> Monitoring Apache Tomcat and Web Serer ! "ainer #$ng ! Apache%on &A 2013
Some "emarks

Meas$rements m$st be taken a$tomaticall1 and be


persisted

@nteractie obserations )#His$alHM+ are not s$fficient

&o histor1/ each $ser polls separatel1

%an be $sef$l to get an idea :hat to track

T1pical poll interal 1 min$te

@n addition to polling and persisting the data

We need to think abo$t thresholds

.or :hich meas$rements are the1 adeB$ate/ :hich al$es to choose

We need to a$tomaticall1 is$ali8e the data

Access to ra: data sho$ld be aailable if needed


2013 kippdata informationstechnologie GmbH 1C Monitoring Apache Tomcat and Web Serer ! "ainer #$ng ! Apache%on &A 2013
Some "emarks

H$rdles

Scalar attrib$tes ers$s M*Geans )6penMGeans+

More and more MGeans proide str$ct$red and nested data


)M*Geans+

Tools co$ld a$tomaticall1 inspect the str$ct$re of the data

Some tools still do not s$pport that

%heck 1o$r tool s$pport before implementing 1o$r o:n MGeans as


M*Geans
2013 kippdata informationstechnologie GmbH 1D Monitoring Apache Tomcat and Web Serer ! "ainer #$ng ! Apache%on &A 2013
Some "emarks

More H$rdles

MGeans t1picall1 reflect so$rce code str$ct$re

To man1 MGeans/ to hard to $nderstand

&ot al:a1s optimal gran$larit1

Man1 MGeans of the same t1pe

Might lead to $nacceptable polling load if tool does not s$pport appropriate
b$lk reB$ests

&ecessit1 to $se simple mathematical operators

&ot al:a1s the right leel of information in the MGeans

'(ample9 ma(im$m and c$rrent pool si8e/ b$t not c$rrent percentage

&eed to ded$ce deltas or rates from co$nters/ B$otients of metrics/


B$otients of deltas
2013 kippdata informationstechnologie GmbH 20 Monitoring Apache Tomcat and Web Serer ! "ainer #$ng ! Apache%on &A 2013

Motiation

#aa Management '(tensions )#M*+

Some "emarks

Monitoring Apache Tomcat

Monitoring the Apache Web Serer

,isc$ssion
2013 kippdata informationstechnologie GmbH 21 Monitoring Apache Tomcat and Web Serer ! "ainer #$ng ! Apache%on &A 2013
Monitoring Apache Tomcat ! Getting the ,ata

Fet?s $se HTT3 to retriee #M* data from Tomcat

#M*3ro(1 is part of the Tomcat Manager :ebapp

https900tomcatEapacheEorg0tomcat2>E02doc0manager2
ho:toEhtmlJ4singNtheN#M*N3ro(1NSerlet

"ole Omanager2;m(P needed

,emo

#olokia )http900:::E;olokiaEorg0+

.or Tomcat9 deplo1able :ebapp

"'ST st1le interface/ data deliered in #S6&/ b$lk reB$est s$pport

%lients #m(-3erl/ ;-psh/ #aascript client A3@

6r :rite 1o$r o:n serlet )see code of #M*3ro(1+


2013 kippdata informationstechnologie GmbH 22 Monitoring Apache Tomcat and Web Serer ! "ainer #$ng ! Apache%on &A 2013
Monitoring Apache Tomcat ! 3lattform MGeans

Starting :ith platform MGeans

These are aailable in eer1 #HM/ not ;$st Tomcat


2013 kippdata informationstechnologie GmbH 23 Monitoring Apache Tomcat and Web Serer ! "ainer #$ng ! Apache%on &A 2013
Monitoring Apache Tomcat ! 3lattform MGeans

6peratingS1stem
Name: $a%a&lan':type=(peratin')ytem
*%ailableProceor: +
ProceCpuTime: 1++,0000000
^^^nano econd^^^
)ytem-oad*%era'e: 0&1++,.1#,
TotalPhyical/emory)i0e: +08011.1#8
Total)2ap)pace)i0e: 8811340880
5reePhyical/emory)i0e: 4118.,1.3
5ree)2ap)pace)i0e: ..,3303+3+
Committed6irtual/emory)i0e: #.##1+,#8
(pen5ileDecriptorCount: .1
/a"5ileDecriptorCount: 3,,.3
2013 kippdata informationstechnologie GmbH 2- Monitoring Apache Tomcat and Web Serer ! "ainer #$ng ! Apache%on &A 2013
Monitoring Apache Tomcat ! 3lattform MGeans

6peratingS1stem

3rocess%p$Time9 "ate gies O%34 seconds per secondPE


Appro(imation of needed %34 conc$rrenc1
)%34 cores $sed+E Threshold applies

S1stemFoadAerage9 $s$al 1 min$te aerageE ThresholdE

%ommittedHirt$alMemor1Si8e9 incl$des natie memor1/


for e(ample $sed b1 #&@E Threshold applies/ for e(ample
in case of natie memor1 leaks

6pen0Ma(.ile,escriptor%o$nt9 $sef$l to check ., limitsE


Q$otient gies percentage $sed of allo:ed .,s
2013 kippdata informationstechnologie GmbH 27 Monitoring Apache Tomcat and Web Serer ! "ainer #$ng ! Apache%on &A 2013
Monitoring Apache Tomcat ! 3lattform MGeans

"$ntime

Threading

TotalStartedThread%o$nt9 "ate gies Othreads started per


secondP

Thread%o$nt or ,aemonThread%o$nt9 threshold applies


Name: $a%a&lan':type=Threadin'
Total)tartedThreadCount: #+
Pea7ThreadCount: #.
ThreadCount: ##
DaemonThreadCount: #1
Name: $a%a&lan':type=8untime
9ptime: #,1+,
2013 kippdata informationstechnologie GmbH 2< Monitoring Apache Tomcat and Web Serer ! "ainer #$ng ! Apache%on &A 2013
Monitoring Apache Tomcat ! 3lattform MGeans

%lassFoading

%ompilation

Goth t1picall1 not er1 interesting

3ossibl1 $sef$l :hen r$nning other lang$ages in the #HM

Some:hat $sef$l :hen comparing releases


Name: $a%a&lan':type=Cla-oadin'
-oadedClaCount: .0,8
Total-oadedClaCount: .0,8
9nloadedClaCount: 0
Name: $a%a&lan':type=Compilation
TotalCompilationTime: ,#10
2013 kippdata informationstechnologie GmbH 2> Monitoring Apache Tomcat and Web Serer ! "ainer #$ng ! Apache%on &A 2013
Monitoring Apache Tomcat ! 3lattform MGeans

Memor1

&ot interesting/ beca$se seeral memor1 regions are


thro:n together

G$t see ne(t MGean t1pe EEE


Name: $a%a&lan':type=/emory
(b$ectPendin'5inali0ationCount: 0
:eap/emory9a'e: committed=104111++0,
init=3.1311,#, ma"=401810#08, ued=.+,+#40+
Non:eap/emory9a'e: committed=#,100#88,
init=#+.1.8,3, ma"=1.3.1+880, ued=#.41,8#+
2013 kippdata informationstechnologie GmbH 2C Monitoring Apache Tomcat and Web Serer ! "ainer #$ng ! Apache%on &A 2013
Monitoring Apache Tomcat ! 3lattform MGeans

Memor13ool

,ata aailable for9 'den/ S$rior/ Ten$red/ 3erm and


%ode %ache

'(ample for 'den

%ollection4sage9 better $se ne(t MGean


Name: $a%a&lan':type=/emoryPool,name=P) ;den )pace
9a'e: committed=3.43.1.3,
init=1,44018+, ma"=..,1,110+, ued=1+04+#00
Pea79a'e: committed=3.43.1.3,
init=1,44018+, ma"=..,1,110+, ued=.1481,38
Collection9a'e: committed=3.43.1.3,
init=1,44018+, ma"=..,1,110+, ued=0
2013 kippdata informationstechnologie GmbH 2D Monitoring Apache Tomcat and Web Serer ! "ainer #$ng ! Apache%on &A 2013
Monitoring Apache Tomcat ! 3lattform MGeans

Garbage%ollector

,ata Aailable for eden G% )e(ample9 O3S ScaengeP+


and for ten$red G% )e(ample9 O3S MarkS:eepP+

%ollectionTime9 c$m$lated d$ration in milliseconds

startTime/ endTime9 milliseconds since #HM start


Name: $a%a&lan':type=<arba'eCollector,name=P) )ca%en'e
CollectionCount: +
CollectionTime: 1#1
-at<c=n>o: <cThreadCount=+, id=+,
tartTime=10#1,, endTime=10.0#, duration=#1,
memory9a'e!e>ore<c=?&&&@, memory9a'e*>ter<c=?@
2013 kippdata informationstechnologie GmbH 30 Monitoring Apache Tomcat and Web Serer ! "ainer #$ng ! Apache%on &A 2013
Monitoring Apache Tomcat ! 3lattform MGeans

Garbage%ollector

'(ample Oten$redP cleaning in O3S MarkS:eepP

memor14sageGeforeGc9

memor14sageAfterGc9
AP) (ld <enB=?committed=+#,.#83+, init=+#,.#83+,
ma"=3804140+0, ued=14,3.#80@
AP) (ld <enB=?committed=+#,.#83+, init=+#,.#83+,
ma"=3804140+0, ued=18.43388@
2013 kippdata informationstechnologie GmbH 31 Monitoring Apache Tomcat and Web Serer ! "ainer #$ng ! Apache%on &A 2013
Monitoring Apache Tomcat ! Global Tomcat MGeans

&o: Tomcat MGeans9


.irst the global Tomcat MGeans

Thread3ool )for each %onnector in sererE(ml+

c$rrentThreadsG$s10ma(Threads9 thread pool $sage

What is Ob$s1P= ,epending on connector9 handles a


connection )G@6+ or handles a reB$est )&@6 and A3"+

connection%o$nt9 off b1 1/ $sef$l :hen $sing &@6 or A3"


Name: Catalina:type=ThreadPool,name="http-bio-8080"
currentThreadCount: 10
currentThread!uy: 1
ma"Thread: #00
connectionCount: #
2013 kippdata informationstechnologie GmbH 32 Monitoring Apache Tomcat and Web Serer ! "ainer #$ng ! Apache%on &A 2013
Monitoring Apache Tomcat ! Global Tomcat MGeans

Global"eB$est3rocessor )for each %onnector+

reB$est%o$nt9 "ate gies thro$ghp$t )reB$ests per sec+

b$t9 :hat is an error=

delta)error%o$nt+0delta)reB$est%o$nt+9 error rate


Name: Catalina:type=<lobal8eCuetProceor,
name="http-bio-8080"
reCuetCount: #0
errorCount: 1
procein'Time: .133
ma"Time: 140#
byte8ecei%ed: 0
byte)ent: 31,341
2013 kippdata informationstechnologie GmbH 33 Monitoring Apache Tomcat and Web Serer ! "ainer #$ng ! Apache%on &A 2013
Monitoring Apache Tomcat ! Global Tomcat MGeans

Global"eB$est3rocessor contin$ed

processingTime9 c$m$lated in millisecondsE


"ate is aerage reB$est conc$rrenc1 in last interal )I+

delta)processingTime+0delta)reB$est%o$nt+9 aerage
reB$est processing time in the last interal )I+

b1tes"eceied/ b1tesSent9 do not contain headersE


"ate is appro(imation for band:idth )headers missing+E
delta)b1tes+0delta0reB$est%o$nt+ is aerage bod1 si8e in
the last interal
2013 kippdata informationstechnologie GmbH 3- Monitoring Apache Tomcat and Web Serer ! "ainer #$ng ! Apache%on &A 2013
Monitoring Apache Tomcat ! Global Tomcat MGeans

"eB$est3rocessor )ro$ghl1 for each thread+

c$rrent4ri9 attrib$te onl1 present if the processor


c$rrentl1 :orks on a reB$est

reB$est3rocessingTime9 detect long r$nning reB$ests on


the fl1
Name: Catalina:type=8eCuetProceor,
2or7er="http-bio-8080",name=:ttp8eCuet3
requestCount: 3
errorCount: 0
...
remote*ddr: 0:0:0:0:0:0:0:1
current9ri: Dleep&$p
reCuetProcein'Time: 4+.#
2013 kippdata informationstechnologie GmbH 37 Monitoring Apache Tomcat and Web Serer ! "ainer #$ng ! Apache%on &A 2013
Monitoring Apache Tomcat ! Global Tomcat MGeans

,ataSo$rce )Tomcat proided database connE pools+

ma(Actie9 config$ration item

100Rn$mActie0ma(Actie9 c$rrent pool $se in percent

%an be per :ebapp if defined in the :ebapp/


6b;ect&ame then slightl1 different
Name: Catalina:type=Data)ource,
cla=$a%a"&Cl&Data)ource,
name="$dbcDmyappD!"
num=dle: .
num*cti%e: 1
ma"*cti%e: 1
2013 kippdata informationstechnologie GmbH 3< Monitoring Apache Tomcat and Web Serer ! "ainer #$ng ! Apache%on &A 2013
Monitoring Apache Tomcat ! Webapp Tomcat MGeans

.inall1 the per Webapp Tomcat MGeans

Manager )Session Management+

session%o$nter/ e(piredSessions9 sessions created respE


e(pired since Tomcat startE "ate is session per second/
for e(ample Ologin rateP and Ologo$t0timeo$t ratePE
4se thresholdE

actieSessions9 c$rrent n$mber of sessionsE 4se threshold


Name: Catalina:type=/ana'er,conte"t=D,
hot=localhot
eionCounter: 1#.+
acti%e)eion: 14
e"pired)eion: 1#1+
2013 kippdata informationstechnologie GmbH 3> Monitoring Apache Tomcat and Web Serer ! "ainer #$ng ! Apache%on &A 2013
Monitoring Apache Tomcat ! Webapp Tomcat MGeans

Manager contin$ed

ma(Actie9 can be reset :itho$t restart

re;ectedSessions9 ho: often :as a config$red


ma(ActieSessions limit reached

d$plicates9 ho: often :as a session @, non2$niB$e and


had to be replaced )d$ring session generation+E
T1picall1 al:a1s O0P
Name: Catalina:type=/ana'er,conte"t=D,
hot=localhot
ma"*cti%e: 11+
re$ected)eion: 0
duplicate: 0
2013 kippdata informationstechnologie GmbH 3C Monitoring Apache Tomcat and Web Serer ! "ainer #$ng ! Apache%on &A 2013
Monitoring Apache Tomcat ! Webapp Tomcat MGeans

Manager contin$ed

OalieP times9 in seconds meas$red from session creation


to e(piration )be it logo$t or session idle timeo$t+

processingTime9 c$m$lated elapsed milliseconds needed


for session e(piration handlingE 4s$all1 not interesting/
b$t co$ld be :hen $sing a c$stom HttpSessionFistener
Name: Catalina:type=/ana'er,conte"t=D,
hot=localhot
eion*%era'e*li%eTime: +,8
eion/a"*li%eTime: 1831
procein'Time: .
2013 kippdata informationstechnologie GmbH 3D Monitoring Apache Tomcat and Web Serer ! "ainer #$ng ! Apache%on &A 2013
Monitoring Apache Tomcat ! Webapp Tomcat MGeans

Manager contin$ed

"ate9 "ates per min$te for the last 100 session


created0e(pired
Name: Catalina:type=/ana'er,conte"t=D,
hot=localhot
eionCreate8ate: 1
eion;"pire8ate: 1
2013 kippdata informationstechnologie GmbH -0 Monitoring Apache Tomcat and Web Serer ! "ainer #$ng ! Apache%on &A 2013
Monitoring Apache Tomcat ! Webapp Tomcat MGeans

Serlet

Times in millisecondsE 'arlier remarks appl1/ see


Global"eB$est3rocessor
Name: Catalina:$#eeType=)er%let,name=E/FPro"y,
Geb/odule=DDlocalhotDmana'er,
E#;;*pplication=none,E#;;)er%er=none
reCuetCount: 3
errorCount: 1
procein'Time: 1.30
minTime: 4#
ma"Time: 184
2013 kippdata informationstechnologie GmbH -1 Monitoring Apache Tomcat and Web Serer ! "ainer #$ng ! Apache%on &A 2013
Monitoring Apache Tomcat ! Webapp Tomcat MGeans

Odefa$ltP Serlet )Tomcat proided+

Handles sering of static content


Name: Catalina:$#eeType=)er%let,name=de>ault,
Geb/odule=DDlocalhotD,
E#;;*pplication=none,E#;;)er%er=none
reCuetCount: 11.
errorCount: 0
procein'Time: #+.
minTime: 0
ma"Time: 3
2013 kippdata informationstechnologie GmbH -2 Monitoring Apache Tomcat and Web Serer ! "ainer #$ng ! Apache%on &A 2013
Monitoring Apache Tomcat ! Webapp Tomcat MGeans

O#S3P Serlet )Tomcat proided+

Tracks #S3 e(ec$tion


Name: Catalina:$#eeType=)er%let,name=$p,
Geb/odule=DDlocalhotD,
E#;;*pplication=none,E#;;)er%er=none
reCuetCount: ,
errorCount: 0
procein'Time: ..1#
minTime: +4+
ma"Time: 41#
2013 kippdata informationstechnologie GmbH -3 Monitoring Apache Tomcat and Web Serer ! "ainer #$ng ! Apache%on &A 2013
Monitoring Apache Tomcat ! Webapp Tomcat MGeans

#S3Monitor

Tracks #S3 loading/ reloading and $nloading

.or O$nloadingP see Oma(Foaded#spsP on


http900tomcatEapacheEorg0tomcat2>E02doc0;asper2ho:toEhtml
Name: Catalina:type=Ep/onitor,name=$p,
Geb/odule=DDlocalhotD,
E#;;*pplication=none,E#;;)er%er=none
$pCount: .1
$p9nloadCount: 0
$p8eloadCount: .1
$pHueue-en'th: -1
2013 kippdata informationstechnologie GmbH -- Monitoring Apache Tomcat and Web Serer ! "ainer #$ng ! Apache%on &A 2013
Monitoring Apache Tomcat ! Webapp Tomcat MGeans

WebMod$le )Webapp+

processingTime9 as $s$al c$m$lated millisecond elapsed


time for all handled reB$ests )in this :ebapp+E S$m oer
all serletsE

4nfort$natel1 no OreB$est%o$ntP aailable on the


Webapp leel )onl1 per serlet or per connector+

.i(ed a fe: min$tes ago for the ne(t T% > release


Name: Catalina:$#eeType=Geb/odule,
name=DDlocalhotDmana'er,
E#;;*pplication=none,E#;;)er%er=none
procein'Time: 1.30
2013 kippdata informationstechnologie GmbH -7 Monitoring Apache Tomcat and Web Serer ! "ainer #$ng ! Apache%on &A 2013

Motiation

#aa Management '(tensions )#M*+

Some "emarks

Monitoring Apache Tomcat

Monitoring the Apache Web Serer

,isc$ssion
2013 kippdata informationstechnologie GmbH -< Monitoring Apache Tomcat and Web Serer ! "ainer #$ng ! Apache%on &A 2013
Monitoring the Apache Web Serer ! Getting the ,ata

Fet?s $se HTT3 to retriee data from httpd

The mod$le modNstat$s proides a :eb page :ith


monitoring data

So$ can choose an1 4"@ 1o$ like )O0serer2stat$sP+/ b$t


the OSetHandlerP m$st be config$red as2is

Alternatie not sho:n here9 %onnect to scoreboard


shared memor1 and read data from there
-oad/odule tatuImodule moduleDmodItatu&o
J-ocation Der%er-tatuK
)et:andler er%er-tatu
LLL M(98 *CC;)) C(NT8(- <(;) :;8; LLL
JD-ocationK
2013 kippdata informationstechnologie GmbH -> Monitoring Apache Tomcat and Web Serer ! "ainer #$ng ! Apache%on &A 2013
Monitoring the Apache Web Serer ! Getting the ,ata

'(ample9
http900:::EapacheEorg0serer2stat$s

HTMF ie:

Most complete data

,ata interesting

&eeds to be parsed
2013 kippdata informationstechnologie GmbH -C Monitoring Apache Tomcat and Web Serer ! "ainer #$ng ! Apache%on &A 2013
Monitoring the Apache Web Serer ! Getting the ,ata

'(ample Oa$toP9
0serer2stat$s=a$to

Te(t ie:

@ncomplete data

,ata still interesting

Triial to parse
2013 kippdata informationstechnologie GmbH -D Monitoring Apache Tomcat and Web Serer ! "ainer #$ng ! Apache%on &A 2013
Monitoring the Apache Web Serer ! Getting the ,ata

3er OslotP data

O'(tendedStat$s 6nP

"ecentl1 on b1 defa$lt if modNstat$s is loaded

HTMF table/ needs to be parsed

&ot especiall1 interesting for monitoring


2013 kippdata informationstechnologie GmbH 70 Monitoring Apache Tomcat and Web Serer ! "ainer #$ng ! Apache%on &A 2013
Monitoring the Apache Web Serer ! Getting the ,ata

3er OslotP data ! notable ariant

0serer2stat$s=notable

'asier to parse

Still not especiall1 interesting for monitoring


2013 kippdata informationstechnologie GmbH 71 Monitoring Apache Tomcat and Web Serer ! "ainer #$ng ! Apache%on &A 2013
Monitoring the Apache Web Serer ! 4sef$l Metrics

Which metrics are $sef$l=

"estart Time9 Gracef$l does not co$nt as a restart

S1stem load n$mbers that 1o$ :o$ld also get from the
6S O$ptimeP command

Added in 2E-E-/ $se threshold

4se rate calc$lation for reB$ests0second and band:idth

4se B$otient of delta for aerage si8e in last interal


8etart Time: /onday, #,-5eb-#01. 18:.4:.1 9TC
)er%er uptime: 1 day #. hour ,. minute +3 econd
)er%er load: #&#, #&,# #&+3
Total accee: #.18#.,4 - Total Tra>>ic: 1+0.&3 <!
2013 kippdata informationstechnologie GmbH 72 Monitoring Apache Tomcat and Web Serer ! "ainer #$ng ! Apache%on &A 2013
Monitoring the Apache Web Serer ! 4sef$l Metrics

Which metrics are $sef$l=

%$rrent :orker thread $sed and aailable conc$rrenc1

Worker thread co$nt important si8ing parameter

4se threshold

@MH6 not as $sef$l

%34 not reliable )child %34 handling+

Aerages since restart


#4 reCuet currently bein' proceed, ##1 idle
2or7er
CP9 9a'e: u#+31&88 14#1&3+ cu0 c0 - #&,,N CP9 load
1.+ reCuetDec - 8&. /!Decond - 3.&, 7!DreCuet
2013 kippdata informationstechnologie GmbH 73 Monitoring Apache Tomcat and Web Serer ! "ainer #$ng ! Apache%on &A 2013
Monitoring the Apache Web Serer ! 4sef$l Metrics

What are the b$s1 :orker threads doing=

'ach character represents the stat$s of a :orker thread

%o$nt most important chars )W/"/M/N/E+/ s$m $p rest

4sing the eent M3M most OMP :ill not be sho:n/


beca$se the1 no longer block a :orker thread/ so EEE
IIIIIIIIIIGIIIIIIIIIIIIIIIIIIIIIIIIIII88IIIIIIGIIIIII
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
IIII8IIG8G8II8IG8IIIII8II88GIIIII8IIIGG8IIIIIIIIIII8G
)coreboard Oey:
"I" Gaitin' >or Connection, ")" )tartin' up, "8" 8eadin' 8eCuet,
"G" )endin' 8eply, "O" Oeepali%e PreadQ, "D" DN) -oo7up,
"C" Cloin' connection, "-" -o''in', "<" <race>ully >inihin',
"=" =dle cleanup o> 2or7er, "&" (pen lot 2ith no current proce
2013 kippdata informationstechnologie GmbH 7- Monitoring Apache Tomcat and Web Serer ! "ainer #$ng ! Apache%on &A 2013
Monitoring the Apache Web Serer ! 4sef$l Metrics

What abo$t connections not blocking a :orker thread


)'ent M3M+=

3er process and


s$ms

The follo:ing
t1picall1 s$m $p9
Ob$s1P T O:ritingP T Okeep2alieP T OclosingP L OtotalP

6nl1 Ob$s1P needs a :orker thread

Monitor OThreadsP and OAs1ncP data in OS$mP ro:

All other connections states $se a separate poller

&ote ho: fe: are Ob$s1P compared :ith the other states
2013 kippdata informationstechnologie GmbH 77 Monitoring Apache Tomcat and Web Serer ! "ainer #$ng ! Apache%on &A 2013

Motiation

#aa Management '(tensions )#M*+

Some "emarks

Monitoring Apache Tomcat

Monitoring the Apache Web Serer

,isc$ssion
2013 kippdata informationstechnologie GmbH 7< Monitoring Apache Tomcat and Web Serer ! "ainer #$ng ! Apache%on &A 2013
,isc$ssion

An1 B$estions=

Anda mungkin juga menyukai