Está en la página 1de 59

TRNG I HC BCH KHOA

KHOA KHOA HC V K THUT MY TNH




BO CO THC TP TT NGHIP

ti:
Xy dng h thng gim st ti nguyn trn nn
tng in ton m my cho h thng Virtual Lab
trong trng i hc


GVHD: PGS.TS. Thoi Nam
TS. Phm Trn V
Thc hin: Nguyn Hu Nht Minh (50801265)
Thi ng Nh Ngc (50801389)

TP. H CH MINH THNG 6/2012
n mn hc: Gim st ti nguyn

i

Mc lc

Li m u ........................................................................................................................................................ 1
Chng 1. Gii thiu ti ............................................................................................................................ 2
1.1. Bi cnh............................................................................................................................................... 2
1.1.1. Tng quan Virtual Computing Laborator ....................................................................................... 2
1.1.2. Xy dng h thng Virtual Lab trong trng i hc .................................................................... 3
1.1.3. Vn gii quyt .......................................................................................................................... 4
1.2. Mc tiu .............................................................................................................................................. 4
1.2.1. n ............................................................................................................................................ 4
1.2.2. Lun vn ....................................................................................................................................... 4
1.3. Trin khai............................................................................................................................................. 5
1.3.1. Giai on nghin cu.................................................................................................................... 5
1.3.2. Giai on trin khai ...................................................................................................................... 5
1.3.3. Giai on hon thnh ................................................................................................................... 5
Chng 2. Cng ngh .................................................................................................................................... 6
2.1. Tng quan ........................................................................................................................................... 6
2.1.1. in ton m my ...................................................................................................................... 6
2.1.2. o ha ........................................................................................................................................ 12
2.1.3. Gim st ..................................................................................................................................... 18
2.2. Zenoss Core ....................................................................................................................................... 21
2.2.1. Gii thiu ................................................................................................................................... 21
2.2.2. Kin trc ..................................................................................................................................... 22
2.2.3. Chc nng .................................................................................................................................. 25
2.2.4. Cc thnh phn .......................................................................................................................... 25
2.2.5. Zenpack .................................................................................................................................... 259
2.3. Th vin h tr .................................................................................................................................. 30
2.3.1. Zenplugins .................................................................................................................................. 30
2.3.2. NagiosPlugins ............................................................................................................................. 31
n mn hc: Gim st ti nguyn

ii

2.3.3. Libvirt ......................................................................................................................................... 32
2.4. RRD ................................................................................................................................................... 37
2.4.1. c im .................................................................................................................................... 37
2.4.2. RRD trong b cng c RRDtool.................................................................................................... 38
Chng 3. Gii php .................................................................................................................................... 39
3.1. M hnh chung .................................................................................................................................. 39
3.2. Giao tip ............................................................................................................................................ 41
3.2.1. Vi nhm qun l ti nguyn ...................................................................................................... 41
3.2.2. Vi nhm tnh ph ....................................................................................................................... 42
3.3. Phng php hin thc ..................................................................................................................... 43
Chng 4. Hin thc.................................................................................................................................... 44
4.1. Hin thc Zenpack dng ssh ly thng tin thit b .............................................................................. 44
4.1.1. Cu trc Zenpack hin thc ........................................................................................................ 44
4.1.2. Deloy v demo............................................................................................................................ 44
4.2. Cc plugin s dng trong Monitor template ...................................................................................... 51
4.2.1. Plugin mc nh ca Zenoss ........................................................................................................ 51
4.2.2. Plugin m rng ca Zenoss ......................................................................................................... 51
4.2.3. Plugin t cng ng Nagios ........................................................................................................ 52
4.3. Hin thc module gim st trong Virtual Lab ..................................................................................... 53
Chng 5. nh gi ..................................................................................................................................... 55
Ti liu tham kho ........................................................................................................................................... 56




n mn hc: Gim st ti nguyn

1

Li m u


Trong khong nhng nm tr li y, in ton m my lun l xu hng thu
ht cc doanh nghip v gii nghin cu quan tm bi nhng li ch m n mang li.
in ton in my l mt m hnh in ton mi c kh nng co gin linh ng ty
thuc vo nhu cu thc t, trong tt c cc ti nguyn tn ti di dng dch v
c cung cp thng qua mng. S ra i ca in ton m my cho php xy
dng nhng h thng c kh nng tnh ton ln phc v nhu cu gii quyt nhng
bi ton c quy m ln. Cc cng ty ln nh Amazon, Google, IBM, Microsoft, Apple
vi nhng kho d liu trung tm nm ri rc khp ni trn th gii, thng qua m
hnh in ton mi ny c th cho php cc doanh nghip khc lu tr v qun l d
liu trn nhng kho d liu ny. S ra i in ton m my gip cho cc doanh
nghip va v nh tit kim chi ph u t v qun l h tng bng cch thu cc dch
v ny t cc nh cung cp. ng hnh vi s pht trin mnh m ca in ton
m my thu ht rt nhiu nh khoa hc, trng i hc v cc cng ty cng ngh
u t nghin cu. Vic ng dng in ton m my vn cn gy ra nhng lo ngi
v vn an ton v bo mt. Tuy nhin in ton m my vi nhng li ch v mt
chi ph, tnh sn sng v linh ng ca n ha hn l mt hng i y tim nng.








n mn hc: Gim st ti nguyn

2

Chng 1. Gii thiu ti

1.1. Bi cnh
1.1.1. Tng quan Virtual Computing Laboratory
a. Gii thiu
Thng thng trong cc trng i hc, cc sinh vin u c nhu cu s dng
my tnh khng nhng trong m cn ngoi cc gi ln lp c th nghin cu v
luyn tp cc bi hc trn lp. Vic cung cp cc phng thc hnh cho sinh vin
s dng ngoi gi ln lp c nhiu kh khn v chi ph mua v qun l ti nguyn
phn cng, a im xy dng, cng nh cc chng trnh ci t trn my cho
ph hp vi nhu cu ca cc mn hc Mt gii php c s dng l cc phng
thc hnh o (Virtual Computing Laboratory).
Virtual Computing Laboratory (VCL) l sn phm ca trng i hc Bc
Carolina c bt u pht trin vo nm 2004. N nhm mc ch lm tng hiu
qu trong vic s dng phn cng v cung cp kh nng truy cp t xa ti cc my
tnh cho cc sinh vin, ging vin hoc nh nghin cu ca trng.
c im ca VCL:
Cung cp linh hot cc ti nguyn theo yu cu
Tit kim cc chi ph ti nguyn vt l.
Ngi dng c th s dng t xa bngmy tinh c nhn qua trnh duyt
web. Nhng my tnh ny khng cn i hi cu hnh cao c th chy c
cc ng dng v cc ng dng ny c thc hin trn cc server.
Sinh vin c th tit kim chi phi mua bn quyn cc phn mm ng dng
dnh cho mn hc.
Bt li ca VCL l thi gian p ng yu cu cn ln. Ngoi ra n cn yu
cu ng truyn mng n nh nu mun truy cp t xa.
b. M hnh hot ng
n mn hc: Gim st ti nguyn

3


Hnh 1.1: M hnh tng qut ca VCL

Giao din web portal dnh cho ngi dng.
Cng c qun l ti nguyn dnh bao gm cc hot ng gim st, lp lch, an
ninh, tnh ton chi ph
Cc server c s d liu: lu tr tt c d liu v qun l{, iu khin truy cp,
thng tin lch s
Kho lu tr nh ca cc my o.
H thng phn cng.
1.1.2. Xy dng h thng Virtual Lab trong trng i hc
Vic ng dng h thng virtual lab trong trng i hc s gip nng cao hiu sut,
gim chi ph cho nh trng, cng nh n s gip sinh vin, ging vin c c hi tt
hn cho vic hc tp v ging dy. c th xy dng mt h thng, v a vo vn
dng i hi mt qu trnh nghin cu, tm ti v p dng trong mt thi gian di.
H thng Virtual Lab chng ti xy dng s gm nhiu thnh phn cu to nn nh
trang web qun l, cc cng c qun l ti nguyn, lp lch, gim st ti nguyn, tnh
ton chi ph c thc hin da trn cng c qun l h tng Opennebula. Mi thnh
phn ny m nhn mt nhim v ring nhng c s giao tip gia chng gip h
thng c nhng chc nng hon thin v p dng c vo thc tin.
n mn hc: Gim st ti nguyn

4

i vi nhm chng ti, chng ti c nhim v xy dng h thng gim st ti
nguyn nhm gip h thng chnh c th theo di, qun l cht ch cc ti nguyn v
a ra nhng quyt nh da trn nhng s liu . y l mt thnh phn khng th
thiu trong mi h thng m bt k h thng ln no cng cn phi thc hin. Vic gim
st ny khng nhng a ra nhng s liu v hiu sut h thng m cn c th a ra
nhng cnh bo v x l khi c li xut hin, hoc h thng hot ng vt ngng
cho php.
1.1.3. Vn gii quyt
Vi cng vic xy dng h thng gim st ti nguyn Virtual Lab trong trng i
hc th i hi nhiu vn cn thc hin. Ngi qun l cn c bit cc thng tin
v h thng nh thng tin CPU, RAM, bng thng, kh nng lu tr c th s dng
nhng thng tin ny cho cc cng vic khc. Thm vo nhng d liu ny cn phi
c th hin bng cc th trc quan nhm gip vic quan st, thng k d dng
hn. Ngoi ra, vic gim st phi a ra nhng cnh bo cho ngi qun tr h a
ra nhng hnh ng kp thi ph hp vi h thng.
Mt vn na ca gim st l tnh ton c lng thi gian dng ca mt ng
dng trn mt my. Mt my khi khi ng s c km theo nhng ng dng. Nhng
ng dng c th l min ph hoc bn quyn, v th phi gim st c thi gian s
dng ca ngi dng i vi nhng ng dng no yu cu bn quyn. Thi gian ny s
c dng cho vic tnh ton chi ph ca ngi dng.
1.2. Mc tiu
1.2.1. n
Gim st cc thng tin v CPU, RAM, bng thng, kh nng lu tr cho my
vt l v my o.
V cc th biu din hiu sut ca cc my.
Gim st cc ng dng chy trn my.
1.2.2. Lun vn
Nghin cu chc nng t ng gim st
Hon thin cc chc nng gim st xy dng
Tch hp h thng gim st vo h thng chung virtual lab.

n mn hc: Gim st ti nguyn

5

1.3. Trin khai
1.3.1. Giai on nghin cu
- Tm hiu v mc tiu ca ti.
- M t cc yu cu v chc nng cn c ca h thng
- Xy dng s giao tip gia cc thnh phn khc trong h thng vi h thng
gim st.
- Tm hiu v cc cng c gim st, la chn cng c ph hp.
1.3.2. Giai on trin khai
- Hin thc cc chc nng gim st chnh.
- Xy dng c s d liu lu tr.
- Hin thc cc hm ly d liu t h thng gim st
- Hin thc cc hm tng tc vi h thng gim st t ngoi.
1.3.3. Giai on hon thnh
- Xy dng trang web hin th thng tin.
- Vn hnh h thng gim st.
- Tch hp cc thnh phn vo h thng chnh.
- Kim th, nh gi hiu sut, ti u ha.














n mn hc: Gim st ti nguyn

6

Chng 2. Cng ngh

2.1. Tng quan
2.1.1. in ton m my
a. nh ngha

Hnh 2.1: M hnh in ton m my
in ton m my l mt thut ng cp n vic phn phi my tnh v kh
nng lu tr nh l mt dch v cho mt cng ng khng ng nht ca ngi
dng cui. Trong m hnh in ton ny mi kh nng lin quan n cng ngh
thng tin u c cung cp di dng dch v cho php ngi dng s dng cc
dch v cng ngh t cc nh cung cp m khng cn phi c cc kin thc v n
cng nh khng cn quan tm n cc c s h tng phc v cng ngh .




n mn hc: Gim st ti nguyn

7

b. Cc tnh cht chnh
Linh hot: cung cp dch v n cho ngi dng mt cch nhanh chng
Giao din lp trnh ng dng (API): in ton m my thng s dng cc
API da trn REST / RPC tng tc vi nhau trong h thng.
Gi c: c gim xung mt cch ng k, ch c chi ph vn hnh.
S c lp thit b v v tr: cho php ngi dng c th s dng cc trnh
duyt web truy cp n h thng t bt c ni no v bng bt c thit b g
ca chnh h.
o ha: k thut cho php servers v thit b lu tr c th c chia s vi
nhau qua lm tng hiu dng ca h thng.
M hnh multi-tenancy: cho php mt ti nguyn c th c cp pht ng
cho nhiu ngi dng khc nhau, cc ngi dng ny s lun phin s dng ti
nguyn chung ny.Nh vy khi mt ngi dng khng c nhu cu, ti nguyn
rnh s c h thng thu hi li v cp pht cho ngi dng khc c nhu cu
S tin cy: c ci thin bng cchm bo h thng vn hnh lin tc v
kh nng khi phc sau khi pht sinh li.
S m rng: c th c thc hin thng qua vic phn pht ti nguyn
mt cch t ng theo nhu cu ca ngi s dng.
Hiu sut: c gim st, cc kin trc c xy dng thng qua vic s
dng cc dch v web tng tc vi h thng.
S bo mt: c th tng ln do d liu c tp trung ha v s dng cc
knh lu tr bo mt. Tuy nhin, ng v pha ngi dng, v h khng tn tay
qun l d liu, nn c cm gic kh nng bo mt thp hn, nht l i vi
nhng d liu nhy cm.
S bo dng: ca cc ng dng in ton m my c th thc hin d
dng bi v chng khng cn c ci t trn my ca ngi dng v c th
c truy xut t nhiu ni khc nhau
n mn hc: Gim st ti nguyn

8


c. M hnh
Phn loi theo phm vi trin khai:
Hnh 2.2: Cc m hnh cloud theo phm vi trin khai
Cc m my cng cng (Public Cloud): cc ng dng, khng gian lu
tr, ti nguyn c xy dng cung cp mt cch rng ri thng qua
mt nha cung cp dch v. Nhng ng dng ny c th min ph hoc
tnh ph theo vic s dng.
Cc m my cng ng (Community Cloud): dng chung h tng gia
mt vi t chc t mt cng ng xc nh m trong vic qun l h
thng s do bn trong hoc mt bn th ba hoc do bn ngoi thc
hin.
Cc m my ring (Private Cloud): l mt h thng m my m phc
v cho mt t chc. N c th c qun l bi cc b phn bn trong
hoc bn ngoi hoc mt t chc th ba.
n mn hc: Gim st ti nguyn

9

Cc m my lai (Hybric Cloud): l mt h thng kt hp t hai hoc
nhiu m hnh trn li vi nhau to ra li ch ti a nht.
Phn loi theo dch v:


Hnh 2.3: Minh ha v cc dch v
Cc dch v c s h tng (IaaS):
Iaas l tng y ca m my. Cc ti nguyn c cung cp bao
gm: servers, mng, b nh, CPU, khng gian lu tr, cng c qun l.
Cc dch v y h tr c s h tng ng dng bt k c s h tng
ang c cung cp qua mt m my hay khng. N s dng o ha
to ra ch phn phi cc ngun ti nguyn theo yu cu iu ny m
bo tit kim c cc chi ph cho vic s dng ti nguyn v m bo
s co gin ca h thng theo nhu cu ca ng dng. Cn i vi ngi
dng Iaas th gi s dng s c tnh ton trn n v hiu dng c bn
thng thng l qua ti nguyn h s dng.
Cc dch v nn tng (PaaS):
Trong m hnh ny cc nh cung cp s phn phi cc nn tng km
theo cc tin ch thng thng nh h iu hnh, c s d liu, web
server, mi trng lp trnh v pht trin phn mm vo h thng. Thng
n mn hc: Gim st ti nguyn

10

qua nhng nn tng ny cc nh pht trin ng dng c th pht trin v
chy cc chng trnh ca h m khng quan tm n chi ph cho vic
mua v qun l cc lp phn cng, phn mm bn di.
M hnh ny c cc c trng sau:
Phc v cho vic pht trin, kim tra, trin khai, host, v bo
dng cc ng dng trong mt mi trng pht trin tch hp
Cung cp cho ngi dng cc cng c khi to thng qua giao
din web
S dng kin trc multi-tenant cho vic s dng ti nguyn
Tch hp dch v web vi c s d liu
H tr cho cc cng tc nhm pht trin
Cung cp cc tin ch khc nh lch s, tnh ph
Cc dch v phn mm (SaaS):
Trong m hnh ny cc nh cung cp s ci t cc phn mm ng
dng trn cloud v ngi dng c th truy cp cc phn mm ny t cc
m my client. Nhng ngi dng ny khng c php qun l h
tng v nn tng ca nhng ng dng ny. iu ny s gip ngi dng
tit kim khon tin mua h tng ng dng v cc chi ph lin quan trn
h tng . Cn nh cung cp s thu li t vic cung cp cc ng dng
ny cho khch hng.
Cloud Computing cung cp cc phn mm hot ng trn nn web,
c qun l bi nh cung cp v cho php ngi s dng truy cp t xa.
SaaS s cung cp giy php mt ng dng cho khch hng s dng
mt s dch v theo yu cu.
d. Li ch
Tit kim: h thng cung cp sn cc ti nguyn c s h tng cng ngh
mt cch nhanh chng v t tn km. Khch hng c th chn la nh
cung cp tt nht cho nhu cu v ti nguyn v gi c ca mnh.
Ti nguyn c s dng hiu qu theo ng nhu cu ca khch hng.
Cc dch v in ton m my c th c truy xut bt kz u, bt
kz lc no thng qua mng internet.
n mn hc: Gim st ti nguyn

11

Nh kh nng co gin m in ton m my cung cp, h thng ca
khch hng c kh nng m rng hoc thu nh mt cch linh hot ty
theo nhu cu c th.
p ng tt cho vic lu tr d liu.

e. Thch thc
Chi ph bn quyn phn mm ban u c th kh cao
Tnh sn sng vn cn cha c m bo.
An ton thng tin, mt tr ngi ca in ton m my. Cc thng tin
c lu tr tp trung nn dn n s mt ring t ca ngi dng.
Nguy c virus vn cn nguyn.
La o trc tuyn v cc l hng Web.

f. Opennebula
OpenNebula ra i nm 2008, c pht trin mnh m da vo cng
ng m ngun m. Cc phin bn v cc bn v ca h thng ny c cp
nht lin tc th hin s pht trin, kh nng p dng v m rng ca n.
Nhng tnh nng chnh ca OpenNebula l: Cung cp ni cha cc nh my o
(image), ni cha cc mu my o (template), mng my tnh o(virtual
network), c ch load nh t kho vi cc thng s nh ngha trong cc mu
my o c nh ngha trc vo mt my tnh vt l da trn b phn phi
ti nguyn vo mt my tnh vt l. Nhng khi nim cng nh nhng chun
c tch hp bn cnh nhng tnh nng c bn nh:
- Cm my tnh o (virtual cluster): cho php to cm cc my tnh o
nhm tng cng kh nng p dng in ton m my cho cc bi ton
tnh ton hiu nng cao (High Performance Computing).
- Kho cha d liu (data storage): cho php qun l d liu v cc nh o
mt cch chuyn bit trn nhng ngun cha khc nhau nh (SAN/NAS,
iSCSI/LVM, VMWare).
- S dng phn phi ti nguyn t b nh thi Haiza
- Chun tch hp OCCI (Open Cloud Computing Integration)
- Tng tc vi h thng Eucalyptus.
n mn hc: Gim st ti nguyn

12

- Ozone dng tch hp cc front end qun l OpenNebula vi nhau
thnh mt cm (zone).
- Tch hp LDAP vo OpenNebula.
- Cng c gim st ti nguyn Ganglia.
Qua khong thi gian tm hiu v nghin cu v h thng qun tr h tng
OpenNebula c th thy s pht trin khng ngng ca OpenNebula vi cc
tnh nng ph hp vi ti phng th nghim o (Virtual Laboratory). Bn
cnh , cng c ny c tch hp rt nhiu loi driver giao tip vi cc nn
tng phn cng sn c gm cc loi data storage khc nhau v cc cng c o
ha khc nhau nh KVM, Xen, VMWare. Trong giai on sp ti, b cng c
ny ha hn s p ng y nhu cu qun l h tng in ton m my.
2.1.2. o ha
a. nh ngha
o ha l mt cng ngh thit k to ra mt lp trung gian gia h thng
phn cng my tnh v phn mm chy trn n. Nh vy t mt my vt l
n l c th to thnh nhiu my o c lp. Mi my o u c th c
ngun h thng ring l, h iu hnh ring v ng dng ring.
My o l mt mi trng hot ng c lp tc l trong c cc phn
mm hot ng chung cng nhau nhng c lp vi h iu hnh my ch. V
d mt my o Java s chy cc chng trnh vit bng ngn ng Java, n
khng ph thuc vo h iu hnh ca my .
Vic p dng cng ngh o ha khi p dng vo in ton m my s
mang li nhiu li ch cho h thng. Trong li ch ln nht m chng ta c
th thy chnh l kh nng hp nht hng lot cc server dch v li vi nhau.
Thng thng th mi server ch s dng rt t ti nguyn trn h thng, ch
yu l CPU v b nh. iu s gy ra mt s lng ph v ti nguyn ca h
thng v cng s lm tng chi ph cho nhng th khng cn. V vy gii php
a ra l trin khai hng lot my o (mi my o tng ng chy 1 dch v)
trn mt server duy nht s gip nng cao hiu sut s dng h thng.
b. c im
Ti u ha cng sut ca phn cng
n mn hc: Gim st ti nguyn

13

Vic cc h thng dch v chy trn tng my ring l s gy ra mt s
lng ph v cng sut ca tng my. iu s lm tng thm chi ph hot
ng cho ton h thng. Gi y vi vic cc phn cng c ci tin v s ra
i ca cng ngh o ha s gip cho vic s dng ti nguyn phn cng thm
hiu qu. Khi mt ti nguyn phn cng khng c dng trn my o ny th
n s c cp pht cho my o khc. Qua s gip nng cao hiu sut ca
phn cng.
Gim s lng my vt l
Nh vic tch hp nhiu h thng dch v trn mt my vt l s lm gim
i rt nhiu s lng my vt l cho ton h thng cng vi l gim i lng
nng lng tiu th ca ton h thng. Qua s ct gim c cc chi ph cho
vic mua, qun l, bo dng phn cng vi cc chi ph v nng lng.
Ch ph qun l h thng ln
Mt h thng khi hot ng s i km theo vi nhiu tc v ph bin lin
quan n n (gim st, ci t, sa cha, bo tr, sao lu ). Nhng cng vic
ny i hi rt nhiu nhn lc thu nhng chuyn vin qun tr. o ha s
mang li c hi ct gim ng k chi ph qun l h thng. C nhiu tc v
trong mi trng o ha c th c ct gim( thc hin t hn) nh vic thay
th, gim st thit b phn cng.
c. Phn loi
C rt nhiu loi o ha: o ha my ch, o ha lu tr, o ha phn mm.
Nhng trong khun kh n ny chng ti ch xin tho lun v o ha my ch.
o ha h iu hnh (OS-level Virtualization)

n mn hc: Gim st ti nguyn

14


Hnh 2.4: o ha h iu hnh (OS-level Virtualization)

o ha h iu hnh l mt phng php trong nhn mt h iu hnh
cho php nhiu h iu hnh khc chy trn n. Nhng h iu hnh s cung
cp mt tp cc th vin cc ng dng tng tc, khin cho mi ng dng
c h tr cm thy nh ang chy trn mt my vt l. T gc nhn ca
ngi dng, cc h iu hnh ny ging nh nhng h iu hnh tht s.
Trong mi h iu hnh, cc ng dng ny ch tng tc vi ti nguyn trn
my mnh ch khng thy c nhng ti nguyn ca cc h iu hnh o
khc. N gip cho vic bo mt cng nh ng b ha.
Mt v d cho vic o ha h iu hnh m ta c th thy l t nhng
cng ty my ch Web. H s dng phng php ny khin mt trang ch
Web ch tin rng trang web mnh kim sot ton b my ch h thng. Tuy
nhin trn thc t mi trang web ch chia s cng mt my vi cc trang Web
khc.
u im ca o ha h iu hnh l cn rt t ti nguyn h thng. Ngoi ra
n cn tn rt t chi ph bi v mi chng trnh trong h iu hnh o th s
dng cc li gi h thng thng thng v khng cn phi ch th m
phng nh trong mt s phng php o ha khc. N cng khng cn h tr
phn cng c bit c th thc hin n.
n mn hc: Gim st ti nguyn

15

Nhng mt nhc im ln ca phng php ny l s gii hn trong vic
chn la h iu hnh, iu ny lm gim i s linh ng ca n. N khng
th cung cp mt h iu hnh o khc vi nhn ca h iu hnh ch v cc
h iu hnh o cng chy trn mt ti nguyn vi h iu hnh ch. V th
cn mt s thng nht trong phin bn ca c h iu hnh o.
Qua ta thy phng php o ha h iu hnh ch thch hp cho h
thng gm cc h iu hnh vi cu hnh thun nht.
o ha hon ton (FullVirtualization)
Hnh 2.5: o ha hon ton (Full Virtulization)
o ha hon ton l phng php dng phn mm (hypervisor) m
phng mt mi trng phn cng cc h iu hnh chy trn. Hypervisor l
mt lp phn mm nm ngay trn phn cng hoc bn di h iu hnh.
Mc ch chnh ca n l cung cp cc phn vng mi trng thc thi tch bit
trong cc my o cha cc h iu hnh khch c th chy. Mi phn vng
c cung cp tp hp cc ti nguyn phn cng ring ca n chng hn nh
b nh, CPU v thit b. Hypervisor c nhim v chuyn yu cu ti nguyn t
phn cng o ny sang cho phn cng vt l. N cng c trch nhim phi to
n mn hc: Gim st ti nguyn

16

v duy tr cu trc d liu cho cc thnh phn o v cp nht chng. Ngoi ra
n cn iu khin v phn knh truy cp n thnh phnphn cng.
Phng php o ha hon ton ny khng ch h tr nhiu h iu hnh
m cn h tr nhiu h iu hnh khc nhau. Nhng h iu hnh c th khc
nhau hon ton nh Windows vi Linux. Vic chy ng nhiu h iu hnh
ng thi s gip pht trin song song hoc th nghim phn mm nhiu
mi trng khc nhau.
Nhc im ca phng php ny l n nh hng n kh nng hot
ng ca h thng iu khin khin cc ng dng chy trn chm hn bnh
thng. V nhng tp lnh trn phn cng o phi c chuyn i thnh cc
tp lnh trn phn cng vt l{ (c thc thi bi hypervisor) s gy nn s
nh hng n tc thc thi ca lnh. Ngoi ra phng php o ha ny
cn b gii hn trong cc trnh iu khin thit b. Tc l phn mm o ha ch
cung cp mt s trnh iu khin thit b c nh v ngi s dng khng th
ci t thm cc trnh thit b mi. iu nay gy nh hng ti vic m rng
cc phn cng mi.
o ha lai (ParaVirtualization)
Hnh 2.6: o ha lai (ParaVirtualization)

n mn hc: Gim st ti nguyn

17

L phng php o ha m trong thay v m phng mi trng phn
cng hon chnh, phn mm o ha ch m phng mt phn v cung cp cc
dch v h iu hnh khch tng tc vi phn cng. Phng php ny
em li tc , v hiu qu s dng ti nguyn cao hn so vi o ha hon
ton. Nhng n li yu cu cc h iu hnh khch chy trn my o phi
chnh sa. iu ny dn ti vic khng phi bt c h iu hnh no cng c
th s dng phng php o ha lai ny. Mt v d cho phng php ny l XP
mode ca windows 7.
Phng php o ha lai ny c hai u im chnh. Th nht hiu sut s
dng h thng s c nng cao hn phng php m phng hon ton. V
n ch c mt lp m phng mng gia h iu hnh ch v phn cng vt l.
Lp ny ng vai tr iu phi qun l dng truy cp ca cc h iu hnh
khch pha trn trnh tnh trng cng s dng chung mt ti nguyn. u
im th hai ca phng php ny l n khng b gii hn bi trnh iu khin
thit b. V n s dng cc trnh iu khin thit b c trong h iu hnh ch
ch khng phi s dng nhng trnh iu khin c trong phn mm o ha.
Tuy nhin phng php ny cng c mt nhc im ln l h iu hnh
khch phi c tinh chnh c th tng tc vi cc dch v ca h iu
hnh ch. Do h iu hnh khch chy o ha khng phi l phin bn gc
ban u. iu cng c ngha l khng phi bt c h iu hnh no cng c
th s dng phng php o ha li ny.
d. KVM
KVM (Kernel-based Virtual Machine) c bit n nh gii php u tin v
cng ngh o ha hon ton (o ha phn cng) trong gii cng ng m ngun
m c nh du bi vic bin dch trong nhn Linux 2.6 nm 2007. Sau khong
thi gian di pht trin gii php ny dn cung cp kh nng mnh m trong vic
qun l v cung cp mi trng thc thi tng i n nh cho nhiu my o.
My o KVM c th c gi lp card ha, PCI, thit b u vo PS/2, card m
thanh, card mng Ethernet, Ram (50MB 32 TB), CPU 1-16 CPUs. Vi cc phin
bn hin thc khc nhau trn nn tng Linux, OpenSolaris v cho php chy cc
h iu hnh khch khc nhau nh h Linux, BSD, Solaris, Windows v MacOS X.
Nhm chng ti chn KVM lm mi trng o ha th nghim ph hp cho
cc my o trong qu trnh trin khai d n phng th nghim o v chi ph xy
n mn hc: Gim st ti nguyn

18

dng cc nh o l khng tht nhiu v cc phin bn h iu hnh khch khng
phi bin dch li nh vi gii php o ha lai trc y.
2.1.3. Gim st
a. nh ngha
Cng vi s pht trin mnh m ca h thng in ton m my, th vic
gim st h thng cng l mt phn rt quan trng i lin k. Mc tiu ca vic
gim st l c th bit c iu g xy ra trong h thng ti mi thi im, t
c th pht hin c cc vn v a ra hng gii quyt chng trong thi
gian ngn nht.
Gim st c th c nh ngha nh l vic theo di ti nguyn v thit b
trong h thng my tnh, cng nh h thng mng thu thp c cc thng tin
v cu hnh, mng, hiu sut t nhng ng dng tng tc trong h thng .
Hin nay c rt nhiu cng c gim st c pht trin, in hnh c th k ra
mt vi cng c ph bin sau:
Ganglia
Nagios
Zabbix
Cacti
Zenoss
...
b. C ch gim st
Poll

Hnh 2.7: C ch poll
n mn hc: Gim st ti nguyn

19

Nguyn tc hot ng: Trung tm gim st s thng xuyn hi thng tin
ca thit b gim st cp nht thng tin mi nht v thit b. Nu trung tm
hi th thit b tr li, khng hi th s khng tr li.
Alert

Hnh 2.8: C ch Alert
Nguyn tc hot ng: mi khi trong thit b xy ra s kin g th thit b
s t ng gi thng bo cho trung tm. Thit b ch gi thng tin mang tnh
s kin ch khng gi nhng thng tin thng xuyn thay i
nh gi
Vi mi c ch u c u nhc im ca n.
- Poll: chng ta c th ch ng ly thng tin cn thit i tng xung
quanh. Nhng nu c s thay i trong thit b th poll s cp nht chm v
phi ch n thi gian nh k ly thng tin
- Alert: khi c bt k s kin g th trung tm c th cp nht mt cch
nhanh nht. Nhng nu trong qu trnh c xy ra s c ng truyn g th
trung tm s khng th cp nht c trng thi ca thit b.
V vy trong vic gim st ngi ta thng dng c hai c ch ny c
b sung u nhc im cho nhau.
c. So snh cc cng c
Cc cng c gim st th rt a dng v mi cng c u c u khuyt im
ring, nn vic la chn s dng cng c no cng l mt vn cn phi c
trao i k cng. i vi d n ny chng ti ch quan tm n nhng cng c
min ph v m ngun m v chi ph v tnh linh hot ca n. Chng ti c a ra
cc so snh gia cc cng c trn v mt s mt quan trng ca vic gim st.
V kh nng gim st
n mn hc: Gim st ti nguyn

20

Ganglia: l cng c dnh cho h thng HPC v c overhead thp. N ch
yu l cn nhc v hiu sut l chnh. V s dng m hnh gim st theo cm.
Nagios: l mt cng c gim st ph bin nht trong cng ng m ngun
m. Hu ht mi chc nng u phi h tr thng qua cc plugin.
Cacti: l mt cng c gim st m c giao din tng tc ha p d cho
ngi s dng.
Zabbix, Zenoss: u l cng c m c kh nng gim st tt nh Nagios v
ha p nh Cacti. N c th trnh by cc thng s hiu sut thng qua
cc th trc quan.
V mc h tr
Ganglia: n ch yu ch thng bo hiu sut, khng c cc cnh bo v cc
trigger x l khi c thng s no vt ngng cho php. Ngoi ra n cng
khng h tr syslog ghi li cc cng vic bo co.
Nagios: C h thng cnh bo v trigger. N cng h tr syslog thng
qua cc plugin
Cacti: kh nng gim st cha c tt lm so vi kh nng giao din
Zabbix, Zenoss: u h tr tt v cnh bo v cc trigger x l. N cn c
kh nng auto-discovery tc kh nng t pht hin ra cc thit b mng m
c kt ni vo h thng.
V plugins
Ganglia, Cacti: c h tr plugin kh tt
Nagios: vi lng cng ng ng o nn s lng plugin cho Nagios l
rt ln. Nhng iu ny cng l tr ngi cho ngi s dng v kh la chn
plugin cho mnh. Ngoi ra v hu nh mi th trong Nagios u h tr qua
plugin nn s kh khn cho ngi s dng trong vic ci t, cu hnh ban u
Zabbix: do ra i sau nn lng plugin cha nhiu. Nhng hin gi cng
ng s dng zabbix cng ang tng ln nhiu.
Zenoss: mt im thun li cho n l c h tr nh dng xut ca plugin
Nagios nn t ta c th tn dng cc plugin ny. iu ny cng s gip cho
ngi dng d dng la chn thm nhiu plugin.


n mn hc: Gim st ti nguyn

21

Bng so snh tm tt gia cc cng c.
Name
Auto
Discovery
Agent SNMP Syslog Plugins
Triggers
/ Alerts
WebApp
Data Storage
Method
Ganglia Via gmond
check in
Yes
Via
plugin
No Yes No Viewing RRDtool

Nagios Via plugin Supported
Via
plugin
Via
plugin Yes Yes Yes Flat file, SQL

Cacti Via plugin No Yes Yes Yes Yes Full
Control
RRDtool, MySQL


Zabbix

Yes

Supported

Yes

Yes

Yes

Yes
Full
Control
Oracle, MySQL,
PostgreSQL,
IBM DB2, SQLite

Zenoss Yes No Yes Yes Yes Yes Full
Control
ZODB, MySQL,
RRDtool

d. Tng kt
Qua nhng so snh trn nhm chng ti quyt nh chn Zenoss lm cng c
gim st cho h thng hot ng. V Zenoss l mt phn mm m ngun m v c
phin bn min ph (Zenoss Core) cho ngi s dng. Cng c ny cung cp giao
din web h tr tng tc cho ngi qun tr. N cn c th a ra c cc
th trc quan v cc thng s gim st gip cho vic qun l{, nh gi h thng
thm d dng. Ngoi ra n s dng lng plugin ln ca Zenoss v Nagios v
nhiu chc nng gim st khc nhau. m bo nhng nhu cu gim st khc nhau
ca h thng.
2.2. Zenoss Core
2.2.1. Gii thiu
Zenoss l mt platform m ngun m, c s dng qun l h thng mng.
N cho php nh qun tr gim st h thng, qun l{ c trng thi, cu hnh, hiu
sut v hot ng ca cc thit b trong h thng thng qua giao din Web trc
quan. Zenoss c kh nng linh hot kh co nh c ch m rng thng qua Zenpack
Zenoss cung cp kh nng gim st bng nhiu phng thc: SNMP, SSH, WMI,
Telnet
n mn hc: Gim st ti nguyn

22

Lch s pht trin:
2002: Zenoss Core c bt u pht trin.
11/2006: Zenoss Core phin bn 1.0 c pht hnh
6/200 7: Zenoss Core phin bn 2.0 c pht hnh
7/2010: Zenoss Core phin bn 3.0 c pht hnh
9/2011: Zenoss Core phin bn 3.2 c pht hnh
2.2.2. Kin trc
Zenoss c chia lm 4 lp chnh:

Hnh 2.9: Kin trc Zenoss
a. User Layer
c xy dng xung quanh mi trng ng dng web Zope, n c tc dng
nh l mt portal Web. Lp ny s dng mt vi th vin ca JavaScript, Mochi
Kit, YUI, v extJS.
Bn c th truy xut v qun l cc chc nng thng qua giao din:
S dng Dashboard xem trng thi hin ti.
Lm vic vi cc thit b, mng v h thng.
Gim st v p ng cc s kin
Qun l user.
To v chy cc bo co
n mn hc: Gim st ti nguyn

23

Lp user s tng tc vi lp data v ly thng tin t trnh by ln giao
din ngi dng.
b. Data Layer
Thng tin cu hnh v thu thp c s c lu trong lp data, gm ba
database phn bit:
ZenRRD: s dng RRDtool, lu tr d liu hiu sut v time-series. V mi
RRD files c lu tr mt cch cc b cho mi collector nn s khng c hin
tng tht c chai khi mt collector mi c thm vo.
ZenModel: l mt mu cu hnh. N lu d liu thit b trong ZEO database.
ZenEvents: lu tr d liu v cc s kin trong MySQL database
c. Process Layer
Lp process ny qun l vic giao tip gia lp collection v lp data. N s
chy cc cng vic nh k hoc cc cng vic c user khi to (ZenActions v
ZenJobs).Ngoi ra trong lp ny cn c ZenHub lin kt thng tin gia lp d
liu v cc daemons
d. Collection Layer


Hnh 2.10: Collection Layer
n mn hc: Gim st ti nguyn

24

Gm cc dch v thu thp d liu cho lp data. Nhng dch v ny c cung
cp bi cc deamon m thc hin cc chc nng m hnh ha, gim st v qun l
s kin.
Chc nng m hnh ha s dng SNMP, SSH hoc WMI thu thp thng tin
t cc my con. Thng tin ny s c a vo modeler plugin v s c chun
ha theo cc nh dng ph hp vi d liu chnh.
Cn cc daemons gim st s ly thng tin v hiu sut v hiu dng ca c s
h tng. Thng tin hiu sut c lu trong RRD files. Thng tin v trng thi v
hiu dng c tr v h thng s kin thng qua ZenHub. Cc daemon ny c
th c chia lm 5 loi:
Automated Modeling Daemons
Zendisc: dng khm ph cc ti nguyn mang mi
Zenmodeler: dng m hnh ha cc thit b. S dng cc giao thc
SNMP, SSH giao tip vi cc thit b v ly ra c cc thng tin v h
iu hnh, h thng file, IP
Availability Modeling Daemons
Zenping: gim st tnh trng ping ca Zenoss.
Zenstatus: kim tra hot ng kt ni ca daemons t xa
Zenprocess: gim st ti nguyn my ch
Event Collection Daemons
Zensyslog: thu thp v phn loi s kin h thng
Zeneventlog: s dng WMI ly s kin
Zentrap: thu thp cc Traps
Performance monitoring Daemons
ZenperfSNMP: thu thp d liu thng qua SNMP.
ZenperfXMLrpc: c dng cho XML RPC collection.
Zencommand: ng nhp vo thit b (bng cch s dng telnet hay ssh) v
chy cc script thu thp d liu v hiu sut.
ZenPacks : thu thp d liu hiu sut b sung. V d nh ZenJMX thu thp
d liu t cc ng dng Java, HttpMonitor kim tra sn sng v p ng
ca cc trang web.
n mn hc: Gim st ti nguyn

25

Automated Response Daemons
Zenactions: c s dng cho cc cnh bo
2.2.3. Chc nng
a. Discovery
Chc nng d tm v nhn dng cc thit b trong h thng mng. N s
a ra danh sch thit b trong h thng cng nh cu hnh, nh tuyn ca
chng.
Sau khi hon tt qu trnh, vic cn li ca chng ta l sp xp cc thit b vo
cc device class thch hp gim st chng.
b. Availibility Monitoring
H thng gim st tnh sn sng dng kim tra hot ng ca c s h tng.
Zenoss khm ph ra bng nh tuyn ca cc thit b v s xy dng m hnh
mng t . Khng nhng vy Zenoss cn cho php ngi dng c th xc nh
s hot ng ca cc dch v web, mail, transfer file v nhiu dch v khc.
c. Performance Monitoring
Zenoss thu thp v lu tr v thng tin hiu sut cc thit b thng qua mt s
phng thc nh SNMP, WMI, cu lnh hoc API ca ng dng. Sau n s
phn tch d liu v a ra nhng bng bo co v th v nhng thng tin .
d. Event Manager
Zenoss nm bt c thng tin hiu sut v trng thi thit b thng qua cc
s kin (event). Nhng s kin ny s c lu vo c s d liu ca zenoss v s
c xa b sau 1 khong thi gian ty vo cu hnh phn mm. Bn c th thm
vo cc s kin ngoi cc s kin ca zenoss sinh ra.
e. Modeling
y l qu trnh gip zenoss hiu c mi trng n ang hot ng. N s
thu thp thng tin c bn v h iu hnh, phn cng, ca thit b. Vic m
hnh ha ny c th thng qua cc phng thc SNMP, SSH.
2.2.4. Cc thnh phn
a. Device Class
Mt phn loi cc thit b, mi lp ny c th c trng cho mt loi thit b,
hoc cho vi lp thit b khc.
H thng c sn mt s lp thit b:
n mn hc: Gim st ti nguyn

26

Discovered
KVM
Network: Router, Cisco, Firewall, RSM, Terminal Server, Switch)
Ping
Power: UPS, APC
Printer: InkJet, Laser
Server: Cmd, Darwin, Linux, Remote, Scan, Solaris, Windows
Khi bn c mt thit b mi bn s thm vo lp thit b tng thch vi n
thc hin vic gim st ph hp.
Ngoi ra bn c th to ring lp mi t vic k tha cc lp trn. Nh trong
bi ny chng ti to ra mt lp mi l Server/Virtual Host Machine/KVM cho
nhng my KVM c gim st qua ssh.
b. Modeler Plugin
C nhim v truy vn cc thit b ly ln cc thng tin cn thit v lu vo
database. Thng thng mi modeler plugin s lm mt nhim v ring l ly
thng tin cu hnh v OS hoc file system, routes, process, IP, CPU, memory V
th thng vi mt lp thit b th s c nhiu modeler plugin tng ng ly
d liu thch hp.
Chng ta c th to thm cc modeler Plugin cn thit ly thng tin ph
hp vi mc ch.
Nh hnh di ta thy trong mt lp thit b /Server/Cmd th s c kh nhiu
modeler Plugin. Chng ta s chn s dng modeler Plugin no cho ph hp.

n mn hc: Gim st ti nguyn

27


Hnh 2.11: Chc nng Modeler Plugin
c. Monitoring Template


Hnh 2.12: Chc nng Monitoring Template
n mn hc: Gim st ti nguyn

28

y l mu nh dng v thng tin thu thp ca thit b. Mi monitoring
template s gm nhiu data source. Mi data source ng vi mi cu lnh c
chy thu thp thng tin. Trong data source s c nhiu data point, l nhng
kt qu tr v ca cu lnh trn sau khi c dch qua bi b dch (parser) ca
zenoss. B dch c 3 loi chnh l nagios, cacti, uptime.
Trong monitoring template ny chng ta cng c th nh ngha cc cnh bo
cng nh cc th. Vi cnh bo chng ta c th qui nh mc cnh bo
(warning) hay bo ng (critical). Cn i vi cc graph chng ta s chn nhng
datapoint no s c v. V mi data point s cha d liu ca tr v sau khi
chy cu lnh ca data source.
d. Collector


Hnh 2.13: Collector

Cha cc thng tin v b thu thp d liu ca my ch. Nhng thng tin ny
gm nhng thng tin v thi gian, v thng tin cu hnh Round Robin Database
Chng ta c th chnh sa thng tin chu k ly d liu, chu k ping, cu hnh RRD ..
sao cho thch hp.
n mn hc: Gim st ti nguyn

29

2.2.5. Zenpack
a. Gii thiu
Zenpack l gi phn mm ca zenoss, n m rng v chnh sa h thng c
th thm vo cc chc nng mi. V d chng ta c th thm vo lp thit b
(device classs), mu gim st (monitoring templates) hoc c th phc tp hn l
m rng m hnh d liu (data model) v cung cp collection daemon mi.
Nhng vn Zenpack c th thm vo:
Mu gim st (monitoring templates)
Ti nguyn d liu (data sources)
th (graphs)
Lp s kin (event classes)
S kin v lnh ngi dng (event and user commands)
Bo co (reports)
M rng m hnh (model extensions)
nh ngha sn phm (product definitions)
MtZenpack ca h thng ny c th c ci t cho mt h thng zenoss
khc. N nh mt plugin cho zenoss.
c mt zenpack bn c th ti t nh cung cp, t cng ng v ri ci t
hoc t tay vit mi.
b. Cch thc hot ng

Hnh 2.14: S hot ng Zenpack
C hai loi thng tin m zenpack thu thp l thng tin v cu hnh
(configuration data) v thng tin v hiu sut (performance data).
My ch
Zenoss
My cn
gim st
Kt ni

Tr v d liu
SMNP
Command
RRD
ZODB
MySQL
n mn hc: Gim st ti nguyn

30

Thng tin cu hnh c thu thp bi zenmodeler bng cch s dng cc
modeler plugin hay collector plugins v mc nh thu thp sau 12 gi/ 1 ln
(chng ta c th chnh thi gian ny cho thch hp). Thng tin ny s c lu
trong ZODB
Thng tin v hiu sut th c thu thp bi cc monitoring template v c
mi 5 pht /1 ln. Thng tin s c lu trong RRD.
Ngoi ra cn c d liu cc s kin (event data) s c lu trong MySQL.
c. To mt Zenpack
C nhiu l{ do bn to mi mt zenpack cho ring mnh, nh bn mun
thc hin mt chc nng gim st mi m cng ng cha h tr, hoc bn ch
mun chn mt s thit lp ph hp vi yu cu ca bn. Ngoi ra nu ci t
Zenpack t cng ng th khi chnh sa bn khng c quyn ng gi n s
dng cho h thng khc.
Khi to mt Zenpack th u tin ta cn lu { n cch t tn.Tn mt
zenpack s gm ba phn ring bit
V d: Zenpacks.cloudBK.libvirt, Zenpack.cloudBK.MonitoringHost
Phn 1: Mc nh l Zenpacks.
Phn 2: Tn hoc t chc ca tc gi (community: thng l ca Zenoss
pht trin).
Phn 3: Chc nng ca Zenpack .
Sau khi to xong, bn c th chnh sa thng tin version, tc gi.Zenpack c
to s nm trong th mc $ZENHOME/Zenpacks.
2.3. Th vin h tr
2.3.1. Zenplugins
a. nh ngha
Zenoss Plugins (Zenplugins) bao gm mt b su tp cc th vin c th vit
bng ngn ng python m c s dng thu thp cc thng tin hiu sut trn
mt my tnh. Ta c th s dng SSH thc hin cu lnh thu thp tin tc mt
cch an ton m khng cn yu cu thit b phi ci t SNMP.
Vic s dng zenplugin s gip chng ta d dng thu thp c nhng thng
tin hiu sut hn. Ngoi ra output ca cc cu lnh zenplugin c Zenoss h tr
nn vic phn tch ra d liu s khng gp nhiu kh khn vi ngi pht trin.
n mn hc: Gim st ti nguyn

31

b. S dng
nh dng mt cu lnh:
$zenplugin.py functionName [params]
- zenplugin.py l tip u ng bt buc.
- functionName l tn hm mun s dng (cpu, disk, mem)
- params : cc parameter nu hm c yu cu.
nh dng output ca cu lnh:
DISK OK;|availBlocks=14251580 usedBlocks=63512052 totalBlocks=78019632
- D liu xut u tin l thng bo trng thi thc hin ca cu lnh c
ngn cch vi phn sau qua ;|
- Tip theo l cc d liu xut ca cu lnh c ngn cch vi nhau bng
khong trng, mi d liu gm tn ca d liu v gi tr ca d liu
2.3.2. NagiosPlugins
a. nh ngha
Bi v cng ng s dng cng c Nagios l rt ln, nn vic c th tha kt cc
plugins ca Nagios th s gip cho Zenoss nng cao c cc chc nng ca mnh.
Nagios plugins l tp hp th vin theo chun GNU m thu thp cc thng tin
v cu hnh cng nh hiu sut ca my tnh. V pht trin theo chun GNU nn
bt k h iu hnh m c h tr bi GNU u c th chy c.
b. nh dng output ca Nagios
$functionName -w value - c value [params]
Cc cu lnh ca Nagios hu nh u yu cu ch ra mc cnh bo(-w) v mc
bo ng(-c)cho cc kt qu tr v
Output ca cu lnh Nagios s gm cc thnh phn: m tr v, cc d liu.
M tr v:
Gi tr Trng thi M t
0 OK Plugin thc hin thnh cng v cc gi tr tr v khng
vt ngng
1 Warning Plugin thc hin thnh cng nhng gi tr tr v vt mc
cnh bo
n mn hc: Gim st ti nguyn

32

Gi tr Trng thi M t
2 Critical Plugin pht hin hoc cc dch v khng chy hoc c gi
tr vt mc bo ng
3 Unknown Cc tham s truyn vo khng hp l

D liu tr v: s c ngn cch nhau bi k hiu ; v s gm
Tn=gitr;[gitr_cnhbo];[gitr_bong];[gitr_min];[gitr_max]
2.3.3. Libvirt
a. nh ngha
Hin nay c rt nhiu phng thc o ha xut hin, mi phng thc u c
nhng im mnh yu ring. V vy d dng cho cch lp trnh vin c th pht
trin cc ng dng c lp trn cc nn o ha khc nhau, Libvirt l mt th vin
cung cp kh nng tng tc vi cc phng thc o ha khc nhau nh: Xen,
KVM, VMWare Libvirt cung cp cc API cho php truy xut, to, chnh sa, qun
l, gim st cc thnh phn trong mi trng o ha.
Bng bn di l mt s khi nim m ta s gp trong qu trnh lm vic vi
th vin Libvirt cng nh trong mi trng o ha:
Khi nim M t
Domain Mt th hin ca h iu hnh (hoc mt phn) chy trn my o c
cung cp bi hypervisor.
Hypervisor Mt lp phn mm o ha chy trn mt my vt l. cho php cc my
o c kin trc khc vi node c th hot ng trn node c.
Node My vt l
Storage
Pool
Mt tp hp ca thnh phn lu tr c chia thnh nhng phn nh
hn gi l volume, sau c cp pht cho cc domain.
Volume Mt khng gian lu tr, c cp pht t Storage pool, v cp pht
cho Domain. C th coi nh mt cng o ca domain.
n mn hc: Gim st ti nguyn

33


b. Kin trc
Object Model
Libvirt API c th chia thnh cc lp chnh sau:
- Hypervisor connections: y l i tng chnh trong libvirt API. Tt c
cc chng trnh lm vic vi libvirt u phi bt u bng vic to kt ni
ti hypervisor. Mt node c th cung cp ng thi nhiu loi hypervisor
khc nhau nh KVM v VMWare chng hn. Nhng ti mt thi im ch c
ti a mt kt ni c to ra. Sau khi kt ni c thit lp, ta c th d
dng tng tc vi cc i tng khc thng qua cc hm c cung cp.
- Guest domains: C hai loi domain chnh c nh ngha trong libvirt l
cc my o ang chy ( trng thi l running) v cc my o tuy hin ti
khng c chy nhng c nh ngha sn trong file cu hnh. Mi
domain c xc nh bng tn, ID hoc UUID, trong tn v ID ca mt
my o l duy nht trn host m n ang chy, cn UUID l mt s 16 bytes
xc nh mt my o trn ton b h thng (tt c cc host)
- Virtual networks: virtual network cung cp cc phng thc kt ni cc
my o trn cng mt node. Virtual network cng c xc nh bng tn
v UUID.
- Storage pools v Storage volumes.
- Host device (node): cha cc thng tin vt l{. Libvirt khng nh ngha
mt lp ring cho host nh cc thnh phn pha trn. Cc phng thc
tng tc vi host u c gi thng qua lp Connection.

n mn hc: Gim st ti nguyn

34



















Hnh 2.15: Cc module trong Libvirt

Driver model
Hnh bn di th hin cch thc mt ng dng tng tc vi th vin
Libvirt. Ban u, ng dng s yu cu to mt kt ni n vi hypervisor, hay
cn c gi l driver. Thng qua URI m ng dng yu cu, libvirt xc nh
c hypervisor v to ra kt ni. Sau khi to kt ni thnh cng, ng dng
s tng tc vi hypervisor thng qua cc public API m libvirt h tr.
Mi driver c mt nh danh ring, nh lit k bng bn di:
n mn hc: Gim st ti nguyn

35

Hnh 2.16: Cc driver trong libvirt
Driver M t
Qemu For managing qemu and KVM guests
Xen For managing old-style (Xen 3.1 and older) Xen guests
Xenapi For managing new-style Xen guests
Uml For for managing UML guests
Vbox For managing VirtualBox guests
openvz For managing OpenVZ containers
Esx For managing VMware ESX guests

n mn hc: Gim st ti nguyn

36

URI formats
Libvirt s dng URIs (Uniform Resource Identifiers) xc nh mt kt ni
n hypervisor. C local v remote hypervisors u c xc nh thng qua
URIs. Mi connection URI c th c coi nh mt a ch URL trn h thng
World Wide Web. Mi mt hypervisor trn mt my c mt connection URI
xc nh v tr node trn mng v kiu o ha trn node
- Local URIs: c dng tng qut sau
driver:///system
driver:///session
driver+unix:///system
driver+unix:///session
- Remote URIs: c dng tng qut
driver[+transport]://[username@][hostname][:port]/[path][?extraparameters]
M t cc thnh phn
Thnh
phn
M t
driver Tn ca libvirt hypervisor driver mun kt ni.
transport Phng thc kt ni n host. Libvirt cung cp cc giao thc: tls, tcp,
unix, ssh, ext
username Khi s dng ssh kt ni th cn cung cp thm tn user ng nhp
hostname a ch host ca remote machine
path Hypervisor driver's local URIs. Vi Xen, thng l /, trong khi
QEMU l /system.


n mn hc: Gim st ti nguyn

37

2.4. RRD
2.4.1. c im
RRD(Round-Robin Database) l loi c s d liu ra i nhm mc ch thao tc
trn nhng d liu bin i theo chu kz thi gian nh bng thng mng, nhit , mc
ti ca b x l, ...
Cc d liu s c mc ti a s lng gi tr. Khi t n ngng ny, cc gi tr
mi s thay cho nhng gi tr c nht theo vng (circular buffer). Do lng d liu
sau s l mt hng s khi t n s dng d liu cho php. Cc d liu RRD c
u c x l{ nh nhng gi tr o trong nhng chu kz. Nhng gi tr trong mt
khong thi gian di s c tnh ton li tr thnh gi tr duy nht i din. Gi tr i
din cho mt chu kz c gi l gi tr n (primary data point - PDP). V nhiu PDP s
c dng tnh ton cho gi tr hp nht (consolidate data point - CDP).
D liu lu d theo bn hm chc nng:
Max: gi tr ln nht trong s cc PDP c lu gi
Min: gi tr nh nht trong s cc PDP c lu gi
Average: gi tr trung bnh trong s cc PDP c lu gi
Last: gi tr sau cng trong s cc PDP c lu gi

Six short intervals Two large intervals
Minimum (0,3,0,1,2,3)->0 (1,2)->1
Average (0,3,0,1,2,3)->1.5 (1,2)->1.5
Maximum (0,3,0,1,2,3)->3 (1,2)->2
Hnh 2.17: th c gi tr CDP to t 6 PDP v CDP to t 2 PDP
C nm loi d liu thng c s dng trong RRD:
Gauge: l kiu d liu rt ph bin nh nhit , thng k s lng
n mn hc: Gim st ti nguyn

38

Counter: c s dng cho nhng kiu d liu tng lin tc v khng bao
gi gim ngoi tr lc b qu ti nh o tng lu lng bng thng ra vo.
Derive: tng t nh kiu Gauge
Absolute: b m s tnh t thi im cui cng d liu c c. V d:
m s dng ca mt thng ip k t ln cp nht trc .
Compute: d liu thu thp c s c tnh ton li theo mt cng thc.
2.4.2. RRD trong b cng c RRDtool
a. nh ngha mt ngun d liu
DS:ds-name:GAUGE | COUNTER | DERIVE | ABSOLUTE:heartbeat:min:max
DS:ds-name:COMPUTE:rpn-expression
Min Max: khong gi tr cho php ca d liu. Ngoi gi tr ti thiu hoc
ti a mt d liu s tr thnh khng xc nh Unknown
Heartbeat : thng s quy nh thi gian cho php tnh ton d liu nu
qu khong thi gian ny gi tr s l Unknown.
Rpn-expression: nh ngha cng thc tnh ton cho loi d liu Compute
b. nh ngha cc thuc tnh dng d liu
RRA:AVERAGE | MIN | MAX | LAST:xff:steps:rows
Xff: t s cho php gia s lng Unknown PDP trn tng s PDP khi tnh
ton gi tr CDP.
Steps: S lng PDP dng to nn gi tr CDP
Rows: s lng dng d liu ti a. Khi t n s dng ny d liu mi s
thay th nhng dng d liu c nht.
V d: Vi chu kz 300s (5ph = 1/12h)
RRA:AVERAGE:0.5:1:600:
1 gi tr CDP c to t 1 PDP
S dng d liu ti a l 600 dng: 600 * 1/12h = 50h
D liu s lu trong 50h. Sau gi tr mi s thay cho gi tr c nht
RRA:AVERAGE:0.5:6:600:
1 gi tr CDP s c tnh trung bnh t 6 PDP
S dng d liu ti a l 600 dng: 600 * 6 * 1/12h = 300h
D liu s lu trong khong 300h. Sau gi tr mi s thay cho gi tr c nht
n mn hc: Gim st ti nguyn

39

Chng 3. Gii php

3.1. M hnh chung


Hnh 3.1: M hnh cc lp h thng Virtual Lab

M hnh cc lp h thng trn cho ta thy cc thnh phn ca h thng. Vic phn ra
cc lp ny gip ngi pht trin c th tch bit r rng vai tr v chc nng ca tng
thnh phn.

n mn hc: Gim st ti nguyn

40


Hnh 3.2: M hnh tng tc trongh thng Virtual Lab
Mi thnh phn u c nhng nhim v ring nhng n cng cn phi tng tc vi
cc thnh phn khc. Da trn s chung ny ta c th thy s giao tip gia cc
thnh phn trong trong h thng.


Hnh 3.3: M hnh thnh phn gim st

Trn y l s ca h thng gim st chng ti. H thng gim st chnh s tng
tc vi h thng Virtual Lab bng cc phng thc gi hm t xa. Bt k yu cu g t
n mn hc: Gim st ti nguyn

41

pha Virtual Lab nh yu cu gim st my vt l hay my o, ly thng tin gim st
u c chuyn thnh cc li gi hm truyn ti h thng chnh. Ngoi ra h thng
gim st cn phi tng tc vi cng c gim st Zenoss. N s c nhng yu cu nh
thm, xa thit b, ly d liu t Zenoss thng qua cc Json/Rest API ca Zenoss. Nhng
d liu ly c ny s c lu tr xung cc c s d liu ca chng ti.
i vi Zenoss th nhim v n s gim st cc thit b trong h thng. Vi mi thit
b cn phi ci t mt s plugin ln n gip Zenoss thu thp c cc thng tin.
Nhng plugin ny s gip chng ta c th ly c cc thng tin cu hnh thit b v
thng tin ti nguyn thit b. Nh nhng plugin ny m Zenoss c th dng phng
thc SSH/SNMP c th giao tip v tng tc vi cc thit b.
Nhim v thc hin cc chc nng chnh trong Zenoss s c giao cho ba thnh
phn l Device Class, Modeler Plugins, Monitoring Template nh ni phn Zenoss.
C th Device Class c nhim v to ra thnh phn Component mi i vi nhng thit
b nm trong lp thit b ny. Modeler Plugins s ly cc thng tin v cu hnh gm h
iu hnh, h thng file, cc my o trn my vt l{ Cn Monitoring Template s c
nhim v ly thng tin v ti nguyn thit b gm CPU, RAM, bng thng, kch thc
vng nh, s lng ngi dng login, kim tra mt ng dng ang chy hay khng
3.2. Giao tip
Vi m hnh c nu trn, th nhm chng ti s c giao tip vi hai nhm chnh
l nhm qun l ti nguyn (resource management) v nhm tnh ph (pricing)
3.2.1. Vi nhm qun l ti nguyn
Chng ti s cung cp cc thng tin v cu hnh, hiu sut ca my vt l{ cng nh
my o cho nhm qun l{ ti nguyn nhm ny c th dng nhng thng tin ny
cho vic lp lch, cng nh a ra nhng quyt nh qun l. Nhng thng tin gim st
c s c trnh by ln cho ngi dng nu h c yu cu. Ngoi ra nhng thng
tin ny cn c lu tr li c th s dng cho sau ny. Mt vn trong giao tip
gia hai nhm l vi mi thit b mun c gim st th phi c yu cu thm n vo
trong danh sch gim st ca Zenoss. V vy khi c mt thit b mi n th pha qun l
ti nguyn phi thc hin hnh ng thm thit b vo Zenoss. Tng t vy vi xa
thit b ra khi khng cn dng na.
n mn hc: Gim st ti nguyn

42


Hnh 3.4: M hnh giao tip vi chc nng qun l ti nguyn
3.2.2. Vi nhm tnh ph
Chng ti s cung cp thng tin gim st cc phn mm, cc ng dng chy trn
my o gip nhm tnh ph c th tnh ton c chi ph ca ngi dng. Cc thng
tin v thi gian s dng ca ngi dng, ca ng dng. Nhng d liu ny s c
trch xut u n t Zenoss v lu tr xung c s d liu ring. Nhm tnh ph c th
tng tc vi c s d liu ny.



Hnh 3.5: M hnh giao tip vi chc nng tnh ph

JSON/Rest API
Delete
VM,Host
JSON/Rest API
Modify VM
- Host
Add
VM,Host
Resource
System
Get data
VM,Host
Zenoss
Rest API RRD values
JSON API ZODB data
My SQL
n mn hc: Gim st ti nguyn

43


3.3. Phng php hin thc
Dng Zenoss c th ly cc thng tin v cu hnh thit b, v v hiu sut ca
thit b cn gim st.
Dng cc API cung cp bi Zenoss ly thng tin t cc c s d liu ca n v
lu nhng thng tin ny xung mt c s d liu ring tin cho vic gim st v
s dng.
Cc bng trong c s d liu c xy dng sao cho ph hp vi mc ch gim
st v cc yu cu t cc h thng xung quanh. N gm ba bng chnh v thng tin
gim st my vt l, my o v ng dng chy trn my. Ngoi ra cn c mt s bng
ph tr khc.
Bng thng tin cho my vt l:
device hostname cores CPU totalRAM freeRAM usedDisk freeDisk revBw transBw Time Stat
Bng ny s cha cc thng tin ly c t cc my vt l gm thng tin s core,
hiu sut CPU ang dng, lng RAM ang dng, dung lng s dng, v thng tin
v bng thng, v trng thi thit b. Ti cc thi im thch hp thng tin ny s
c ly v ghi vo bng d liu.
Bng thng tin cho my o
Device User Hostname Cores CPU
Total
RAM
Free
RAM
Used
Disk
Free
Disk
Rev
Bw
Trans
Bw
Home
Dir
Num
Login
Time Stat
Tng t nh thng tin my vt l{ nhng i vi my o cn c thng tin v dung
lng home directory v s lng ngi dng ang login vo my.

Bng thng tin cho ng dng
Device User Hostname Process Time Instances
Thng tin cho ng dng bao gm ng dng tn g v ang s dng trn thit b
no, ngi dng no, hin gi c ang chy khng.


n mn hc: Gim st ti nguyn

44


Chng 4. Hin thc

4.1. Hin thc Zenpack dng ssh ly thng tin thit b
4.1.1. Cu trc Zenpack hin thc
Nh cp trn, mt trong nhng im to nn sc mnh ca Zenoss
chnh l kh nng m rng. Phn ny ta s tin hnh vit 1 Zenpack c chc nng
gim st cc thnh phn ca 1 h thng cloud.
H thng cloud c test y l mt h thng gm cc my vt l kt ni vi
nhau. Trong c mt my ng vai tr Front-end, s dng OpenNebula qun l
c h thng. My Front-end cng ng thi l Zenoss server. Cc my cn li ng
vai tr lm host, ci t libvirt. My o s c to v chy trn cc host ny.
C hai loi ti nguyn c gim st. Cc ti nguyn vt l v cc ti nguyn o.
Ti nguyn vt l bao gm: ca host. Cc ti nguyn ny s gim st bng cch
k tha li template ca Zenoss Core. y l 1 template hon chnh gim st cc
ti nguyn ca mt my vt l thng qua SSH.
Ti nguyn o: ta s vit mt ZenPack m nhim vai tr ny. tng chnh ca
ZenPack ny l s kt ni vi my o thng qua 1 SSH. Sau s chy 1 plugin ly
cc thng tin, a cho ZenModeler /ZenCommand.
4.1.2. Deloy v demo
u tin chng ti s ci t zenpack vit (coi nh ang l mt h thng mi
hon ton cha c zenpack)
n mn hc: Gim st ti nguyn

45


Hnh 4.1: Ci t Zenpack
Bn s vo tag Zenpacks v chn Install Zenpack, sau chn ng dn ti
file ci t Zenpacks.Zenoss.Cloud.KvmMonitoring-py2.6.egg
Sau khi ci t thnh cng, trong device classes s xut hin mt lp thit b
mi l Server/Virtual Machine Host/KVM.
n mn hc: Gim st ti nguyn

46



Hnh 4.2: Class Virtual Machine Host/KVM c sinh ra
y l lp thit b mi do chng ti nh ngha gim st cc thit b o ha
bng KVM.
Sau chng ta s thm thit b cn gim st vo lp tng ng. Chng ti
thm thit b c IP 127.0.0.12 vo lp Server/Virtual Machine Host/ KVM. Nh vy
c ngha l thit b ny s c thc hin nhng tc v gim st tng ng trong
lp KVM m chng ti nh ngha.
Tip theo cu hnh li ci thuc tnh cho ph hp vi vic gim st ( trong tab
Configuration Properties)
Ta cn ch sa nhng thuc tnh sau:
- zCommandUsername: tn ca my cn gim st.
- zCommandPassword: mt khu my trn
n mn hc: Gim st ti nguyn

47


Hnh 4.3: Cp nht thng s cu hnh device
Hai thuc tnh ny s gip zenpack c th giao tip c vi thit b trn thng
qua giao thc ssh (thuc tch zCommandProtocol)
Bi v chng ti s dng libvirt nn cng phi chnh sa nhng thuc tnh libvirt
ph hp

La chn Modeler Plugin: thng th c theo mc nh sn c. Nhng nu bn
c hiu bit th c th chn la mt cch ph hp.

Hnh 4.4: Cc Modeler Plugins trong Zenoss
Sau khi xong phn cu hnh thit b, chng ta s chn Model Device zenpack
thc hin gim st thit b. Cn nu chnh sa thuc tnh g ca thit b th
chng ta nn thc hin Push Changes cp nht s thay i.
n mn hc: Gim st ti nguyn

48



Hnh 4.5: Model thit b
Thng bo v vic gim st zenpack s c hin ln. Nu c li trong qu trnh
chy th n s c thng bo ti y. Chng ta c th thy chnh sa cho ph
hp.

n mn hc: Gim st ti nguyn

49


Hnh 4.6: Kt qu model thit b
Kt qu gim st


Hnh 4.7: Cc component mi sinh ra: IP Services, Virtual Machines .
n mn hc: Gim st ti nguyn

50


Hnh 4.8: th kt qu gim st trong Zenoss
Chng ti c c thng tin v h iu hnh (linux2.6.32-35), memory/swap
(3.8GB/1.9GM).
Chng ta c th xem qua th v hiu sut ca my vi cc th v
processes, hiu dng CPU, hiu dng ca memory Cch ly im nhng
th c chng ti nh ngha trong monitoring template.
Ngoi ra phn nhim v quan trng ca zenpack ny l ly c thng tin ca cc
my o.

n mn hc: Gim st ti nguyn

51


Hnh 4.9: 2 my o c pht hin.
Mt my o s c c ly nhng thng s v tn, RAM, h iu hnh, v trng
thi hot ng. Nh kt qu chng ti thu c l hin gi c hai my o ang
hot ng tn l one-4 v one-6. y ch l nhng thng tin c bn chng ti ly.
4.2. Cc plugin s dng trong Monitor template
4.2.1. Plugin mc nh ca Zenoss
L cc plugin c ci t km theo h thng cung cp kh nng truy xut thng
tin theo c ch SNMP. Nhng plugin ny cung cp nhng kh nng c bn xc nh
hiu sut CPU, memory, disk, network service, process.
4.2.2. Plugin m rng ca Zenoss
L cc plugin c cng ng Zenoss b sung m rng vo cc plugin c bn
s dng theo c ch SSH s dng ngn ng Python. s dng cc plugin ny, i
hi cc thit b c gim st phi ci t b plugin ny v phi bit c public-key
ca my cha h thng gim st. C ch ny hot ng da trn nh dng d liu
theo chun Nagios c tnh linh ng khi ngi dng c th t pht trin cc plugin
ca ring mnh.
Kim tra dung lng a:
Cu lnh:/usr/local/bin/zenplugin.py disk /
Kt qu:DISK OK;|totalInodes=2629632 availInodes=2353805
totalBlocks=41902456 availBlocks=9851012
usedInodes=275827 usedBlocks=29951836
Kim tra hiu sut Memory:
Cu lnh:/usr/local/bin/zenplugin.py mem
n mn hc: Gim st ti nguyn

52

Kt qu:MEM OK;|hrSwapSize=3087003648 hrMemorySize=6049849344
pageSize=4096 memBuffer=108822528 memAvailReal=3961241600
memAvailSwap=3087003648 memCached=461561856
Kim tra hiu sut CPU:
Cu lnh:/usr/local/bin/zenplugin.py cpu
Kt qu:CPU OK;|ssCpuRawInterrupt=0 laLoadInt1=1.19 ssRawContexts=705828
laLoadInt5=0.99 ssCpuRawNice=303 ssCpuRawKernel=4195
ssCpuRawSystem=4195 ssCpuRawWait=18757
laLoadInt15=0.73 ssRawInterrupts=479510
ssCpuRawIdle=606324 ssCpuRawUser=13046
4.2.3. Plugin t cng ng Nagios
L cc plugin c pht trin do cng ng Nagios cung cp nhm b sung v m
rng cc chc nng vn c ca h thng. Cc plugin c vit trn ngn ng bash
shell script, Perl, Python, C, C++. Da vo cng ng m ngun m rt ln ca Nagios
cc plugin c nh gi, xem xt s dng v chnh sa p ng cc nhu cu gim st
nng cao trn cc h thng c th khc nhau.
Kim tra s ngi dng ng nhp vo my:
Cu lnh: /usr/local/nagios/libexec/check_users -w 3 -c 3
Kt qu: USERS OK - 1 users currently logged in |users=1;3;3;0
Kim dung lng mt th mc:
Cu lnh: /usr/local/nagios/libexec/check_dirsize.sh -d
${here/cDevName} -w 10000000 -c 10000000 f
Kt qu:3358588 KB - ok|size=3358588KB;10000000;10000000
Kim tra bng thng ca mt interface:
Cu lnh: /usr/local/nagios/libexec/check_ifutil.pl -i eth0 -w 100M -c 100M
Kt qu: RX Bytes: 0B, TX Bytes: 0B; RX Speed: 0Bps, TX Speed: 0Bps;
OK bandwidth utilization| rx=0;104857600;104857600
tx=0;104857600;104857600 rxs=0;; txs=0;;
Kim tra hiu sut CPU:
Cu lnh: /usr/local/nagios/libexec/check_linux_procstat.pl -f
Kt qu: OK - 4 CPU cores - CPU(all) 5.0% used, CPU0 12.0% used,
n mn hc: Gim st ti nguyn

53

CPU1 3.0% used, CPU2 4.0% used, CPU3 3.0% used
| CPUs=4;;CPUusage=5.0%;;

Kim tra s tin trnh ca mt chng trnh SSH:
Cu lnh: /usr/local/nagios/libexec/check_procs -a ssh
Kt qu: PROCS OK: 8 processes with args 'ssh'|procs=8;;

4.3. Hin thc module gim st trong Virtual Lab
Module gim st c xy dng bng ngn ng Java nhm tng tc vi Zenoss
truy xut d liu v iu khin cc tin trnh gim st trong h thng Zenoss. Module s
dng h c s d liu Mysql lu tr nhng thng tin ly c t Zenoss nhm cung
cp cho cc module qun l ti nguyn v module tnh ph.
Hnh 4.10: Giao din trang ch ca website

Trang ch ca website c chc nng ra lnh deploy mt my o t mt mu c
nh ngha trc trong h thng OpenNebula v chc nng yu cu tin trnh truy cp
vo Zenoss ly d liu gim st v database MySql. Bn cnh , vi vic nhp tn host
hoc IP s cung cp 2 chc nng xem cc my o ang chy trn my vt l{ hoc
thm my vo h thng gim st Zenoss. Vic thm mt thit b vo h thng gim
st Zenoss yu cu khong 1ph 2ph khi to thit b trong Zenoss, 1ph model
thit b nhm kim tra trng thi thit b v 1 ph - 2 ph c d liu gim st u tin.
n mn hc: Gim st ti nguyn

54


Hnh 4.11: Giao din ca bng kt qu gim st cc my vt l

Giao din ca bng kt qu nhm nh dng li d liu v cung cp giao din theo
di d liu hin c trong c s d liu. Tng t giao din trn, cn c cc giao din
thng tin my o v giao din qun l tin trnh trong my o.
















n mn hc: Gim st ti nguyn

55

Chng 5. nh gi

Qua qu trnh hin thc, cc module hin thc tuy p ng c nhng mc tiu
ra nhng vn cn nhng chc nng cha tht s hon chnh tch hp vo d n phng
th nghim o. Bn cnh , d liu thu thp c t cc thnh phn gim st vn cha
c kim nh v so snh kt qu vi nhng cng c gim st chuyn bit. Mc d nhng
plugin ly d liu c tng hp t cng ng ca Nagios - Zenoss c nh gi cao bi
ngi dng nhng cn thit phi qua mt thi gian vn hnh v kim nh t h thng thc
t. Cc kt qu gim st trong phn hin thc c cp nht trong khong thi gian 1 2ph
ngn hn mc nh ca h thng Zenoss l 5ph nhm p ng tt nhu cu cho nh qun tr.
Tuy nhin, khong thi gian trn cn xem xt v iu chnh ph hp vi nhu cu gim st
ti nguyn s dng vi chc nng nh thi. Trong giai on lun vn, ti s tip tc kim
nh nhng d liu gim st trn h thng c quy m ln hn nhm rt ra nhng thng s
ph hp vi tng nhu cu c th.
Trong m hnh hin thc, chc nng gim st trc tip thu thp d liu v cp nht vo
c s d liu ca h thng. s dng nhng d liu ny, chc nng qun l ti nguyn v
tnh ton chi ph s dng c php truy cp trc tip vo c s d liu s dng kt qu
gim st. Gii php hin thc ny dn n s thiu trong sut trong qu trnh tch hp cc
chc nng, dn n tnh linh hot khng cao v d dn n s thiu nht qun trong d
liu. Nhm thng nht v xut trong giai on tip theo s hin thc c ch trao i
thng tin s dng gi hm t xa nh XML RPC nhm khc phc nhng nhc im trn.
Nhn chung cc kt qu thu thp c t h thng gim st hin ti l da vo tng thit
b c lp trong khi nn tng in ton m my v ti phng th nghim o i hi
nhiu cp gim st khc nhau. Bn cnh nhng d liu chi tit, da vo mc tiu ca cc h
thng khc nhau i hi cn c nhng cp gim st tng qut hn nh gim st theo cm
my vt l (Physical cluster) hay theo cm my o (Virtual cluster). Vic gim st theo nhiu
cp ha hn l bi ton th v v y thch thc. Bn cnh , ti s tip tc m rng
kh nng t ng ha nhn dng s thay i trong cc my gim st nh khi khm ph mt
my mi trong mng (auto discover devices).



n mn hc: Gim st ti nguyn

56

Ti liu tham kho

[1] Zenoss 3.x Core Network and System Monitoring - Michael Badger
[2] Lun vn tt nghip i hc: nghin cu cc gii php v xy dng m hnh cho vic
gim st h thng in ton m my Nguyn Hu Lm, Nguyn Ngc Thnh 6/2011.
[3] Zenoss Administration Zenoss, Inc
[4] Creating Zenoss ZenPacks for Zenoss 3 Jane Curry
[5] Bo co nhng nguyn l sng to ng dng trong in ton m my v cng ngh o
ha - Trn Trung
[6] Zenoss Developer Guide Jane Curry
[7] Zenoss Json API Zenoss Core API - Zenoss, Inc
[8] OpenNebula Documentation

Website
http://community.zenoss.org
http://zenoss.com
http://en.wikipedia.org/wiki/Cloud_computing
http://nagiosplugins.org/
http://exchange.nagios.org/
http://vcl.ncsu.edu/