SlideShare uma empresa Scribd logo
1 de 113
Baixar para ler offline
] ^ S] ^ S] ^ S] ^ S^ a ^^ a ^^ a ^^ a ^
^ [ _ ^ [ _ ^ [ _ ^ [ _ 
WWWW
........_ [S_ [S_ [S_ [S
aaaa
2008-2009
‫ﺍﻟﺮﺣﻴﻢ‬‫ﺍﻟﺮﲪﻦ‬‫ﺍﷲ‬‫ﺑﺴﻢ‬‫ﺍﻟﺮﺣﻴﻢ‬‫ﺍﻟﺮﲪﻦ‬‫ﺍﷲ‬‫ﺑﺴﻢ‬‫ﺍﻟﺮﺣﻴﻢ‬‫ﺍﻟﺮﲪﻦ‬‫ﺍﷲ‬‫ﺑﺴﻢ‬‫ﺍﻟﺮﺣﻴﻢ‬‫ﺍﻟﺮﲪﻦ‬‫ﺍﷲ‬‫ﺑﺴﻢ‬
‫ﺇﻧﻚ‬‫ﻋﻠﻤﺘﻨﺎ‬‫ﻣﺎ‬‫ﺇﻻ‬‫ﻟﻨﺎ‬‫ﻋﻠﻢ‬‫ﻻ‬‫ﺳﺒﺤﺎﻧﻚ‬‫ﻗﺎﻟﻮﺍ‬
‫ﺍﳊﻜﻴﻢ‬‫ﺍﻟﻌﻠﻴﻢ‬‫ﺃﻧﺖ‬
‫ﺍﻟﻌﻈﻴﻢ‬‫ﺍﷲ‬‫ﺻﺪﻕ‬‫ﺍﻟﻌﻈﻴﻢ‬‫ﺍﷲ‬‫ﺻﺪﻕ‬‫ﺍﻟﻌﻈﻴﻢ‬‫ﺍﷲ‬‫ﺻﺪﻕ‬‫ﺍﻟﻌﻈﻴﻢ‬‫ﺍﷲ‬‫ﺻﺪﻕ‬
‫ﺍﻟﺒﻘﺮﺓ‬‫ﺳﻮﺭﺓ‬
‫ﺍﻟﺮﺣﻴﻢ‬‫ﺍﻟﺮﲪﻦ‬‫ﺍﷲ‬‫ﺑﺴﻢ‬
‫ﺇﱃ‬ ‫ﻣﻬﺪﺍﺓ‬‫ﺇﱃ‬ ‫ﻣﻬﺪﺍﺓ‬‫ﺇﱃ‬ ‫ﻣﻬﺪﺍﺓ‬‫ﺇﱃ‬ ‫ﻣﻬﺪﺍﺓ‬
...............................................................................................................
...............................................................................................................
...............................................................................................................
...............................................................................................................
@×aŠìÿa@Þ»cNNN@ @
Èc@¶g@béïÐ@knÙm@óÔŠì@‘båÜa@NNN
ôÑĒ—à
öa‡èfia@ @
@óî‹“jÜa@×ì‹È@À@óîa‡:a@Šíä@„š@ñ‰Üa@‹èbĒÜa@†aüÑÜa@¶gNNN@ @
@7©a@‘båÜa@âÝÉà@¶g@NN@òa‡:a@béi@#dî@Üa@òbÙ“¾aNNN@ @
@¶g@óïäbäfia@ß펊@NN@µ¾bÉÝÜ@ó¼Š@ÞŽŠc@æàNNN@ @
@@bä‡ïŽâÝŽ@ì@êïÝÈ@!a@ôÝ–@‡á«
@öbȇÜa@Þ¸@ý@Üa@ëbÑ“Üa@ì@çbå¨bi@ïÑî@ñ‰Üa@kÝÕÜa@¶gNNN@ @
æà@óuíåà@Ãíï£@ôm†bÉŽ@oØby@æà@¶abéjÝÔ@NNN@ @
@vÉm@‹¢@¶gêø aí’@À@펋m@çc@pbáÝÙÜaNNN
@béïà‡Ô@o¥@óå§a@oäbØ@æà@¶gNNN@ @
ðàc@ @
@óäbàÿa@ì@óÝï›ÑÜa@?áÝÈ@ì@Öî‹ĒÜa@ðÜ@Šbäc@ñ‰Üa@ÞÉ“¾a@¶gNNN@ @
@†ìŠíÜa@ÒĒÕÜ@Ûaí’ÿa@×íÐ@7Üa@l‰ÉnŽa@æà@¶gNNN@ @
@öbårÜa@ŠbÅnäa@çì†@öbĒÉÜbi@jåî@ñ‰Üa@kÝÕÜa@¶gNNN
@ì@×þ‚ÿa@ðÔbáÈc@À@ËŠŒ@æà@¶g@âïÕÜaNNN@ @
ðic@ @
@öbĒÉÜa@a‰è@ì@çbå¨a@Ûaˆ@ÞÄ@À@oÈ‹È‹m@Üa@†ìŠíÜa@¶gNNN@ @
@ð÷b8@À@óøa@ãívåÜa@ì@L@ò‹›åÜa@ò‡øÐÿa@¶gNNN@ @
@öbÐíÜa@ì@ׇ—Üa@ðÉà@aíÉšŠ@æà@¶gNNN@ @
ðmí‚c@ @
†@N@‹èbà@†@@L@NŠ†bÕÜa@‡jÈ@L@‡¼c@L@äc@@LÚÜbà@ @
ðmaí‚c@ @
@L@ßbéäãNL@çbºg@†NöbÑ–@ @
@öbåic‚cðmí@@@@@@@@ @
µÜ@L@‡¼c@@L@ßíni@@L@@µà7ä@‡á«@L@óîe@L@ @
ÿaöbÔ‡–@@ @
@ójyÿa@ÞØ@¶gNNN@ @
@ @
ôÑĒ—à@ @
13/07/2009
@ðmbïy@çbni@À@ÖibäŒ@¶g@L@óåu@À@µybîŠ@ì@ñ†aüÐNNN@ @
@ñbïä†@À@ò‹ĒÉÜa@†ìŠíÜa@ì@L@óÉäbïÜa@ŠbèŒÿa@¶gNNN@ @
@ðyìŠ@â÷aím@ì@=ÝÔ@pbvÝ‚@¶gNNN@ @
@@@L@ßbéä
ò7Í—Üa@7Ðb—ÉÜa@¶g@L@óznÑn¾a@âÈa5Üa@ìNNN@ @
@ߍÍÜa@‡÷b—Ô@¶g@LŨ@쀀@ŠbÍ—Üa@@pbNNN@ @
@òbï¨a@óái@ì@L@óÜíÑĒÜa@òöa‹i@¶gNNN@ @
@@@@µÜ@L@‡¼c@@L@ßíni@@L@@µà7ä
@öbÐíÜa@Þ@Lì@‚ýa@Êjåà€@öb@Lì@‡ï–Šñ@À@¨a€€€€€€òbï@NNN@ @
@kÝÕÜa@æà@öauc@béma†‹Ñà@ì@béÐì‹y@óÍÜ@‡Éi@aíÈ6²@%NNN@ @
@@óÝàbØ@bénc@âÙnî‡èÿNNN@ @
@@@ójyÿa@ÞØ@¶g
@@@ðy@7áš@ì@‹èb @kÝÔ@ÞØ@¶g@@NNNNNNN@ @
ôÑĒ—à
13
@ðmbïy@çbni@À@ÖibäŒ@¶g
@ñbïä†@À@ò‹ĒÉÜa@†ìŠíÜa@ì@L@óÉäbïÜa@ŠbèŒÿa@¶g
@ðyìŠ@â÷aím@ì@=ÝÔ@pbvÝ‚@¶g
ò7Í—Üa@7Ðb—ÉÜa@¶g
@ߍÍÜa@‡÷b—Ô@¶g
@òbï¨a@óái@ì@L@óÜíÑĒÜa@òöa‹i@¶g
g@¶cè€@öbÐíÜa@Þ
@kÝÕÜa@æà@öauc@béma†‹Ñà@ì@béÐì‹y@óÍÜ@‡Éi@aíÈ6²@%
íÝÉÐ@íÜ@ìa@
@@@ðy@7áš@ì@‹èb @kÝÔ@ÞØ@¶g
çbЋÈ@ì@‹Ù’@óÔbĒi@ @
 Ù ğ..¯  ­ Ħ
ª  Ģ.
Ğ  ª 
¯ Í ħ Ù..
..ħ–
Ę   −  Ú   Ø
  
  Ú  Ù.
ě   Ĩ ĩ ت
 Ù.
:

Í ú.
ħ ª Ú:
   ×
13/07/2009
@ @
ª ..ª 
ğ ª  Ġ ª Ħ ª ¯
.........
 ¯ Ĩ...
ú..
Ì ¯...
Ú ×
ª..
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ôÑĒ—à@ @
13/07/2009
Moustafa
õ‹Ø‰ÝÜ@óÑÔì@ @
  ...
...
..ªª 
.........
ğ ª  Ġ ª 
...Í ª  ¯...
 ¯ Ĩ
ª ğ
...
ħ Ú ...Ì ¯
¯ ­ ...!
Ú ×
ú  ğ  Ù ú.
 ª..ª
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
MN@Hotmail.com-Moustafa
  

¯...
ğ ª  Ġ ª 
...
..
ħ Ú 
¯ ­ 
Ú ×
ú  ğ  Ù ú
 ª
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
:..........................................................................4
1−1.................................................................................................5
1−2.........................................................................................5
1−2−1.................................................................................5
1−2−2 ú .............................................................................6
:ª ª.................................................................7
2−1ª.............................................................................8
2−1−1ú.............................................................................8
2−1−2..............................................................................9
2−1−3ª  ª .....................................................9
2−2ĪOSI.............................................................................10
2−3ÙSNMP‫و‬CMIP............................................................................12
2−4SNMP........................................................................................13
2−5ªMIB...................................................................17
2−6SNMP....................................................................................19
2−6−1ª ª....................................................................23
2−7RMON...................................................................................24
:ª..........................................................................26
3−1ĩ....................................................................................................27
3−2..........................................................................27
3−3Ò..................................................................................28
3−4WAN........................................................................28
3−5ª..................................................................................28
3−6...........................................................................................30
3−7ª......................................................................................31
3−7−1ªSpot Check Tools................................................31
3−7−2ªĜª ×Protocol Analyzers.....................................32
3−7−3ªĜĪTrending Tools..................................................33
3−7−4ªThroughput Testing...................................36
3−7−5ªğ Realtime................................................37
:...............................................................................38
4−1..............................................................................................39
4−2Ĝ.......................................................................................40
4−3.................................................................................46
Ġ:Ĝ...........................................................................48
5−1...........................................................................................49
5−1−1ª  ú...............................................................49
5−2ª ........................................................................................50
5−2−1ª...............................................................................50
5−2−2ª ........................................................................50
5−2−3ª.......................................................................51
5−2−4...................................................................................54
5−3Ù ª ...................................................................................57
: ª.....................................................................58
6−1.............................................................................................59
6−2Nagios........................................................................................59
6−2−1Windows machines.........................................................61
6−2−2Linux machine..................................................................62
6−2−2−1NRPE.............................................................................62
6−2−3Network printers...............................................................64
6−2−4Routers And Switches.......................................................64
6−3RRD Tool..........................................................................................65
6−4Nagios Graph....................................................................................65
6−5Notification Tools..............................................................................66
6−6ª.............................................................................................66
:.............................................................................67
7−1........................................................................................68
7−2­............................................................................................69
7−3................................................................................74
7−3ª ..................................................................................75
:.....................................................................................77
8−1ª ª......................................................................................78
8−2..........................................................................................82
8−2−1Ù.................................................................84
8−2−2ú................................................................85
8−3ª..............................................................................................86
8−4Ğ.............................................................................87
ĩ Ġ....................................................................................................................89
....................................................................................................90
A:ġ×PERL.........................................................................................91
B: ÙRegular Expressions........................................................................93
C:ª.............................................................................................97
D:­.........................................................................................102
.......................................................................................106
4
ßìÿa@Þ—ÑÜa@ @
@ @
Ëì‹“¾a@Òï–ím@ @
5
1−1:
Ø ª ğ ª ğ ª
ğ ª ª  ×
Jone.M.Maklayª  Ù Ġ:
Ī Ĝ × Ù ğ  ğ 
.
 ª ħ ğ ×
ª   Ħ.
ª Ħ ħ ú ª ġę
 Ø Ħª ě 
.
)(:
•/ª ě.
•Ğª ­.
• ª Ĩ Ó ª ­.
•ğ ª ĝ.
īÙ ª×Ġ.
Ø ª  !
1−2:
1−2−1:
Ø  (Neotech)
ª  ª Ĩ)Ħ ­ Ô 
( ...Ĝ ī):ě ­80(ħ
ª  .
ª 
Ĝ  
Ġ ī
ª ª ª  ª  Ğ
Ħ ĦMTBF.
ę ª.
Ø  .
ª Ġ Ģ  ª  ª:
Ġ ī  ª Ġ ª  Ĝ.
Ø × ª Ĝ ªSMS.
(Windows , Linux).
6
 ú :
:
ğ.
Ġ Ħ:ª 
)ª ī. (
:Ĝ  
.
:Ġ ī
ª ª ª  ª  Ğ
ªError RateĦ Ħ
:ę 
Ħ ª Ø  
ª Ġ Ģ  ª  ª
Ġ ī  ª Ġ ª  Ĝ
Ø × ª Ĝ ª
ªScriptsĠ.
ª  .
ğ  .
 ª ě(Windows , Linux)
.
1−2−2 ú 
−ğ
−Ġ Ħ
−
.
−
ª ª ª  ª  Ğ
:ª
−
Ħ ª 

1−Ġ ī  ª Ġ ª  Ĝ
2−Ø × ª Ĝ ª
3−ª
4−ª  
5−ğ  
6− ª ě
7−
7
a@Þ—ÑÜðäbrÜa@ @
@ @
bŽcŽpbÙj“Üa@òŠa†g@pbï@
8
2−1:
Ù ī.
Ħ.
.
ª īĦ.
ę Ùª ī.
2−1[1]
2−1−1ú:
Ò:
•: Í.
•: ªªªª
ī.
•Ġ Ħ Ĝ:Ġ Ī .
• ª:ª Ħ
  ª.
•:.
•:ę ª
9
2−1−2:
ª:
•.
•Ħ Ĝ.
•.
•ª.
•.
•.
•.
•Ħ  ú.
•Ħ 
2−1−3 ª :
10
2−2ĪOSI:
Ù (ISO)Ğġ  ĪOSI.
Ģ:
•
•ª 
•ª
•
­Ëú Ī ħ
OSI.
2−2Ī[1]
 Ī):(
Ī ª(agent)ħ Ù.
ħ ª ª .
11
ª  Ī:
ª ª  Ī ģĝ.ª  ª  ĝ
ª(MIB)ª)ISOÙ  (ª(SMI)
  ª MIB.
Ī:
ª ª Ī Ħ.× ģ
Ħ ª.
:
 ª (NMS).Ī
OSIĪFCAPS:
Īª Ħ.
12
2−3ÙSNMPCMIP:
ª Ù × 
Ù .:
•ª:ġ Ø ġ(IETF)
•ª:ª ġ
ÙSNMP)ª(Ù ġ ħ
ªªª ª ġ.ËSNMP)
ª(TCP/IP)/Ø(1989
Ù.ú Ë2cSNMPSNMPv2c
1993.ªSNMPv2c ª Ø ª Ĝ 
ª(SMI)ª ×.Ë
ªOSI) Ħ ( ªTCP/IP.
ËSNMPv3.ªSNMPv3ħMIB)ª(
ğ(packet)× ÙğSNMPv1SNMPv2c.
CMIP)ª(OSI)Ħ 
(Ġ Ù ISO)Ù  (ú
 ª.
13
2−4SNMP:
SNMP)ª(ª 
Ħ.SNMPğ ª ª ħ
(packet)ª ×  TCP)(
ת.
SNMPª ªĞ.
Ħ Ù ª
SNMP.SNMPĞ  ĩ Ġ ª ġ
 ª  ª.
 ªSNMP:
•
•
•ª
•
NMS)(ī×.
× ġ(NMA).NMA ª
Ħ. ªħ×
.×SNMP)ª(
ī ę.ª  ªªªNMS
NMSªÙ.ĝª 
  ĠĠ ª.:
• Ġ.
•ªğ(packet)Ğ.
•(router)ª Ù.
•.
• ª.
14
NMS)(MIB)ª.(
NMS. Ħ
­ Ġ.
SNMP)ª((UDP)161
162.×.¯:
•Get – ĩªMIB.
•Set –ª Ħ  ĩMIB.
•Trap –ĩ(agent).
ª. ­Ø
SNMP.ª  ĝ Ĝ Ģ.
ª Ī ª ğ .ª ğ 
 ĝ proxy.Øproxy
SNMPú  Ī  – ģ
–ú  .ªħ ú (proxy)
SNMP ħ.
2−3 Ī ª−ª[4]
15
2−4 Ī ª−ª[4]
ª×  ħ(RMON).×  
RMON ªª .
NMS)(Ī.Ģ
Ù(RAM) ª .
ª ġĪTCP/IP)/Ø.(ª
ª .
ªCiscoworks2000HP OpenviewSNMPv2c.
2−5 Ī[4]
16
  ħ ª
)2−6(.
Ù  × NMS .NMS
 –NMSNMS(client).
ª ħ Ġ)2−7.(¯
Ğ ªNMSĠ  ª ę
ª×NMSÙ)2−8.(
2−6[4]
2−7Ù[4]
17
2−8[4]
2−5ªMIB:
MIB)ª(ª ĩ Ú.Ë
SMI)ª(ī  ª Ģ
ª× )2−9.(
2−9ª[4]
18
ĩMIBª Ø ªĞ.MIB
MIB Ħ ª ĩ .
ËSMI MIB  ª ġ Ì ħ114.ĩ
ª ÓMIB-II Ĝ MIB-I.
  ª SNMP)ª(.
ª ĩ ª  .ī
ª ª.ú Ģ ª 
.Ó Ğ ú(ASN.1).
2−10ª ª[4]
SNMPª ªª ÙMIB.
 Ó   ªMIB)ª( ī Ë RFC)ª ª.(
īhttp://www.ietf.org/.
ª Ħ MIBĠ.Ĝ Ĩ
.
19
2−6SNMP:
(agent) ġ
(router)ª(switch)ª Ó(hub)ª ª .
ª ĞSNMP)ª( .×
Ë ª Ù  Ĝ MIB)ª( .
2−11ª[2]
SNMP Ħ.Ò × 
ĩ × ª.ËØ
 ª Ħ.× ªSNMPv1)1.(
¯SNMP)ª(NMS)
.(GetRequestGetNextRequestSetRequest.
GetResponse.
ğMIB)ª(.
20
2−12ª×SNMP[2]
ÔSNMPv2c SNMPv1.Ë  ª
GetBulkRequestª64ħMIB.
ª  ÍGetRequestGetNextRequestЪ .
ğ   ÙSNMPv1.Ğ
GetBulkRequestª  .
ª Ğ64ª ª
Gigabit Ethernet.
NMS)()2−12(.
ª  ğ(agent). ª ğ.ª   Ô
¯ Ø Ë .Ø Ë  ª  ī
Ë Ħ Ë.
21
2−13ª[2]
ª Ø.¯ Ğ  ª Ù.
ĩ SNMP)ª.(
 Ħ Ğ .ħ  ğ 
.ت  .Ø ¯ ­
ª  WAN).(
 ª Ğ .ª Ğ  .
ğª .ª
ª.
SNMP)ª(ª (UDP)× .
UDP)connectionless(ī
SNMP.SNMPĜ
SNMP.
ĜSNMPÙÓ(community string).
 ħ Ó.ĞSNMPv3ª
ÓÙ.
22
2−14SNMPV1[2]
SNMPv2c.ī ×
ØRFC1905.
2−15SNMPV2[4]
ÓÙ Ù Ĝ Ë  ğġ
ĩ ª ×ÙÙ ª.
Óġ ĩSNMPv2
ª.ġSNMPv3. ª 
SNMP)ª( Ó ę.ª 
 Ó ÙĠ  Ù
SNMP.
23
 Óª Ø
SNMPv1.CiscoSNMPv3ª  ª
SNMPv3)2−16(.
2−16SNMPV3[2]
SNMPv3Ī.
2−6−1ª ª:
24
2−7RMON:
ĩRMON)(ª.ĜMIB)ª
( ĠMIB-IIª.¯
RMONª ġMIB Ù
SNMPSNMP.
MIB-IIğÒ ª .
LAN)((agent)×SNMP.
SNMP úMIB-II
 úLAN.
2−17RMON MIB[1]
ª .
25
ËRMON)(IETF RFC 1271RFC
1757ª  ÙªLAN.
(agent) ª   ª Óěġ
ªĜ ğ(frame).
RMONª ġ ħ Ethernet ġ
RFC 1513Token Ring.ËRMON
(agent)ÓªĨ(client)SNMP
)ª.(ªSNMP MIBª ġ Ğ
EthernetToken Ring RMONª Ħ 
RMON.ª ġRMON:
•ª ġ:ª Ĝ Ġ
.Ø ¯ ­CRC)
(Ù.
•ª Ò ġ:ª Ĝª ġ Ĝ 
ĝ.ğ(packet).
•ġ:ª Ø ĦĦª
(agent). .
• ġ: ª Ĝ   ª.
ğ   ª.
•ġTopN:TopNĦ  ġ ª.
• ª ġ:ª ĝ.
ªğ.
•ġ:¯  Ģ  ª.
•ğ ġ:ğ ĝ Ĝ.
•ġ:  
. .
26
sÜbrÜa@Þ—ÑÜa@ @
@ @
pbÙj“Üa@ójÔa‹à@ @
27
3−1ĩ:
תěĜª Ùª
¯ħª .ªĞªª 
ħě
ğħª.
ª:
•ª Ġ
•
•
•Ø
•ªª
•ªÙ¯­ğ
•ØISPĠ­
𪠪Ù.
•Ī
  ª ġ
ª.
3−2:
­ØĦ50ª :×Ø
ª.Ø
×Ø Ù(Spam)ğ
)(ÙĦ .
ġħğħ
ª ě.ġğġ­
ğ.
ħ.ú­ 
ğħת ě­ğ
28
3−3Ò:
ª­ ĨªÒ.
Ò:
•Ù
•úª Ù
•úĦ Ħ 
•×ª ěª
3−4WAN:
ħªÒªÓ­ğ
ªØØ
ªħÒ.
ªĠª×WANªħ
)(ÙÒ.
ªĠ:
•×Øׯ×
د.
•ª ×Īğª.
•úĦ ĦØ.
3−5ª:
ªğª­ğ
.Ùªħت دª
­ğª .×ħ¯
­ğª .
3−1ªª
.
29
3−1ª [3]
¯ØğªÙ
Ù.
īÓĦğØ
ħت.ĩ
ġª
.
ĞĦ 
ÙØØ.ħ
Ø.
.Ġ
.Ĩħ.
īúĠīª
Ħ ª Ğīª
Nagiosª ě
תª Ġ.
ī×ħ­×ªª×
ªÙSMS×Ø.
ª×ª­Øת
Ĩªģ
30
ª ě.īğªúª
Ğ.ĨĜ
.ġ
Ħ .
3−6:
Ħ.
Ĝ¯ªª 
¯ Ò
Ù¯
¯­ğת Ġªª
¯.
:
1.×:ªĞªġ
)­ğªª ġ×(ª 
ª.
2.úĦ :īúª 
ª Òħª Ġğ.
3.úª Ù:ĩħª Ùĝª
ª Ù­ğª Ø.
4.Ğ:īħ
ªĠğĜ
.
5.Ħ ĜÙ:Ħ Ĝª
תħ.
6.ĝ:ğ­ğ
ĞĦ ­.
31
ğğÙª ġ×
ġĨ. ª ­.
3−7ª:
ª.ªcheckSpot­
ª Ø.ī×Ping
ªĦ.ת ª ×Analyzers
Networkªªĩ×
×)Ĩªª
ªØ ×.(ªĜĪTrendingĨª Ø
ª Ħªğ real-
time monitoring.ª
throughput testingªğ ­ª ĦĦ
ªdetectionintrusionúªÙÙ
ªª ĝ)ú/.(ª
benchmarkingĠ.
3−7−1ªSpot Check Tools:
•Ping:
Ĝ)ĨWindowsMac OS XGNU/Linux
(BSD.pingĜØICMPÒ
Ĩ×ĝğ.
ğØ
ğTime To Live (TTL)ğÙ
ĦğªÒĦğª.Í
pingª¯¯DNS
Ú¯.DNS
32
IPØ.ÍħěĨ
.ÍØ.Í
ØIPÒ.
•Traceroutemtr)http://www.bitwizard.nl/mtr/(
tracerouteping)tracertª
ītracerouteĠĦğªÒ
Ø:
$ traceroute -n google.com
traceroute to google.com (72.14.207.99), 64 hops max, 40 byte packets
1 10.15.6.1 4.322 ms 1.763 ms 1.731 ms
2 216.231.38.1 36.187 ms 14.648 ms 13.561 ms
3 69.17.83.233 14.197 ms 13.256 ms 13.267 ms
4 69.17.83.150 32.478 ms 29.545 ms 27.494 ms
5 198.32.176.31 40.788 ms 28.160 ms 28.115 ms
6 66.249.94.14 28.601 ms 29.913 ms 28.811 ms
7 172.16.236.8 2328.809 ms 2528.944 ms 2428.719 ms
8 * * *
Ġ–ntracerouteÚ¯DNSħ.
ªªę¯ĦÒĦª
Ò.
 Ò.
My TraceRoute (mtr)pingtraceroute.ī
×ğÙªª 
pingtraceroute.
3−7−2ªĜתProtocol Analyzers
ª ġĜת٪ ×
ª.īª ġת
ª¯ªª ħª
802.11.ġª ġ×Ù)Ó(ת:
33
•cpdumpt)http://www.tcpdump.org/(
command lineª
Ęª wireshark¯.ī
ě­ªªħlink layerī­
ªªħªÒğ­ªĜ
.
•Wireshark)/http://www.ethereal.com.(
תUnixWindows×
ª ġĜתÍ.
Wiresharkª×Ģª
­ªğ.ī­ª 
ªĨªØħªÒğ.
Wiresharkª تª
.TCP
3−7−3ªĜĪTrending Tools
ªĜĪتĨ
­).(ªĜĪ
ªĜ.
ªª ġę.
ªĜĪ.:
•MRTG)/http://people.ee.ethz.ch/~oetiker/webtools/mrtg(
ªªMulti Router Traffic Grapher
(MRTG)Ĩ¯ªSNMP
ĩª.­ª.
34
•Ntop:http://www.ntop.org/
ğª.ī
RDDtool.
ÙÔ ­ª ĩ
.Mac OS XBSDGNU/LinuxWindows.
ª ntop:
•­Ù)×MACÖ(.
•ěª×.
•ªªĦ.
•ªªª NetFlow.
•Ĝ.
•Ĝªª ġ.P2P
•.
•ġªAPIPythonPHPPerl.
ÙªGNU/Linux
ÙªRedHatDebianUbuntu.
Ô ğªª.
ntopÙªğ
ØĢ.
•Cacti:http://www.cact.net
ğªRDDtoolĜĘª ª
MySQL.PHPħª ħ
ěªSNMPġ×
ī.
ĨCactiěªª ěú
.
35
•NetFlowhttp://en.wikipedia.org/wiki/NetFlow
ªªØIPCiscoª 
:
Cisco IOS NetFlowġª ĠªØIP
ªªĝªªúĠDenial
of Service.תª
¯ª.
īª CiscoªNetFlowUDP×
×Ô CPU×SNMPğ
תØ.ěª 
ġ×NetFlowĢª­.ī×Ĝ
ª×Ùª×.
•Flowchttp://netcad.kiev.ua/flowc
ªªNetFlowÙğ.Flowc
ªMySQLªªÓīª 
ª ×.Ĩ
×HTMLª.
•Argus:http://qosient.com/argus/
ħªAudit Record Generation
and Utilization SystemÙħª
Ħ.
ArgusØ:
ArgusªªªĠÙ
jitter×īª ªěª×
ª×Ęªĩ×
.Argusª ě.ArgusĪ
ğĦª:PushPull×ě
36
ª.ª ġArgusª
.
ArgusĦĦ:ġMaster Collectorª
clientÓ­ª.Argus
BSDGNU/LinuxUnix.
ªĜĪ
Nagios­.
3−7−4ªThroughput Testing
ªĜī
ğª×ª
ª.
ت)http://www.dslreports.com/stest
http://speedtest.net(ª ĠÙ.
ĩ
Ø.
ªªÒ.
•Bingen.shtml-http://fgouget.free.fr/bing/index
ªĨ
ĦĦĜªªğICMP.ī
ªěªğħª
Ùª.
ībingªÙĦ ĝªĠğħ
­úªªICMP.ĩ
­ğğğħ¯
ªÓ.
˪ ġ×
.
úĦ .
īת
úÙª ª
SMBª Ĝ
.Snort
×ħª
Ĩ
ĜÙ
ĦNagiosCacti.
ª ×
37
ğ Realtime
ª ħ


ª ġ×Ħ.
http://www.snort.org
snifferªī
ªī
ª.ī×ú
ªª­ġ×CGI
OS fingerprintingÙ
.
SnortĜğª
.Snortğğ
ġSnortĜ
ú.
http://www.zabbix.org/
ī
ªMySQLª Ĝ
)ªª 
SNMP.(
3−7−5ª
×úª 
.
ħ
ª ġ×
•Snorthttp://www.snort.org
×
ª Ò
ªª
OS fingerprinting
×
­
Ħ .

•Zabbixhttp://www.zabbix.org/
Ę
SNMP
38
Êia‹Üa@Þ—ÑÜa@ @
@ @
óÙj“Üa@óïåi@ @
ADSLÒ
ª ī  ª DMZ
:
39
:
× Ħ  Ħ  ĦADSL
× Ġ.
ª ī  ª 
×FirewallĠ Ģ.
4−1
−office1
4−1
× Ħ  Ħ  Ħ
× Ġ
ª ī  ª 
×
40
4−3office2
ú ª 
 .
4−2Ĝ:
•Crawler
 ª Ø ª Ĩ
¯web crawlerweb spiderweb robotautomatic indexer.
ªweb crawlerĞ ¯  ¯ Ĩª ª 
Øcrawler­ Ùħ ª
tagsÓ ª crawlerĜ ¯ 
ªª .
ª crawler ª Ó 
Ø  ª ª  Ĝ.ī
Ø ªī  ª ġ ī
Ĝ)(.
41
•ĞFirewall
ĞğFirewall×
Ùª Ġħ.
īĜħ𪪠Ĩ
ªğªª ØĠĞğĦğª
تĠ
ġĦĦ.
ЪªªØ
Ğħتħ
ØĨª.
ĞģÙØ
Ъ 
Gateway DevicesØĠ
ËЯ.
4−4Ğ[14]
 ª ġ×:IP Tabels
42
•Ø ×Email:
ª ×:
×SMTP:(Simple Mail Transfer Protocol)
Ø  Ħ. ğ  ×
 ħ.
,ħī,
   ú Ĝ.
SMTP”Push“,   .
ğ Ù 
.
  ĝ, × Ò ª .
×Webmail,ħ HTML ¯Ø.
SMTPª  Ħ  ×,ĝ
ħ.
POP:(Post Office Protocol)
Ø ×  ×, ğ
 ğ.
¯  ×.”PULL“,
  ğ . ğ
POP3.
¯ ħ × ª ğPOP3,Ĩ × POP3
ĩ. ¯ ħ.
ħPOP3¯ ħ,ğ ī
 .Ĝ
×  ¯.×
Ĝ Ë ¯ ØĜ ÍúÍ 
ú Ĝ.
43
× ħIMAP:
 ª ×  × ĢĜ.
ª ª
Ĝ.ī ú.
Ø × :
:Frontend
 ĝDataBase)Backend(Ø
BackendĦ ×IMAPPOP.
Ġ:Backendĩª(DataBase).
ª ×SMTP)(IMAPPOP)(
ĠPOPIMAP.
 ª ġ×:
Mail Getway (Frontend):(SMTP)postfix+(IMAP  POP)Courier
Mail.MTN.DataBase (Backend):Courier mail Server
•DHCP:
Ĝ ¯ Ù Ù
­IPª úDNSú 
gatewayrouterĞ Ó ú ħ Ø
Ù ª   ª   
DHCP)Dynamic Host Configuration Protocol(
IP  Ģ  ª  ­
DHCPª  ħ
Ģ .
 ª ġ×:DHCP Server
44
•ª  FTP:
ª  Ĩ ª  Ø ª.
ª  ×)FTP(ħ ª .
ĦĦª
  ª    ª  ª ...Öª
ú ĩ 
Ù.ª  ª   ª  (FTP)×
ª(tcp/ip)ª×
ª Ğ ħú ¯Ğ.×
Ħ.ĦĦĦ īĞ
LinuxÙ×.
ª ª (binary, ASCII)
תª ğ­
.
 ª ġ×:
Samba  WinBind:Linux Server.
•Ú DNS:
DNS  ī  Ù ħğ
 ú  
×IPú  ęª
ğªIP  ĞDNS
¯ ğIPª  ú  IP
×.
 ª ġ×:BIND9
45
•Proxy Server:
×  ğÒ ªª
Ø.×Ĩª(traffic)Ħ
Ø.
ªØħ Ħ.
ªğğ )
()(.
ĩªØ ħ .
ªĞ Ħ  ī.ªĠ
ª  .:Ø
ª     ª
.
 :Proxy Server Caching
īª ª ĝ¯
ª.(Caching)ĝ ħ × ĝ ī
Ġ ħ)Ø.(
Ħ ĪCaching:
Active Caching:
Ę ª Ħ  ĝ ª.
Passive Caching:
ªcachingª .
 ª ġ×:Squid
46
•Web Server:
Ø  .
   ª ġUnixNT
Ù. ª ġ ¯HTTP Daemon.
Hyperlink 
 ħ ħ ª HTTP
Daemon ª  ª ġ ġ Ë .
ª ġ×:ServerApache
•ÒChat Server:
Ħ  Ħ  Ħ Ò ú
ª   
ğ  ª Ħ Ò ú.
ī ª Ò ú ª Ù
 ¯  ħ 
¯Ħ  
Ë Ħ .
 ª ġ×:Open Fire
4−3
ī.úª
­Ĝª ě.
47
ª  :
ª:
•¯­ğ
•¯­ğ
•¯­ğMAC
•ğbroadcastĘª
•ªĠ
ªØ:
•¯­Ø
•ªħhitProxy server cache
•ªÚ¯DNS
•×Ø)spam×Øě (
•×Ø
•ª Ġğ)ª ª×ØÖ(
•Ping timeªħØ
•ª
ª:
•¯
•¯swap file
•zombie processes
•Ĝsystem load
•¯ĜUPS
•ğ¯
•SMART­
•­RAID array status
ħª 
.
48
àb©a@Þ—ÑÜa@ @
@ @
@ÞïÝ¥ãbÅåÜa@ @
49
5−1:
Ø ªISPsª ªtool-centric
ĝ.ª  ĝ  
ú ªĠ ª.
úgoal-centric.)ª
ª (ª  ú.
5−1−1ª  ú:
ª ª Ġ   ħ Ġ ×/Øĝ
 ª Ĝ  ú Ĝ  ª Ø.
Ĝ ×)1(ú Ù)2(ª  
. Ĝ ī)3(ª. ª 
ĝ ª)4(ª.
5−1 ú  )(]18[
Ĝ  ú:
−ğ.
−Ġ Ħ
−
−
−
50
ª :
ª:
login
Host Monitoring
Service Monitoring
Graph
Notification
:
.
ª :
5−1ª ğ 
5−2ª 
5−2−1ª
1−
2−
3−
4−
5−
5−2−2ª
51
5−2−3ª:
1−:Login
Use case name
NagiosActors
Preconditions
1−URL.
2−  .
3−  .
4− ª .
5−ħ.
Main flow of events
 Ĝ ­Ħ Ġ Ħ
ª Ġ.
Post conditions
4−1ª  :
ª ) (
Alternatives
4−2ª Ġ :
  
Exceptions
2−:Service Monitoring
.ª Ī.
Use case name
Actors
Ë
 Ĝ Ë
Preconditions
1−.
2−Ġ Ĝ .
3−Ġ  Ģ.
4−Ġ  ª  Ģ
ª Ġ.
Main flow of events
52
5−ScriptĠ ­ Ġ)
Ò Ğ. (
6−.
7−Ò ª ğª
8−Ġ ­.
Ġ ª  Ġ ­.Post conditions
4−1 Ġ :
client
Ġ.
.
ħ.
Alternatives
4−1 :
Ğ Ù.
5−2Ù Í:
Ġ ­ Ěunknown
Exceptions
3−:Host Monitoring
ª ª Ĝ  ī  ª Ġ ġ.
  ª Ġ ġ .
 ª ħ¯Down.
Use case name
Actors
ËPreconditions
1−.
2− Ĝ .
3−  Ģ.
4−Ģ   ª Ġ.
5−Ĩ)
(
6−­.
Main flow of events
53
  ª Ġ Ĝ ­
Post conditions
Alternatives
5−1 Ù):Ĩ(
Downª ĠCritical.
Exceptions
4−:
ª Ġ Ĩ Ø)ª  Ĝ(Ģ
ª  ª Ĩ)ª(
Ġ ě
Use case name
Actors
Preconditions
1− ª Ĩ.
2−Ġ)ª(
3−ě :ª
ª)Contact.(
4− Ø × ħ.
5−SMSħ.
Main flow of events
Ĝ ħPost conditions
3−1ğ ħ Ġ.
4−15−1:
 ĠCriticalØ)ª(
.
 Ġ Critical
 Ø.
Alternatives
Exceptions
54
5–ª :
ª Use case name
Actors
Ë
 Ë
Ġ Ë
Preconditions
1−Ġ .
2−ª  Ġ ª ­
ģHistory) ª  Ģ.(
3− Ġ ª ģ.
4− Ġ ª.
5−ªª.
6−.
7− ­.
Main flow of events
 ­ ËPost conditions
Alternatives
Exceptions
5−2−4:Sequence Diagram
1−:Login
55
2−:Service Monitoring
3−:Host Monitoring
56
4−:
5–ª :
57
5−3Ù ª :
Ĩ ªĪħ
Ù ª  ġ ª :
−.
−
−
−
1−:functional security
Authenticationª )
.(
2−:Reliability
:SSL)Secure Socket Layer(
Ģª:Authenticationª  Ù.
3–ĜĠ:fault tolerance
ª ğ Ğ Ĝ Ë
Ĝ ī  ) ĩ  ª ğ
Ġ Ù.(
4–:scalability
ª.
5−:SOA (Service Oriented Architecture)
ú ġ× ª
6–ğ :Realtime
7–Ğ:High Performance
8–:Low Overhead
Ħ.
58
‘†bÜa@Þ—ÑÜa@ @
@ @
óà‡ƒn¾a@pbïåÕnÜa@ì@paì†ÿa@ @
59
:
  ×
:ª  .
   ª ª ­.
6−1:
ħ Ġ ×­  ­ Ĩ
ª  ­ Ĝ  
¯ ª  Ĝī:
•
•
•
•
•ª
ØLinux)ubuntu 8.1(ª 
)(Ù ĩ ª ħ ę
ħ ª Ù ğ Ù
 ĩ ª.
6−2Nagios:
ħğª Ġ
.Ĩ××ØÙSMS
Ħħġ­Ħ 
.NagiosBSDGNU/Linux
­.
NagiosĨĢ.
ת׭ġÙ
ª.ping
ĞĦīnmap
ªØNagiosħ
ª.
60
ī×Nagiosě¯­ğª
Ùª .
6−1[6]
nagios
− Ùª:
 Ù ª ªªª 
ª ª5080100
Ĩ ¯ Ùª¯ Ğ ×
.
−ª ěWindowsLinux ī
.
−ħ  ħ Ģ 
 ª ú Ĝ.
−Ø ī  ª  Ø .
ªnagios:
linux,C Compiler,TCP/IPªConfiguration
61
 ª nagios:
•ª)SMTP,POP3,HTTP,FTP……(
•Hosts)processor load,disk usage…..(
•ªHosts
•ÙHosts
•Ö ª ....
•)plugin(Ġ ª
  ªNagios ħÒlocalhost:
1.ğWindows machines
.ğLinux machines
3.ªNetwork printers
.ª  ª Routers and Switches
6−2−1ğWindows machines:
6−2ğ[12]
ª NSClient Ħ īnagios
  ª Ġnagioscheck_nt.
nagioscheck_ntNSClient
­ ğ Ô  ª ×
× ħħNagios
Ĝ.
62
6−2−2ğLinux machines:
6−3ğ[6]
ª  NRPEĞ .
nagioscheck_nrpe)Ğ (
NRPE)secure socket(
­ ğ Ô  ª × 
ħ × ħNagiosĜ
.
6−2−2−1NRPE:
Linux
ªnagiosĞ Ĩ(CPU,memory,..)Ù 
 Ġ ªNRPE.
NagiosSSH¯check_by_ssh
ĢÙ Ğ  Ù Ğ ħ
NRPEÙ Ğ Ģ.
6−4NRPE[17]
63
NRPEĦ:
•Check_nrpe Ğ.
•NRPE DaemonĞ.
ĜNagios Linux-Unixª Ġ:
×check_nrpe Ġ ×ĝĨNRPE-
Daemon×SSl(secure socket layer)
ħ  ğ  Ġcheck_nrpeħNagios
.
¯:
:
NRPE Deamon ğ Ô  Ò  
 Ħ  ħ ­ ğ.
6−5×NRPE[17]
Ù:
īNRPE DaemonīNagios
NRPE Daemon ī  Ğ Ò ×
Ù .
6−6× ÙNRPE[17]
64
6−2−3ªNetwork printers:
6−7ª[6]
ªSNMP× Ĩ
check_hpjdª:
Paper Jam Out of Paper
Printer Offline
Intervention Required
Toner Low
Insufficient Memory
Open Door
Output Tray is Full
6−2−4ª ª Routers And Switches:
6−8ª ª [6]
ª  īª pingSNMPī
× check_snmp.īsnmp
MRTGĦ īNagiosSNMP.
65
ª:
6−3RRDTool:
RRD)ªªª(Round-Robin Database
ªªØ.ÙRRDtoolsħ
ªªRRDħ­
ª.ªª)­
Ĝ(­ª.ª
RRDtoolęªª ġ
ª.īª ġ)shell(Perl.
ªRDDtoolÙª ġ­
ª ªª.ªRDDtoolĨ×Ĝª
­ª .MRTGªRDDtool
ªGNU/Linux.īRRDtoolª
¯Ô .
6−4Nagios Graph:
Nagiosª ĘNagios  ª Ġ
× ª ­ ª .
Nagios GraphĦ NagiosªRRD.
:
−Ù ħ Ģ.
−× ¯.
− Ğ ª  úNagios.
Nagios GraphĦ Ī:
1−Ęª Ġ ªNagios.
2−ª   Ë  ª  ­.
ª ¯:
Gnokii (SMS software for contacting Nokia
QuickPage (alphanumeric pager software)
Sendpage (paging software)
SMS Client (command line utility for sending messages to pagers and
mobile phones)
Ġħ
Ġ  ª ­ Ġ   Ù Ë
66
Notification Tools:
 ª ¯ ¯Nagiosª ¯
(SMS software for contacting Nokia phones via GSM network)
(alphanumeric pager software)
(paging software)
(command line utility for sending messages to pagers and
Ù SMSĠ
Ò .
ª:
:
ª  Ë1
.
 ÙRegular Expression:
Ġ  ª ­ Ġ   Ù Ë
 ª Ģ ª2
.
perlA
  ÙB
 ªC
6−5Notification Tools
 ª ¯ ¯
phones via GSM network)
(command line utility for sending messages to pagers and
Ù 
Ò 
6−6ª
Perl:
ª  Ë
 Ù
Ġ  ª ­ Ġ   Ù Ë
 ª Ģ ª
1−
2−  Ù
3− ª
67
ÊibÜa@Þ—ÑÜa@ @
@ @
ãbÅåÜa@âïá—m@ @
68
7−1:
7−1
7−1ª Ħ ª  ª hosts.cfgī
Ě ª service.cfgĠcommands.cfg
hostgroup.cfgª  ě ī
ª Ġ ġ ī Ě Øservicegroup.cfg
contacts.cfg  ª  ī
contactgroup.cfg¯timeperiods.cfgª Ø Ģ
ª  ī .
69
7−2­:
 Ĩ  .
­:
• Services
• Service Groups
• Hosts
• Host Groups
• Contacts
• Contact Groups
• Commands
• Time Periods
• Notification Escalations
host:
Hostgroup
Servicedefinition.
host_name
.Alias
IPīFQDN
DNS¯ ī Ù.
Address
ī:ª
ª 
ęparents.
Parents
Ğ(UP or DOWN)
 Ġ Ğ Ĝ Ġ ¯
ª .
check_command
ª  Ħ  ª
Ø60.
check_interval
ت Ò.retry_interval
 ª  Ĝcheck_command
ğ OK
Ĝ.
max_check_attempts
70
ª   ī Øcheck_period
ģ ªĞ)
Ġ(
process_perf_data
ġªª.contact_groups
ªª
 ĠdownUnreachable.Ø60notification_interval
ī ª Ø Ģª notification_period
  ª
:
-d ªDown
-u ªUnreachable
-r ªrecoveries(OK state)
-f  ªflapping
-s ğ  ªScheduled
downtime
-n
 ª Ġ.
notification_options
Ħ ġHostGroup:
  Ó.hostgroup_name
Ħ  ÓHostgroup
.
Alias
Ħ  ÚHostsÓ .Members
Service:
,:
(pop,smtp,http)Pingğ  Ħ Ħ 
­.
71
 ÚĦHostsĦ Ġ
Ħ  Ú
host_name
Ġ
 Ġ.
service_description
Ġ.check_command
Ġ ª  Ĝ ī
check_commandÙ OK
Ĝ.
max_check_attempts
ª  Ħ  ªĠ
Ø60.
check_interval
ª Ø Ģ.check_period
ª
 Ġ OKØ60
ª
Ġ
notification_interval
ª Ø Ģª Ğ ª  ī.notification_period
Ġ  ª
:
-w ªWarninig
-u ªUnknown
-c ªCritical
-r ªrecoveries(OK state)
-fĠ  ªflapping
-s ğ  ªScheduled downtime
-n
 ª Ġ.
notification_options
ª ª ġ
ĦÓ Úª
ġ.
contact_groups
72
ª ġservicegroup:
Óservicegroup_name
.Alias
ª Ġ Ú ÚĦĠ 
servicegroup Ġ 
:
members=host1,service1,host2,service2
Members
Contact:
.
Ģcontact_name
ĞAlias
ĢĦ  Ĩ  ª
Values: 0 = don’t send notifications,
1 = send notifications
host_notifications_en
abled
Ģª Ġ Ĩ  ª
Values: 0 = don’t send notifications,
1 = send notifications
service_notifications_
enabled
Ø ī 
 Ĩ  ªhost_notification_period
ª)ę Ġ(ª ħ Ø 
service_notification_o
ptions
 ªħ ª Ø host_notification_opti
ons
Ú
 ¯
ī
notification_timeout
service_notification_c
ommands
ØĞEmail
73
Ğī Ù
ħ6ī
Addressx
Ğ
Ġ ×0
1ª.
can_submit_comman
ds
ª ġcontactgroup:
ª ġcontactgroup_name
úª ġAlias
ġ    ª Ú
ħ Ġcontactgroup
contact.
Members
ª Øtimeperiod:
 ª Ĝ ªªª Ġ.
úªtimeperiodtimeperiod_name
alias
ª Øtimes
command:
(command)īĠ  ­ ª
Ħ  ª Ħ  ª Ġ ª.Ö....
Ġ
.
command_name
script
Ġ
command_line
 ­D
74
7−3:
:
7−2Ġ
Nagiosħ  ĩ ğ ª Ġ Ĩinsert.pl
Ī  Ĩmap Ù2
ª.
show.cgi­ª ª Ġ ª  ªRRD
Ĩmap ħ  ­
Ġ .
ª ī    ª Ġ ª ØĜ
URLª  ª   ª  Ù.
Nagios
Lookup
RRD Files
mapInsert.p
l
RRDTools
Save
Show.cgi
Lookup
DisplayRRDTools
Graph
Service Info
Links
75
7−4ª :
7−3ª:
criticalØnonOK)Ù(
1. Ënagios.cfg
2.Ġscheduled downtime Ġ )ġ Ġ
 ª Ġ–Ø ª Ġ(ÍĠ
3.falpping)(ª Ù ª ğ
Ù ğ × ª  ğ × ª Ù ª  Ó
4.  Ġ ª
5.notification periodØ ğ Ò Ø

6.Ù  ĠnonOK
−Ġnotification interval)Ġ Ù Í   Ø(
Ø ª ěnotification enabled.
ª−ğ ªÙnonOKnotification enabled
7.Ġ notification enabled
8.Ø.
76
7−3
77
æàbrÜa@Þ—ÑÜa@ @
@ @
‰ïÑånÜa@ì@ÖïÕznÜa@ @
78
8−1ª ª:
 ª  ª  :
•:
.
8−1
ĩĢ  ª Ġ  ħ  ī 
 :
Ħ ª ĠTactical overview
   ª ĠĦService Detail
ªĦhosts Host Detail
 ªĦª ĠHostgroupOverview
79
ġ)ġĦ(ª Ġ
Ó
HostgroupSummary
 ġĦ ª Ġ)­
(
HostGroup Grid
Ġ ªStatus map
ĠĜ  ª)Ù(
  ĠĦÙ
 ª ğ ­ ī Ĝ  ª ğ ĩ
Ĝ
Service Problems
  ª ­.
 ª:Ø ğ)
ğ Ħ ¯(
.
Process Info
Ġ ª.Performance Info
 ª Ġ)(
īÙScheduling Queue
­  ª Ġ ģ ªĦAlert Histogram
 Ë  ª ğ ­)
(
Notifications
 ªĦ) ĢĦ(View Config
:
 Óª Linuxª Windowsú
ġ ġª )Ó
Ó.(
80
•:
× ī ª Ġ īService Detail.
8−2
ğ ġ:Ø Ġ Ġ
Ġ.
ª Ī:80ğOKĦ80−90
Warning90Critical.
¯UnknownĠ Ù Ġ)
(Ù.
Ġ Ī:
CriticalOK
UnknownWarning
81
•:
 īĦ×Host Detail.
8−3
 ĩ)Ġ .(
ª :Ħ ª Ġ
)ª ğ ª ğ.(
Ĝ īĦ: ª Ġ .
82
•:
Ġ ª×Status map.
8−4
ª ğ ī .
8−2:
 ğ ī Ù Ę ª Ġ
ğ ª  ­ Ġ )(.
 ĜĠ)( Ġ )8−5.(
RRD ToolNagios Graph.
ª  Ĝ ī ª :ª Ø
.Ġ  ħ ī
   ª ĝ.
83
Ġ ª  ª:
8−5ğ Ġ crawler
8−6× ªĠgetway
8−7× ªĠgetway
84
8−2−1Ùª×:
ÙĠª×)
NagiosGraph(ħªħinbound trafficĦ¯
ª.outbound trafficªª
)ªØ(ħª.ª
ØħØ.Ħª×
ª.īת úª
ªª ª)×ØÙªª(
Ħ ªªħğ
ª .
8−8ª[3]
ĩĩªĦ Ġª.Ħª
ª ت.
Ùª×.ª×ª
ªØ.Ùª
ªÍª ħª peer-to-peer
ÙÙ.ġÙ 
ªĜğª
ğª×.
85
8−2−2ú
8−9ªØĜ.
8−9[3]
ÙªħĜ¯
ª Ø.
תª 
.Ùħ
ğ­ğª Ġ.
86
8−3ª:
−:
Ħ Ë.
−:
 ú  Í
.
−:
ª ¯  ×
 ª .
−Ğ:
 Ğ:
1–:
× Ĝ ª.
,
2–:
ª  Ğ.
˪User Friendlyę
ª   ħ.
3–Ġ Ĝ:
ĩ Ô  Ġ)
 Ù.(
87
8−4Ğ:
ª  )( ħ ª Ø
 × Ğ Ğ ª Ħ 

ħ:
–:
Ùħ.ĩ
¯ .
ħ ­.
ª−:
Ù ªª .
Ġ:
 Øت
ª  3540
7864
7648
ª81296
Ĝ2532256
ª3216
7972
6864
652
 31120082752009.
88
8ª Ø ª.
ª652208ª)26X8ª(
24000.:
=208) * 24000/652= (75230.
752302150460
ª20000240000
ª00OpenSource..!
190460.
Ī Ğ 
Ĝ  )(  
Ġ
 .
Ğ:Ğ)
.(Ģħ 
.
 ª Ó Ù× ª Ø (Cisco Works)
ġ)ú ħ (
ª ġ ħ ī Ġ
..
ª Ħ  ¯ Ø.
Ĝ ú
Ğ ħ.

 ª.
×Ġ ª  ª ª ª ęġ 
 Ĝ .
ª ª.
ª ę.
89
‫ا‬
   Ë
Ù ªĞ ħ
ªªĝ
 ª  ª
×Ġ ª  ª ª ª ę
ª.
ª Ġ ħ:
ª Ğ Ĝ 
ª ª
ª ę
   Ë

ª
 ª 
×Ġ ª  ª ª ª ę
ª
ª Ġ ħ
−ª Ğ
−ª ª
−ª ę
90
@ @
Öyþ¾a@ @
APERL
91
Practical Extraction Report Language
PERL
:
ToolPowerful ScriptingĜ ª  ī
 ­Linux.
Ġ ª ġ×Linuxĩ  ī
PERL.
ËLarry Wall1987.
ªPERL:
ĩPERL ġ× ª   c.
•Ø Ĝ Ġ ªCompilerLinker
× ×PERL×PERLġ 
Ù.
•Ġ ª   Ġawk  sedħ ª 
Ħ Ħ.
•ġ×  Ù × Ĝ.
•Ù ª ĩ  Ù ġ  Ù ª ĩ.
•ª ġ  Ø ġ ¯Modules
PERL×    ª Ó  ī
.
PERL :
/usr/local/bin/perl
APERL
92
:
×PERLĠLinux ª 
Ħ ġ!
:
#! /usr/bin/perl –w
Print “Hello World!”
PERLBIN×:
#! /usr/bin/perl –w
ª PERLĦ
PERL.
Ġ–wª  × ª Ĝ  ×ģ.
B
93
 Ù
Regular Expressions
:
 Ùregexpregex  ª
­ Ĝ.Ù  Ī  Ğ  ª 
ħ× ªġPERLÒ Ğ   Ù
¯ Engine Ù.
:
Ğ Ø ×  ÙØ Ğ
Ù Ĝ Ë.
Ø ×  ÙØ
@ª ú ī_
ú ªcomnetğ ª Ù.
Ġ:
 ħ Ó  Ħ ġ ħ
.
:]. [
ħ Ó−:
^
Ù.
^Ğ × ġ× 
.
B
94
$
Ù.
$Ù.
^devpedia$
Ùdevpediawdevpedia
devpediawĦ Ù ú ú ęĜ
ú.
.
ġ Ħ.
īÙ × Ù ú ×:
^.at$
 ħ Ġī Ùª Ù:cat, hat, fat
ªúatīú ğ
Ù ú.
īī   Ù ú
Ù:
^..at$
Ĝ ğ  ª úat:heat.…
[
.
]
.
 Ù Ģ  
 Ğ.
:
B
95
^[abcdef]$
ú ÙÓ
ú)(Ģ Ĩ :
^[abcdef][abcdef][abcdef][abcdef]$
īĝ úa, b, c, d, e, fÙ ī
ú ğ Ġ ªú ğ ģ Ĩ.
|
ª.
ī Ħ Ħ Ù ĝ ¯ī ğ  
Ġ| .
^com|net$
Ħ ú Ùcomnet.
(
Ī.
)
Ī.
Ø  Ī Ħ Ī
.
{a,b}
:ú ğ  Ę
 ĘªĜ.
aª)0(ħb
ğğ Ğ Ù.
ú ª ¯:
B
96
* = {0,}
Ù Ù ª.
+ = {1,}
 Ğ.
? = {0,1}
.

.
Ġ × ÙĪ
 
 ğě.
Ó−:
^-
ú ×.

.
ĩ.
^
.
]ú ğ ×.
:  Ģ.
-
.
ú a-z0-9.
C
97
nagios:
Ĝ ī  ªInternet:
•nagios-3.0. .tar.gz
•nagios-plugins-1. .6.tar
•NSClient++-Win3 -0.3.5
•NRPE Addon
ĩ  ª ª ªnagiosĩ  ª 
ª Ġ
nagiosLinux open Suse:
ħ  packages
•Apache
•C/C++ development Libraries
1−ª:
Become the root user
Su –l
Create a new nagios user account and give it a password
/usr/sbin/useradd -m nagios
passwd nagios
Create a new nagios group. Add the nagios user to the group.
/usr/sbin/groupadd nagios
/usr/sbin/usermod -G nagios nagios
Create a new nagcmd group for allowing external commands to be
submitted through the web interface.
Add both the nagios user and the apache user to the group
C
98
/usr/sbin/groupadd nagcmd
/usr/sbin/usermod -G nagcmd nagios
/usr/sbin/usermod -G nagcmd wwwrun
−nagios)Compile and Install nagios(
mkdir ~/downloads
cd ~/downloads
Extract the Nagios source code tarball.
tar xzf nagios-3.0. .tar.gz
cd nagios-3.0.
Run the Nagios configure script, passing the name of the group you
created earlier like so:
./configure --with-command-group=nagcmd
Compile the Nagios source code.
make all
Install binaries, init script, sample config files and set permissions on
the external command directory:
make install
make install-init
make install-config
make install-commandmode
Don’t start Nagios yet - there’s still more that needs to be done...
3−ª)Customize configuration(
 Ĝ ª ª
/usr/local/nagios/etc
ę   contacts.cfg  
/usr/local/nagios/etc/objects/contacts.cfg
C
99
ª ī ī Ù
vi /usr/local/nagios/etc/objects/contacts.cfg
−)configure Web Interface(
Install the Nagios web config file in the Apache conf.d directory.
make install-webconf
Create a nagiosadmin account for logging into the Nagios web
interface. Remember the password you assign to this account - you’ll
need it later.
htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin
Restart Apache to make the new settings take effect.
service apache restart
5−Nagios plugins:
Extract the Nagios plugins source code tarball.
cd ~/downloads
tar xzf nagios-plugins-1. .11.tar.gz
cd nagios-plugins-1. .11
Compile and install the plugins.
./configure --with-nagios-user=nagios --with-nagios-group=navies
make
make install
6−Start Nagios
Add Nagios to the list of system services and have it automatically
start when the system boots.
chkconfig --add navies
chkconfig nagios on
Verify the sample Nagios configuration files.
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
C
100
If there are no errors, start Nagio
service nagios start
−Login to the Web Interface
You should now be able to access the Nagios web interface at the
URL below.
You’ll be prompted for the username (nagiosadmin) and password
you specified earlier.
http://localhost/nagios/
īService DetailÒ ¯  .
NRPE:
nagios-plugins-1. .6.tar.gzª Ġ
1−ª:
Become the root user. You may have to use sudo -s on Ubuntu and other
distros.
su –l
Create a new nagios user account and give it a password.
/usr/sbin/useradd nagios
passwd navies
−nagios:
Create a directory for storing the downloads.
mkdir ~/downloads
cd ~/downloads
Extract the Nagios plugins source code tarball.
tar xzf nagios-plugins-1.4.6.tar.gz
cd nagios-plugins-1.4.6
Compile and install the plugins.
./configure
make
make install
C
101
The permissions on the plugin directory and the plugins will need to be fixed
at this point, so run the following
commands.
chown nagios.nagios /usr/local/nagios
chown -R nagios.nagios /usr/local/nagios/libexec
−NRPE daemon:
cd ~/downloads
Extract the NRPE source code tarball.
tar xzf nrpe-2.8.tar.gz
cd nrpe-2.8
Compile the NRPE addon.
./configure
make all
Install the NRPE plugin (for testing), daemon, and sample daemon config
file.
make install-plugin
make install-daemon
make install-daemon-config
Install the NRPE daemon as a service under xinetd.
make install-xinetd
Edit the /etc/xinetd.d/nrpe file and add the IP address of the monitoring
server to the only_from directive.
only_from = 127.0.0.1 nagios_ip_address
Add the following entry for the NRPE daemon to the /etc/services file.
nrpe 5666/tcp # NRPE
Restart the xinetd service.
service xinetd restart
D­
102
 ­ Ĝ Ë :
Host:
define host{
host_name bogus-router
alias Bogus Router #1
address 192.168.1.254
parents server-backbone
check_command check-host-alive
check_interval 5
retry_interval 1
max_check_attempts 5
check_period 24x7
process_perf_data 0
retain_nonstatus_information 0
contact_groups router-admins
notification_interval 30
notification_period 24x7
notification_options d,u,r
}
HostGroup:
define hostgroup{
hostgroup_name novell-servers
alias Novell Servers
members netware1,netware2,netware3,netware4
}
Service:
define service{
host_name linux-server
service_description check-disk-sda1
check_command check-disk!/dev/sda1
max_check_attempts 5
check_interval 5
retry_interval 3
check_period 24x7
notification_interval 30
D­
103
notification_period 24x7
notification_options w,c,r
contact_groups linux-admins
}
Servicegroup:
define servicegroup{
servicegroup_name dbservices
alias Database Services
members ms1,SQL Server,ms1,SQL Server Agent,ms1,SQL DTC
}
Contact:
define contact{
contact_name M.Mohammad
alias Moustafa Najm
host_notifications_enabled 1
service_notifications_enabled 1
service_notification_period 24x7
host_notification_period 24x7
service_notification_options w,u,c,r
host_notification_options d,u,r
service_notification_commands notify-by-email
host_notification_commands host-notify-by-email
email Moustafa-MN@localhost.
address1 xxxxx.xyyy@neotech.com
address2 555-555-5555
can_submit_commands 1
}
ContactGroup:
define contactgroup{
contactgroup_name novell-admins
alias Novell Administrators
members Moustafa,Mohamad
}
D­
104
Timeperiod:
define timeperiod{
timeperiod_name misc-single-days
alias Misc Single Days
2008-01-28 00:00-24:00 ; January 28th, 1999
monday 3 00:00-24:00 ; 3rd Monday of every month
day 2 00:00-24:00 ; 2nd day of every month
february 10 00:00-24:00 ; February 10th of every year
february -1 00:00-24:00 ; Last day in February of every year
friday -2 00:00-24:00 ; 2nd to last Friday of every month
thursday -1 november 00:00-24:00 ; Last Thursday in November of every year
}
Command:
define command{
command_name check_pop
command_line /usr/local/nagios/libexec/check_pop -H
$HOSTADDRESS$
}
Servicedependency:
define servicedependency{
host_name WWW1
service_description Apache Web Server
dependent_host_name WWW1
dependent_service_description Main Web Site
execution_failure_criteria n
notification_failure_criteria w,u,c
}
Serviceescalation:
define serviceescalation{
host_name nt-3
service_description Processor Load
first_notification 4
last_notification 0
notification_interval 30
contact_groups all-nt-admins,themanagers
}
D­
105
Hostdependency:
define hostdependency{
host_name WWW1
dependent_host_name DBASE1
notification_failure_criteria d,u
}
Hostescalation:
define hostescalation{
host_name router-34
first_notification 5
last_notification 8
notification_interval 60
contact_groups all-router-admins
}
Hostextinfo:
define hostextinfo{
host_name netware1
notes This is the primary Netware file server
notes_url http://webserver.localhost.localdomain/hostinfo.pl?host=netware1
icon_image novell40.png
icon_image_alt IntranetWare 4.11
vrml_image novell40.png
statusmap_image novell40.gd2
2d_coords 100,250
3d_coords 100.0,50.0,75.0
}
Serviceextinfo:
define serviceextinfo{
host_name linux2
service_description Log Anomalies
notes Security-related log anomalies on secondary Linux server
notes_url http://webserver.localhost.localdomain/serviceinfo.pl?host=linux2service=Log+Anomalies
icon_image security.png
icon_image_alt Security-Related Alerts
}
106
‫ﺍﳌﺮﺍﺟﻊ‬‫ﺍﳌﺮﺍﺟﻊ‬‫ﺍﳌﺮﺍﺟﻊ‬‫ﺍﳌﺮﺍﺟﻊ‬
1. Network Management Principles and Practice ‐ Mani Subramanian
2. Simple Network Management Protocol, tutorials by Dr. Andreas Steffen
3. ‫ا‬ ‫ول‬ ‫ا‬ ‫ت‬ ‫ا‬:‫أ‬ ‫ا‬ ‫إ‬
4. http://www.adsh2007.com/vb/Arabic_CCNA/CCNA_ARABIC_4/
5. http://wndw.net/
6. http://www.nagios.org
7. http://www.nagiosexchange.org
8. http://nagioswiki.org/wiki/Addon:NagiosGrapher
9. http://sourceforge.net/project
10. http://nagios.demo.netways.de/
11. http://www.novell.com/coolsolutions/feature/19843.html
12. http://nsclient.org/nscp/
13. http://www.linux-ar.org/forum/
14. http://www.tech-faq.com/firewall.shtml
15. http://en.wikipedia.org/wiki/
16. http://www.nagioscommunity.org/wiki/
17. http://nrpe.org
18. www.itrainonline.org/itrainonline/mmtk
19. http://en.wikipedia.org/wiki/Comparison_of_network_monitoring_systems

Mais conteúdo relacionado

Destaque

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 

Destaque (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

Monitoramento de Redes com Nagios, SNMP e Ferramentas de Análise de Tráfego

  • 1. ] ^ S] ^ S] ^ S] ^ S^ a ^^ a ^^ a ^^ a ^ ^ [ _ ^ [ _ ^ [ _ ^ [ _ WWWW ........_ [S_ [S_ [S_ [S aaaa 2008-2009
  • 3. ‫ﺍﻟﺮﺣﻴﻢ‬‫ﺍﻟﺮﲪﻦ‬‫ﺍﷲ‬‫ﺑﺴﻢ‬ ‫ﺇﱃ‬ ‫ﻣﻬﺪﺍﺓ‬‫ﺇﱃ‬ ‫ﻣﻬﺪﺍﺓ‬‫ﺇﱃ‬ ‫ﻣﻬﺪﺍﺓ‬‫ﺇﱃ‬ ‫ﻣﻬﺪﺍﺓ‬ ............................................................................................................... ............................................................................................................... ............................................................................................................... ............................................................................................................... @×aŠìÿa@Þ»cNNN@ @ Èc@¶g@béïÐ@knÙm@óÔŠì@‘båÜa@NNN ôÑĒ—à
  • 4. öa‡èfia@ @ @óî‹“jÜa@×ì‹È@À@óîa‡:a@Šíä@„š@ñ‰Üa@‹èbĒÜa@†aüÑÜa@¶gNNN@ @ @7©a@‘båÜa@âÝÉà@¶g@NN@òa‡:a@béi@#dî@Üa@òbÙ“¾aNNN@ @ @¶g@óïäbäfia@ß펊@NN@µ¾bÉÝÜ@ó¼Š@ÞŽŠc@æàNNN@ @ @@bä‡ïŽâÝŽ@ì@êïÝÈ@!a@ôÝ–@‡á« @öbȇÜa@Þ¸@ý@Üa@ëbÑ“Üa@ì@çbå¨bi@ïÑî@ñ‰Üa@kÝÕÜa@¶gNNN@ @ æà@óuíåà@Ãíï£@ôm†bÉŽ@oØby@æà@¶abéjÝÔ@NNN@ @ @vÉm@‹¢@¶gêø aí’@À@펋m@çc@pbáÝÙÜaNNN @béïà‡Ô@o¥@óå§a@oäbØ@æà@¶gNNN@ @ ðàc@ @ @óäbàÿa@ì@óÝï›ÑÜa@?áÝÈ@ì@Öî‹ĒÜa@ðÜ@Šbäc@ñ‰Üa@ÞÉ“¾a@¶gNNN@ @ @†ìŠíÜa@ÒĒÕÜ@Ûaí’ÿa@×íÐ@7Üa@l‰ÉnŽa@æà@¶gNNN@ @ @öbårÜa@ŠbÅnäa@çì†@öbĒÉÜbi@jåî@ñ‰Üa@kÝÕÜa@¶gNNN @ì@×þ‚ÿa@ðÔbáÈc@À@ËŠŒ@æà@¶g@âïÕÜaNNN@ @ ðic@ @ @öbĒÉÜa@a‰è@ì@çbå¨a@Ûaˆ@ÞÄ@À@oÈ‹È‹m@Üa@†ìŠíÜa@¶gNNN@ @ @ð÷b8@À@óøa@ãívåÜa@ì@L@ò‹›åÜa@ò‡øÐÿa@¶gNNN@ @ @öbÐíÜa@ì@ׇ—Üa@ðÉà@aíÉšŠ@æà@¶gNNN@ @ ðmí‚c@ @ †@N@‹èbà@†@@L@NŠ†bÕÜa@‡jÈ@L@‡¼c@L@äc@@LÚÜbà@ @
  • 5. ðmaí‚c@ @ @L@ßbéäãNL@çbºg@†NöbÑ–@ @ @öbåic‚cðmí@@@@@@@@ @ µÜ@L@‡¼c@@L@ßíni@@L@@µà7ä@‡á«@L@óîe@L@ @ ÿaöbÔ‡–@@ @ @ójyÿa@ÞØ@¶gNNN@ @ @ @ ôÑĒ—à@ @ 13/07/2009 @ðmbïy@çbni@À@ÖibäŒ@¶g@L@óåu@À@µybîŠ@ì@ñ†aüÐNNN@ @ @ñbïä†@À@ò‹ĒÉÜa@†ìŠíÜa@ì@L@óÉäbïÜa@ŠbèŒÿa@¶gNNN@ @ @ðyìŠ@â÷aím@ì@=ÝÔ@pbvÝ‚@¶gNNN@ @ @@@L@ßbéä ò7Í—Üa@7Ðb—ÉÜa@¶g@L@óznÑn¾a@âÈa5Üa@ìNNN@ @ @ߍÍÜa@‡÷b—Ô@¶g@LŨ@쀀@ŠbÍ—Üa@@pbNNN@ @ @òbï¨a@óái@ì@L@óÜíÑĒÜa@òöa‹i@¶gNNN@ @ @@@@µÜ@L@‡¼c@@L@ßíni@@L@@µà7ä @öbÐíÜa@Þ@Lì@‚ýa@Êjåà€@öb@Lì@‡ï–Šñ@À@¨a€€€€€€òbï@NNN@ @ @kÝÕÜa@æà@öauc@béma†‹Ñà@ì@béÐì‹y@óÍÜ@‡Éi@aíÈ6²@%NNN@ @ @@óÝàbØ@bénc@âÙnî‡èÿNNN@ @ @@@ójyÿa@ÞØ@¶g @@@ðy@7áš@ì@‹èb @kÝÔ@ÞØ@¶g@@NNNNNNN@ @ ôÑĒ—à 13 @ðmbïy@çbni@À@ÖibäŒ@¶g @ñbïä†@À@ò‹ĒÉÜa@†ìŠíÜa@ì@L@óÉäbïÜa@ŠbèŒÿa@¶g @ðyìŠ@â÷aím@ì@=ÝÔ@pbvÝ‚@¶g ò7Í—Üa@7Ðb—ÉÜa@¶g @ߍÍÜa@‡÷b—Ô@¶g @òbï¨a@óái@ì@L@óÜíÑĒÜa@òöa‹i@¶g g@¶cè€@öbÐíÜa@Þ @kÝÕÜa@æà@öauc@béma†‹Ñà@ì@béÐì‹y@óÍÜ@‡Éi@aíÈ6²@% íÝÉÐ@íÜ@ìa@ @@@ðy@7áš@ì@‹èb @kÝÔ@ÞØ@¶g
  • 6. çbЋÈ@ì@‹Ù’@óÔbĒi@ @ Ù ğ..¯ ­ Ħ ª Ģ. Ğ ª ¯ Í ħ Ù.. ..ħ– Ę − Ú Ø Ú Ù. ě Ĩ ĩ ت Ù. : Í ú. ħ ª Ú: × 13/07/2009
  • 7. @ @ ª ..ª ğ ª Ġ ª Ħ ª ¯ ......... ¯ Ĩ... ú.. Ì ¯... Ú × ª.. @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ôÑĒ—à@ @ 13/07/2009 Moustafa õ‹Ø‰ÝÜ@óÑÔì@ @ ... ... ..ªª ......... ğ ª Ġ ª ...Í ª ¯... ¯ Ĩ ª ğ ... ħ Ú ...Ì ¯ ¯ ­ ...! Ú × ú ğ Ù ú. ª..ª @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ MN@Hotmail.com-Moustafa ¯... ğ ª Ġ ª ... .. ħ Ú ¯ ­ Ú × ú ğ Ù ú ª @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
  • 8. :..........................................................................4 1−1.................................................................................................5 1−2.........................................................................................5 1−2−1.................................................................................5 1−2−2 ú .............................................................................6 :ª ª.................................................................7 2−1ª.............................................................................8 2−1−1ú.............................................................................8 2−1−2..............................................................................9 2−1−3ª ª .....................................................9 2−2ĪOSI.............................................................................10 2−3ÙSNMP‫و‬CMIP............................................................................12 2−4SNMP........................................................................................13 2−5ªMIB...................................................................17 2−6SNMP....................................................................................19 2−6−1ª ª....................................................................23 2−7RMON...................................................................................24 :ª..........................................................................26 3−1ĩ....................................................................................................27 3−2..........................................................................27 3−3Ò..................................................................................28 3−4WAN........................................................................28 3−5ª..................................................................................28 3−6...........................................................................................30 3−7ª......................................................................................31 3−7−1ªSpot Check Tools................................................31
  • 9. 3−7−2ªĜª ×Protocol Analyzers.....................................32 3−7−3ªĜĪTrending Tools..................................................33 3−7−4ªThroughput Testing...................................36 3−7−5ªğ Realtime................................................37 :...............................................................................38 4−1..............................................................................................39 4−2Ĝ.......................................................................................40 4−3.................................................................................46 Ġ:Ĝ...........................................................................48 5−1...........................................................................................49 5−1−1ª ú...............................................................49 5−2ª ........................................................................................50 5−2−1ª...............................................................................50 5−2−2ª ........................................................................50 5−2−3ª.......................................................................51 5−2−4...................................................................................54 5−3Ù ª ...................................................................................57 : ª.....................................................................58 6−1.............................................................................................59 6−2Nagios........................................................................................59 6−2−1Windows machines.........................................................61 6−2−2Linux machine..................................................................62 6−2−2−1NRPE.............................................................................62 6−2−3Network printers...............................................................64 6−2−4Routers And Switches.......................................................64 6−3RRD Tool..........................................................................................65 6−4Nagios Graph....................................................................................65 6−5Notification Tools..............................................................................66 6−6ª.............................................................................................66
  • 10. :.............................................................................67 7−1........................................................................................68 7−2­............................................................................................69 7−3................................................................................74 7−3ª ..................................................................................75 :.....................................................................................77 8−1ª ª......................................................................................78 8−2..........................................................................................82 8−2−1Ù.................................................................84 8−2−2ú................................................................85 8−3ª..............................................................................................86 8−4Ğ.............................................................................87 ĩ Ġ....................................................................................................................89 ....................................................................................................90 A:ġ×PERL.........................................................................................91 B: ÙRegular Expressions........................................................................93 C:ª.............................................................................................97 D:­.........................................................................................102 .......................................................................................106
  • 12. 5 1−1: Ø ª ğ ª ğ ª ğ ª ª × Jone.M.Maklayª Ù Ġ: Ī Ĝ × Ù ğ ğ . ª ħ ğ × ª Ħ. ª Ħ ħ ú ª ġę Ø Ħª ě . )(: •/ª ě. •Ğª ­. • ª Ĩ Ó ª ­. •ğ ª ĝ. īÙ ª×Ġ. Ø ª ! 1−2: 1−2−1: Ø (Neotech) ª ª Ĩ)Ħ ­ Ô ( ...Ĝ ī):ě ­80(ħ ª .
  • 13. ª Ĝ Ġ ī ª ª ª ª Ğ Ħ ĦMTBF. ę ª. Ø . ª Ġ Ģ ª ª: Ġ ī ª Ġ ª Ĝ. Ø × ª Ĝ ªSMS. (Windows , Linux). 6 ú : : ğ. Ġ Ħ:ª )ª ī. ( :Ĝ . :Ġ ī ª ª ª ª Ğ ªError RateĦ Ħ :ę Ħ ª Ø ª Ġ Ģ ª ª Ġ ī ª Ġ ª Ĝ Ø × ª Ĝ ª ªScriptsĠ. ª . ğ . ª ě(Windows , Linux) . 1−2−2 ú −ğ −Ġ Ħ − . − ª ª ª ª Ğ :ª − Ħ ª 1−Ġ ī ª Ġ ª Ĝ 2−Ø × ª Ĝ ª 3−ª 4−ª 5−ğ 6− ª ě 7−
  • 15. 8 2−1: Ù ī. Ħ. . ª īĦ. ę Ùª ī. 2−1[1] 2−1−1ú: Ò: •: Í. •: ªªªª ī. •Ġ Ħ Ĝ:Ġ Ī . • ª:ª Ħ ª. •:. •:ę ª
  • 17. 10 2−2ĪOSI: Ù (ISO)Ğġ ĪOSI. Ģ: • •ª •ª • ­Ëú Ī ħ OSI. 2−2Ī[1] Ī):( Ī ª(agent)ħ Ù. ħ ª ª .
  • 18. 11 ª Ī: ª ª Ī ģĝ.ª ª ĝ ª(MIB)ª)ISOÙ (ª(SMI) ª MIB. Ī: ª ª Ī Ħ.× ģ Ħ ª. : ª (NMS).Ī OSIĪFCAPS: Īª Ħ.
  • 19. 12 2−3ÙSNMPCMIP: ª Ù × Ù .: •ª:ġ Ø ġ(IETF) •ª:ª ġ ÙSNMP)ª(Ù ġ ħ ªªª ª ġ.ËSNMP) ª(TCP/IP)/Ø(1989 Ù.ú Ë2cSNMPSNMPv2c 1993.ªSNMPv2c ª Ø ª Ĝ ª(SMI)ª ×.Ë ªOSI) Ħ ( ªTCP/IP. ËSNMPv3.ªSNMPv3ħMIB)ª( ğ(packet)× ÙğSNMPv1SNMPv2c. CMIP)ª(OSI)Ħ (Ġ Ù ISO)Ù (ú ª.
  • 20. 13 2−4SNMP: SNMP)ª(ª Ħ.SNMPğ ª ª ħ (packet)ª × TCP)( ת. SNMPª ªĞ. Ħ Ù ª SNMP.SNMPĞ ĩ Ġ ª ġ ª ª. ªSNMP: • • •ª • NMS)(ī×. × ġ(NMA).NMA ª Ħ. ªħ× .×SNMP)ª( ī ę.ª ªªªNMS NMSªÙ.ĝª ĠĠ ª.: • Ġ. •ªğ(packet)Ğ. •(router)ª Ù. •. • ª.
  • 21. 14 NMS)(MIB)ª.( NMS. Ħ ­ Ġ. SNMP)ª((UDP)161 162.×.¯: •Get – ĩªMIB. •Set –ª Ħ ĩMIB. •Trap –ĩ(agent). ª. ­Ø SNMP.ª ĝ Ĝ Ģ. ª Ī ª ğ .ª ğ ĝ proxy.Øproxy SNMPú Ī – ģ –ú .ªħ ú (proxy) SNMP ħ. 2−3 Ī ª−ª[4]
  • 22. 15 2−4 Ī ª−ª[4] ª× ħ(RMON).× RMON ªª . NMS)(Ī.Ģ Ù(RAM) ª . ª ġĪTCP/IP)/Ø.(ª ª . ªCiscoworks2000HP OpenviewSNMPv2c. 2−5 Ī[4]
  • 23. 16 ħ ª )2−6(. Ù × NMS .NMS –NMSNMS(client). ª ħ Ġ)2−7.(¯ Ğ ªNMSĠ ª ę ª×NMSÙ)2−8.( 2−6[4] 2−7Ù[4]
  • 25. 18 ĩMIBª Ø ªĞ.MIB MIB Ħ ª ĩ . ËSMI MIB ª ġ Ì ħ114.ĩ ª ÓMIB-II Ĝ MIB-I. ª SNMP)ª(. ª ĩ ª .ī ª ª.ú Ģ ª .Ó Ğ ú(ASN.1). 2−10ª ª[4] SNMPª ªª ÙMIB. Ó ªMIB)ª( ī Ë RFC)ª ª.( īhttp://www.ietf.org/. ª Ħ MIBĠ.Ĝ Ĩ .
  • 26. 19 2−6SNMP: (agent) ġ (router)ª(switch)ª Ó(hub)ª ª . ª ĞSNMP)ª( .× Ë ª Ù Ĝ MIB)ª( . 2−11ª[2] SNMP Ħ.Ò × ĩ × ª.ËØ ª Ħ.× ªSNMPv1)1.( ¯SNMP)ª(NMS) .(GetRequestGetNextRequestSetRequest. GetResponse. ğMIB)ª(.
  • 27. 20 2−12ª×SNMP[2] ÔSNMPv2c SNMPv1.Ë ª GetBulkRequestª64ħMIB. ª ÍGetRequestGetNextRequestЪ . ğ ÙSNMPv1.Ğ GetBulkRequestª . ª Ğ64ª ª Gigabit Ethernet. NMS)()2−12(. ª ğ(agent). ª ğ.ª Ô ¯ Ø Ë .Ø Ë ª ī Ë Ħ Ë.
  • 28. 21 2−13ª[2] ª Ø.¯ Ğ ª Ù. ĩ SNMP)ª.( Ħ Ğ .ħ ğ .ت .Ø ¯ ­ ª WAN).( ª Ğ .ª Ğ . ğª .ª ª. SNMP)ª(ª (UDP)× . UDP)connectionless(ī SNMP.SNMPĜ SNMP. ĜSNMPÙÓ(community string). ħ Ó.ĞSNMPv3ª ÓÙ.
  • 29. 22 2−14SNMPV1[2] SNMPv2c.ī × ØRFC1905. 2−15SNMPV2[4] ÓÙ Ù Ĝ Ë ğġ ĩ ª ×ÙÙ ª. Óġ ĩSNMPv2 ª.ġSNMPv3. ª SNMP)ª( Ó ę.ª Ó ÙĠ Ù SNMP.
  • 30. 23 Óª Ø SNMPv1.CiscoSNMPv3ª ª SNMPv3)2−16(. 2−16SNMPV3[2] SNMPv3Ī. 2−6−1ª ª:
  • 31. 24 2−7RMON: ĩRMON)(ª.ĜMIB)ª ( ĠMIB-IIª.¯ RMONª ġMIB Ù SNMPSNMP. MIB-IIğÒ ª . LAN)((agent)×SNMP. SNMP úMIB-II úLAN. 2−17RMON MIB[1] ª .
  • 32. 25 ËRMON)(IETF RFC 1271RFC 1757ª ÙªLAN. (agent) ª ª Óěġ ªĜ ğ(frame). RMONª ġ ħ Ethernet ġ RFC 1513Token Ring.ËRMON (agent)ÓªĨ(client)SNMP )ª.(ªSNMP MIBª ġ Ğ EthernetToken Ring RMONª Ħ RMON.ª ġRMON: •ª ġ:ª Ĝ Ġ .Ø ¯ ­CRC) (Ù. •ª Ò ġ:ª Ĝª ġ Ĝ ĝ.ğ(packet). •ġ:ª Ø ĦĦª (agent). . • ġ: ª Ĝ ª. ğ ª. •ġTopN:TopNĦ ġ ª. • ª ġ:ª ĝ. ªğ. •ġ:¯ Ģ ª. •ğ ġ:ğ ĝ Ĝ. •ġ: . .
  • 34. 27 3−1ĩ: תěĜª Ùª ¯ħª .ªĞªª ħě ğħª. ª: •ª Ġ • • •Ø •ªª •ªÙ¯­ğ •ØISPĠ­ 𪠪Ù. •Ī ª ġ ª. 3−2: ­ØĦ50ª :×Ø ª.Ø ×Ø Ù(Spam)ğ )(ÙĦ . ġħğħ ª ě.ġğġ­ ğ. ħ.ú­ ğħת ě­ğ
  • 35. 28 3−3Ò: ª­ ĨªÒ. Ò: •Ù •úª Ù •úĦ Ħ •×ª ěª 3−4WAN: ħªÒªÓ­ğ ªØØ ªħÒ. ªĠª×WANªħ )(ÙÒ. ªĠ: •×Ø×¯× Ø¯. •ª ×Īğª. •úĦ ĦØ. 3−5ª: ªğª­ğ .Ùªħت دª ­ğª .×ħ¯ ­ğª . 3−1ªª .
  • 36. 29 3−1ª [3] ¯ØğªÙ Ù. īÓĦğØ ħت.ĩ ġª . ĞĦ ÙØØ.ħ Ø. .Ġ .Ĩħ. īúĠīª Ħ ª Ğīª Nagiosª ě תª Ġ. ī×ħ­×ªª× ªÙSMS×Ø. ª×ª­Øת Ĩªģ
  • 37. 30 ª ě.īğªúª Ğ.ĨĜ .ġ Ħ . 3−6: Ħ. Ĝ¯ªª ¯ Ò Ù¯ ¯­ğת Ġªª ¯. : 1.×:ªĞªġ )­ğªª ġ×(ª ª. 2.úĦ :īúª ª Òħª Ġğ. 3.úª Ù:ĩħª Ùĝª ª Ù­ğª Ø. 4.Ğ:īħ ªĠğĜ . 5.Ħ ĜÙ:Ħ Ĝª תħ. 6.ĝ:ğ­ğ ĞĦ ­.
  • 38. 31 ğğÙª ġ× ġĨ. ª ­. 3−7ª: ª.ªcheckSpot­ ª Ø.ī×Ping ªĦ.ת ª ×Analyzers Networkªªĩ× ×)Ĩªª ªØ ×.(ªĜĪTrendingĨª Ø ª Ħªğ real- time monitoring.ª throughput testingªğ ­ª ĦĦ ªdetectionintrusionúªÙÙ ªª ĝ)ú/.(ª benchmarkingĠ. 3−7−1ªSpot Check Tools: •Ping: Ĝ)ĨWindowsMac OS XGNU/Linux (BSD.pingĜØICMPÒ Ĩ×ĝğ. ğØ ğTime To Live (TTL)ğÙ ĦğªÒĦğª.Í pingª¯¯DNS Ú¯.DNS
  • 39. 32 IPØ.ÍħěĨ .ÍØ.Í ØIPÒ. •Traceroutemtr)http://www.bitwizard.nl/mtr/( tracerouteping)tracertª ītracerouteĠĦğªÒ Ø: $ traceroute -n google.com traceroute to google.com (72.14.207.99), 64 hops max, 40 byte packets 1 10.15.6.1 4.322 ms 1.763 ms 1.731 ms 2 216.231.38.1 36.187 ms 14.648 ms 13.561 ms 3 69.17.83.233 14.197 ms 13.256 ms 13.267 ms 4 69.17.83.150 32.478 ms 29.545 ms 27.494 ms 5 198.32.176.31 40.788 ms 28.160 ms 28.115 ms 6 66.249.94.14 28.601 ms 29.913 ms 28.811 ms 7 172.16.236.8 2328.809 ms 2528.944 ms 2428.719 ms 8 * * * Ġ–ntracerouteÚ¯DNSħ. ªªę¯ĦÒĦª Ò. Ò. My TraceRoute (mtr)pingtraceroute.ī ×ğÙªª pingtraceroute. 3−7−2ªĜתProtocol Analyzers ª ġĜת٪ × ª.īª ġת ª¯ªª ħª 802.11.ġª ġ×Ù)Ó(ת:
  • 40. 33 •cpdumpt)http://www.tcpdump.org/( command lineª Ęª wireshark¯.ī ě­ªªħlink layerī­ ªªħªÒğ­ªĜ . •Wireshark)/http://www.ethereal.com.( תUnixWindows× ª ġĜתÍ. Wiresharkª×Ģª ­ªğ.ī­ª ªĨªØħªÒğ. Wiresharkª تª .TCP 3−7−3ªĜĪTrending Tools ªĜĪتĨ ­).(ªĜĪ ªĜ. ªª ġę. ªĜĪ.: •MRTG)/http://people.ee.ethz.ch/~oetiker/webtools/mrtg( ªªMulti Router Traffic Grapher (MRTG)Ĩ¯ªSNMP ĩª.­ª.
  • 41. 34 •Ntop:http://www.ntop.org/ ğª.ī RDDtool. ÙÔ ­ª ĩ .Mac OS XBSDGNU/LinuxWindows. ª ntop: •­Ù)×MACÖ(. •ěª×. •ªªĦ. •ªªª NetFlow. •Ĝ. •Ĝªª ġ.P2P •. •ġªAPIPythonPHPPerl. ÙªGNU/Linux ÙªRedHatDebianUbuntu. Ô ğªª. ntopÙªğ ØĢ. •Cacti:http://www.cact.net ğªRDDtoolĜĘª ª MySQL.PHPħª ħ ěªSNMPġ× ī. ĨCactiěªª ěú .
  • 42. 35 •NetFlowhttp://en.wikipedia.org/wiki/NetFlow ªªØIPCiscoª : Cisco IOS NetFlowġª ĠªØIP ªªĝªªúĠDenial of Service.תª ¯ª. īª CiscoªNetFlowUDP× ×Ô CPU×SNMPğ תØ.ěª ġ×NetFlowĢª­.ī×Ĝ ª×Ùª×. •Flowchttp://netcad.kiev.ua/flowc ªªNetFlowÙğ.Flowc ªMySQLªªÓīª ª ×.Ĩ ×HTMLª. •Argus:http://qosient.com/argus/ ħªAudit Record Generation and Utilization SystemÙħª Ħ. ArgusØ: ArgusªªªĠÙ jitter×īª ªěª× ª×Ęªĩ× .Argusª ě.ArgusĪ ğĦª:PushPull×ě
  • 43. 36 ª.ª ġArgusª . ArgusĦĦ:ġMaster Collectorª clientÓ­ª.Argus BSDGNU/LinuxUnix. ªĜĪ Nagios­. 3−7−4ªThroughput Testing ªĜī ğª×ª ª. ت)http://www.dslreports.com/stest http://speedtest.net(ª ĠÙ. ĩ Ø. ªªÒ. •Bingen.shtml-http://fgouget.free.fr/bing/index ªĨ ĦĦĜªªğICMP.ī ªěªğħª Ùª. ībingªÙĦ ĝªĠğħ ­úªªICMP.ĩ ­ğğğħ¯ ªÓ.
  • 44. ˪ ġ× . úĦ . īת úÙª ª SMBª Ĝ .Snort ×ħª Ĩ ĜÙ ĦNagiosCacti. ª × 37 ğ Realtime ª ħ ª ġ×Ħ. http://www.snort.org snifferªī ªī ª.ī×ú ªª­ġ×CGI OS fingerprintingÙ . SnortĜğª .Snortğğ ġSnortĜ ú. http://www.zabbix.org/ ī ªMySQLª Ĝ )ªª SNMP.( 3−7−5ª ×úª . ħ ª ġ× •Snorthttp://www.snort.org × ª Ò ªª OS fingerprinting × ­ Ħ . •Zabbixhttp://www.zabbix.org/ Ę SNMP
  • 46. ADSLÒ ª ī ª DMZ : 39 : × Ħ Ħ ĦADSL × Ġ. ª ī ª ×FirewallĠ Ģ. 4−1 −office1 4−1 × Ħ Ħ Ħ × Ġ ª ī ª ×
  • 47. 40 4−3office2 ú ª . 4−2Ĝ: •Crawler ª Ø ª Ĩ ¯web crawlerweb spiderweb robotautomatic indexer. ªweb crawlerĞ ¯ ¯ Ĩª ª Øcrawler­ Ùħ ª tagsÓ ª crawlerĜ ¯ ªª . ª crawler ª Ó Ø ª ª Ĝ.ī Ø ªī ª ġ ī Ĝ)(.
  • 48. 41 •ĞFirewall ĞğFirewall× Ùª Ġħ. īĜħ𪪠Ĩ ªğªª ØĠĞğĦğª تĠ ġĦĦ. ЪªªØ Ğħتħ ØĨª. ĞģÙØ Ğª Gateway DevicesØĠ ËЯ. 4−4Ğ[14] ª ġ×:IP Tabels
  • 49. 42 •Ø ×Email: ª ×: ×SMTP:(Simple Mail Transfer Protocol) Ø Ħ. ğ × ħ. ,ħī, ú Ĝ. SMTP”Push“, . ğ Ù . ĝ, × Ò ª . ×Webmail,ħ HTML ¯Ø. SMTPª Ħ ×,ĝ ħ. POP:(Post Office Protocol) Ø × ×, ğ ğ. ¯ ×.”PULL“, ğ . ğ POP3. ¯ ħ × ª ğPOP3,Ĩ × POP3 ĩ. ¯ ħ. ħPOP3¯ ħ,ğ ī .Ĝ × ¯.× Ĝ Ë ¯ ØĜ ÍúÍ ú Ĝ.
  • 50. 43 × ħIMAP: ª × × ĢĜ. ª ª Ĝ.ī ú. Ø × : :Frontend ĝDataBase)Backend(Ø BackendĦ ×IMAPPOP. Ġ:Backendĩª(DataBase). ª ×SMTP)(IMAPPOP)( ĠPOPIMAP. ª ġ×: Mail Getway (Frontend):(SMTP)postfix+(IMAP POP)Courier Mail.MTN.DataBase (Backend):Courier mail Server •DHCP: Ĝ ¯ Ù Ù ­IPª úDNSú gatewayrouterĞ Ó ú ħ Ø Ù ª ª DHCP)Dynamic Host Configuration Protocol( IP Ģ ª ­ DHCPª ħ Ģ . ª ġ×:DHCP Server
  • 51. 44 •ª FTP: ª Ĩ ª Ø ª. ª ×)FTP(ħ ª . ĦĦª ª ª ª ...Öª ú ĩ Ù.ª ª ª (FTP)× ª(tcp/ip)ª× ª Ğ ħú ¯Ğ.× Ħ.ĦĦĦ īĞ LinuxÙ×. ª ª (binary, ASCII) תª ğ­ . ª ġ×: Samba WinBind:Linux Server. •Ú DNS: DNS ī Ù ħğ ú ×IPú ęª ğªIP ĞDNS ¯ ğIPª ú IP ×. ª ġ×:BIND9
  • 52. 45 •Proxy Server: × ğÒ ªª Ø.×Ĩª(traffic)Ħ Ø. ªØħ Ħ. ªğğ ) ()(. ĩªØ ħ . ªĞ Ħ ī.ªĠ ª .:Ø ª ª . :Proxy Server Caching īª ª ĝ¯ ª.(Caching)ĝ ħ × ĝ ī Ġ ħ)Ø.( Ħ ĪCaching: Active Caching: Ę ª Ħ ĝ ª. Passive Caching: ªcachingª . ª ġ×:Squid
  • 53. 46 •Web Server: Ø . ª ġUnixNT Ù. ª ġ ¯HTTP Daemon. Hyperlink ħ ħ ª HTTP Daemon ª ª ġ ġ Ë . ª ġ×:ServerApache •ÒChat Server: Ħ Ħ Ħ Ò ú ª ğ ª Ħ Ò ú. ī ª Ò ú ª Ù ¯ ħ ¯Ħ Ë Ħ . ª ġ×:Open Fire 4−3 ī.úª ­Ĝª ě.
  • 54. 47 ª : ª: •¯­ğ •¯­ğ •¯­ğMAC •ğbroadcastĘª •ªĠ ªØ: •¯­Ø •ªħhitProxy server cache •ªÚ¯DNS •×Ø)spam×Øě ( •×Ø •ª Ġğ)ª ª×ØÖ( •Ping timeªħØ •ª ª: •¯ •¯swap file •zombie processes •Ĝsystem load •¯ĜUPS •ğ¯ •SMART­ •­RAID array status ħª .
  • 56. 49 5−1: Ø ªISPsª ªtool-centric ĝ.ª ĝ ú ªĠ ª. úgoal-centric.)ª ª (ª ú. 5−1−1ª ú: ª ª Ġ ħ Ġ ×/Øĝ ª Ĝ ú Ĝ ª Ø. Ĝ ×)1(ú Ù)2(ª . Ĝ ī)3(ª. ª ĝ ª)4(ª. 5−1 ú )(]18[ Ĝ ú: −ğ. −Ġ Ħ − − −
  • 57. 50 ª : ª: login Host Monitoring Service Monitoring Graph Notification : . ª : 5−1ª ğ 5−2ª 5−2−1ª 1− 2− 3− 4− 5− 5−2−2ª
  • 58. 51 5−2−3ª: 1−:Login Use case name NagiosActors Preconditions 1−URL. 2− . 3− . 4− ª . 5−ħ. Main flow of events Ĝ ­Ħ Ġ Ħ ª Ġ. Post conditions 4−1ª : ª ) ( Alternatives 4−2ª Ġ : Exceptions 2−:Service Monitoring .ª Ī. Use case name Actors Ë Ĝ Ë Preconditions 1−. 2−Ġ Ĝ . 3−Ġ Ģ. 4−Ġ ª Ģ ª Ġ. Main flow of events
  • 59. 52 5−ScriptĠ ­ Ġ) Ò Ğ. ( 6−. 7−Ò ª ğª 8−Ġ ­. Ġ ª Ġ ­.Post conditions 4−1 Ġ : client Ġ. . ħ. Alternatives 4−1 : Ğ Ù. 5−2Ù Í: Ġ ­ Ěunknown Exceptions 3−:Host Monitoring ª ª Ĝ ī ª Ġ ġ. ª Ġ ġ . ª ħ¯Down. Use case name Actors ËPreconditions 1−. 2− Ĝ . 3− Ģ. 4−Ģ ª Ġ. 5−Ĩ) ( 6−­. Main flow of events
  • 60. 53 ª Ġ Ĝ ­ Post conditions Alternatives 5−1 Ù):Ĩ( Downª ĠCritical. Exceptions 4−: ª Ġ Ĩ Ø)ª Ĝ(Ģ ª ª Ĩ)ª( Ġ ě Use case name Actors Preconditions 1− ª Ĩ. 2−Ġ)ª( 3−ě :ª ª)Contact.( 4− Ø × ħ. 5−SMSħ. Main flow of events Ĝ ħPost conditions 3−1ğ ħ Ġ. 4−15−1: ĠCriticalØ)ª( . Ġ Critical Ø. Alternatives Exceptions
  • 61. 54 5–ª : ª Use case name Actors Ë Ë Ġ Ë Preconditions 1−Ġ . 2−ª Ġ ª ­ ģHistory) ª Ģ.( 3− Ġ ª ģ. 4− Ġ ª. 5−ªª. 6−. 7− ­. Main flow of events ­ ËPost conditions Alternatives Exceptions 5−2−4:Sequence Diagram 1−:Login
  • 64. 57 5−3Ù ª : Ĩ ªĪħ Ù ª ġ ª : −. − − − 1−:functional security Authenticationª ) .( 2−:Reliability :SSL)Secure Socket Layer( Ģª:Authenticationª Ù. 3–ĜĠ:fault tolerance ª ğ Ğ Ĝ Ë Ĝ ī ) ĩ ª ğ Ġ Ù.( 4–:scalability ª. 5−:SOA (Service Oriented Architecture) ú ġ× ª 6–ğ :Realtime 7–Ğ:High Performance 8–:Low Overhead Ħ.
  • 66. 59 : × :ª . ª ª ­. 6−1: ħ Ġ ×­ ­ Ĩ ª ­ Ĝ ¯ ª Ĝī: • • • • •ª ØLinux)ubuntu 8.1(ª )(Ù ĩ ª ħ ę ħ ª Ù ğ Ù ĩ ª. 6−2Nagios: ħğª Ġ .Ĩ××ØÙSMS Ħħġ­Ħ .NagiosBSDGNU/Linux ­. NagiosĨĢ. ת׭ġÙ ª.ping ĞĦīnmap ªØNagiosħ ª.
  • 67. 60 ī×Nagiosě¯­ğª Ùª . 6−1[6] nagios − Ùª: Ù ª ªªª ª ª5080100 Ĩ ¯ Ùª¯ Ğ × . −ª ěWindowsLinux ī . −ħ ħ Ģ ª ú Ĝ. −Ø ī ª Ø . ªnagios: linux,C Compiler,TCP/IPªConfiguration
  • 68. 61 ª nagios: •ª)SMTP,POP3,HTTP,FTP……( •Hosts)processor load,disk usage…..( •ªHosts •ÙHosts •Ö ª .... •)plugin(Ġ ª ªNagios ħÒlocalhost: 1.ğWindows machines .ğLinux machines 3.ªNetwork printers .ª ª Routers and Switches 6−2−1ğWindows machines: 6−2ğ[12] ª NSClient Ħ īnagios ª Ġnagioscheck_nt. nagioscheck_ntNSClient ­ ğ Ô ª × × ħħNagios Ĝ.
  • 69. 62 6−2−2ğLinux machines: 6−3ğ[6] ª NRPEĞ . nagioscheck_nrpe)Ğ ( NRPE)secure socket( ­ ğ Ô ª × ħ × ħNagiosĜ . 6−2−2−1NRPE: Linux ªnagiosĞ Ĩ(CPU,memory,..)Ù Ġ ªNRPE. NagiosSSH¯check_by_ssh ĢÙ Ğ Ù Ğ ħ NRPEÙ Ğ Ģ. 6−4NRPE[17]
  • 70. 63 NRPEĦ: •Check_nrpe Ğ. •NRPE DaemonĞ. ĜNagios Linux-Unixª Ġ: ×check_nrpe Ġ ×ĝĨNRPE- Daemon×SSl(secure socket layer) ħ ğ Ġcheck_nrpeħNagios . ¯: : NRPE Deamon ğ Ô Ò Ħ ħ ­ ğ. 6−5×NRPE[17] Ù: īNRPE DaemonīNagios NRPE Daemon ī Ğ Ò × Ù . 6−6× ÙNRPE[17]
  • 71. 64 6−2−3ªNetwork printers: 6−7ª[6] ªSNMP× Ĩ check_hpjdª: Paper Jam Out of Paper Printer Offline Intervention Required Toner Low Insufficient Memory Open Door Output Tray is Full 6−2−4ª ª Routers And Switches: 6−8ª ª [6] ª īª pingSNMPī × check_snmp.īsnmp MRTGĦ īNagiosSNMP.
  • 72. 65 ª: 6−3RRDTool: RRD)ªªª(Round-Robin Database ªªØ.ÙRRDtoolsħ ªªRRDħ­ ª.ªª)­ Ĝ(­ª.ª RRDtoolęªª ġ ª.īª ġ)shell(Perl. ªRDDtoolÙª ġ­ ª ªª.ªRDDtoolĨ×Ĝª ­ª .MRTGªRDDtool ªGNU/Linux.īRRDtoolª ¯Ô . 6−4Nagios Graph: Nagiosª ĘNagios ª Ġ × ª ­ ª . Nagios GraphĦ NagiosªRRD. : −Ù ħ Ģ. −× ¯. − Ğ ª úNagios. Nagios GraphĦ Ī: 1−Ęª Ġ ªNagios. 2−ª Ë ª ­.
  • 73. ª ¯: Gnokii (SMS software for contacting Nokia QuickPage (alphanumeric pager software) Sendpage (paging software) SMS Client (command line utility for sending messages to pagers and mobile phones) Ġħ Ġ ª ­ Ġ Ù Ë 66 Notification Tools: ª ¯ ¯Nagiosª ¯ (SMS software for contacting Nokia phones via GSM network) (alphanumeric pager software) (paging software) (command line utility for sending messages to pagers and Ù SMSĠ Ò . ª: : ª Ë1 . ÙRegular Expression: Ġ ª ­ Ġ Ù Ë ª Ģ ª2 . perlA ÙB ªC 6−5Notification Tools ª ¯ ¯ phones via GSM network) (command line utility for sending messages to pagers and Ù Ò 6−6ª Perl: ª Ë Ù Ġ ª ­ Ġ Ù Ë ª Ģ ª 1− 2− Ù 3− ª
  • 75. 68 7−1: 7−1 7−1ª Ħ ª ª hosts.cfgī Ě ª service.cfgĠcommands.cfg hostgroup.cfgª ě ī ª Ġ ġ ī Ě Øservicegroup.cfg contacts.cfg ª ī contactgroup.cfg¯timeperiods.cfgª Ø Ģ ª ī .
  • 76. 69 7−2­: Ĩ . ­: • Services • Service Groups • Hosts • Host Groups • Contacts • Contact Groups • Commands • Time Periods • Notification Escalations host: Hostgroup Servicedefinition. host_name .Alias IPīFQDN DNS¯ ī Ù. Address ī:ª ª ęparents. Parents Ğ(UP or DOWN) Ġ Ğ Ĝ Ġ ¯ ª . check_command ª Ħ ª Ø60. check_interval ت Ò.retry_interval ª Ĝcheck_command ğ OK Ĝ. max_check_attempts
  • 77. 70 ª ī Øcheck_period ģ ªĞ) Ġ( process_perf_data ġªª.contact_groups ªª ĠdownUnreachable.Ø60notification_interval ī ª Ø Ģª notification_period ª : -d ªDown -u ªUnreachable -r ªrecoveries(OK state) -f ªflapping -s ğ ªScheduled downtime -n ª Ġ. notification_options Ħ ġHostGroup: Ó.hostgroup_name Ħ ÓHostgroup . Alias Ħ ÚHostsÓ .Members Service: ,: (pop,smtp,http)Pingğ Ħ Ħ ­.
  • 78. 71 ÚĦHostsĦ Ġ Ħ Ú host_name Ġ Ġ. service_description Ġ.check_command Ġ ª Ĝ ī check_commandÙ OK Ĝ. max_check_attempts ª Ħ ªĠ Ø60. check_interval ª Ø Ģ.check_period ª Ġ OKØ60 ª Ġ notification_interval ª Ø Ģª Ğ ª ī.notification_period Ġ ª : -w ªWarninig -u ªUnknown -c ªCritical -r ªrecoveries(OK state) -fĠ ªflapping -s ğ ªScheduled downtime -n ª Ġ. notification_options ª ª ġ ĦÓ Úª ġ. contact_groups
  • 79. 72 ª ġservicegroup: Óservicegroup_name .Alias ª Ġ Ú ÚĦĠ servicegroup Ġ : members=host1,service1,host2,service2 Members Contact: . Ģcontact_name ĞAlias ĢĦ Ĩ ª Values: 0 = don’t send notifications, 1 = send notifications host_notifications_en abled Ģª Ġ Ĩ ª Values: 0 = don’t send notifications, 1 = send notifications service_notifications_ enabled Ø ī Ĩ ªhost_notification_period ª)ę Ġ(ª ħ Ø service_notification_o ptions ªħ ª Ø host_notification_opti ons Ú ¯ ī notification_timeout service_notification_c ommands ØĞEmail
  • 80. 73 Ğī Ù ħ6ī Addressx Ğ Ġ ×0 1ª. can_submit_comman ds ª ġcontactgroup: ª ġcontactgroup_name úª ġAlias ġ ª Ú ħ Ġcontactgroup contact. Members ª Øtimeperiod: ª Ĝ ªªª Ġ. úªtimeperiodtimeperiod_name alias ª Øtimes command: (command)īĠ ­ ª Ħ ª Ħ ª Ġ ª.Ö.... Ġ . command_name script Ġ command_line ­D
  • 81. 74 7−3: : 7−2Ġ Nagiosħ ĩ ğ ª Ġ Ĩinsert.pl Ī Ĩmap Ù2 ª. show.cgi­ª ª Ġ ª ªRRD Ĩmap ħ ­ Ġ . ª ī ª Ġ ª ØĜ URLª ª ª Ù. Nagios Lookup RRD Files mapInsert.p l RRDTools Save Show.cgi Lookup DisplayRRDTools Graph Service Info Links
  • 82. 75 7−4ª : 7−3ª: criticalØnonOK)Ù( 1. Ënagios.cfg 2.Ġscheduled downtime Ġ )ġ Ġ ª Ġ–Ø ª Ġ(ÍĠ 3.falpping)(ª Ù ª ğ Ù ğ × ª ğ × ª Ù ª Ó 4. Ġ ª 5.notification periodØ ğ Ò Ø 6.Ù ĠnonOK −Ġnotification interval)Ġ Ù Í Ø( Ø ª ěnotification enabled. ª−ğ ªÙnonOKnotification enabled 7.Ġ notification enabled 8.Ø.
  • 85. 78 8−1ª ª: ª ª : •: . 8−1 ĩĢ ª Ġ ħ ī : Ħ ª ĠTactical overview ª ĠĦService Detail ªĦhosts Host Detail ªĦª ĠHostgroupOverview
  • 86. 79 ġ)ġĦ(ª Ġ Ó HostgroupSummary ġĦ ª Ġ)­ ( HostGroup Grid Ġ ªStatus map ĠĜ ª)Ù( ĠĦÙ ª ğ ­ ī Ĝ ª ğ ĩ Ĝ Service Problems ª ­. ª:Ø ğ) ğ Ħ ¯( . Process Info Ġ ª.Performance Info ª Ġ)( īÙScheduling Queue ­ ª Ġ ģ ªĦAlert Histogram Ë ª ğ ­) ( Notifications ªĦ) ĢĦ(View Config : Óª Linuxª Windowsú ġ ġª )Ó Ó.(
  • 87. 80 •: × ī ª Ġ īService Detail. 8−2 ğ ġ:Ø Ġ Ġ Ġ. ª Ī:80ğOKĦ80−90 Warning90Critical. ¯UnknownĠ Ù Ġ) (Ù. Ġ Ī: CriticalOK UnknownWarning
  • 88. 81 •: īĦ×Host Detail. 8−3 ĩ)Ġ .( ª :Ħ ª Ġ )ª ğ ª ğ.( Ĝ īĦ: ª Ġ .
  • 89. 82 •: Ġ ª×Status map. 8−4 ª ğ ī . 8−2: ğ ī Ù Ę ª Ġ ğ ª ­ Ġ )(. ĜĠ)( Ġ )8−5.( RRD ToolNagios Graph. ª Ĝ ī ª :ª Ø .Ġ ħ ī ª ĝ.
  • 90. 83 Ġ ª ª: 8−5ğ Ġ crawler 8−6× ªĠgetway 8−7× ªĠgetway
  • 91. 84 8−2−1Ùª×: ÙĠª×) NagiosGraph(ħªħinbound trafficĦ¯ ª.outbound trafficªª )ªØ(ħª.ª ØħØ.Ħª× ª.īת úª ªª ª)×ØÙªª( Ħ ªªħğ ª . 8−8ª[3] ĩĩªĦ Ġª.Ħª ª ت. Ùª×.ª×ª ªØ.Ùª ªÍª ħª peer-to-peer ÙÙ.ġÙ ªĜğª ğª×.
  • 93. 86 8−3ª: −: Ħ Ë. −: ú Í . −: ª ¯ × ª . −Ğ: Ğ: 1–: × Ĝ ª. , 2–: ª Ğ. ˪User Friendlyę ª ħ. 3–Ġ Ĝ: ĩ Ô Ġ) Ù.(
  • 94. 87 8−4Ğ: ª )( ħ ª Ø × Ğ Ğ ª Ħ ħ: –: Ùħ.ĩ ¯ . ħ ­. ª−: Ù ªª . Ġ: Øت ª 3540 7864 7648 ª81296 Ĝ2532256 ª3216 7972 6864 652 31120082752009.
  • 95. 88 8ª Ø ª. ª652208ª)26X8ª( 24000.: =208) * 24000/652= (75230. 752302150460 ª20000240000 ª00OpenSource..! 190460. Ī Ğ Ĝ )( Ġ . Ğ:Ğ) .(Ģħ . ª Ó Ù× ª Ø (Cisco Works) ġ)ú ħ ( ª ġ ħ ī Ġ .. ª Ħ ¯ Ø.
  • 96. Ĝ ú Ğ ħ. ª. ×Ġ ª ª ª ª ęġ Ĝ . ª ª. ª ę. 89 ‫ا‬ Ë Ù ªĞ ħ ªªĝ ª ª ×Ġ ª ª ª ª ę ª. ª Ġ ħ: ª Ğ Ĝ ª ª ª ę Ë ª ª ×Ġ ª ª ª ª ę ª ª Ġ ħ −ª Ğ −ª ª −ª ę
  • 98. APERL 91 Practical Extraction Report Language PERL : ToolPowerful ScriptingĜ ª ī ­Linux. Ġ ª ġ×Linuxĩ ī PERL. ËLarry Wall1987. ªPERL: ĩPERL ġ× ª c. •Ø Ĝ Ġ ªCompilerLinker × ×PERL×PERLġ Ù. •Ġ ª Ġawk sedħ ª Ħ Ħ. •ġ× Ù × Ĝ. •Ù ª ĩ Ù ġ Ù ª ĩ. •ª ġ Ø ġ ¯Modules PERL× ª Ó ī . PERL : /usr/local/bin/perl
  • 99. APERL 92 : ×PERLĠLinux ª Ħ ġ! : #! /usr/bin/perl –w Print “Hello World!” PERLBIN×: #! /usr/bin/perl –w ª PERLĦ PERL. Ġ–wª × ª Ĝ ×ģ.
  • 100. B 93 Ù Regular Expressions : Ùregexpregex ª ­ Ĝ.Ù Ī Ğ ª ħ× ªġPERLÒ Ğ Ù ¯ Engine Ù. : Ğ Ø × ÙØ Ğ Ù Ĝ Ë. Ø × ÙØ @ª ú ī_ ú ªcomnetğ ª Ù. Ġ: ħ Ó Ħ ġ ħ . :]. [ ħ Ó−: ^ Ù. ^Ğ × ġ× .
  • 101. B 94 $ Ù. $Ù. ^devpedia$ Ùdevpediawdevpedia devpediawĦ Ù ú ú ęĜ ú. . ġ Ħ. īÙ × Ù ú ×: ^.at$ ħ Ġī Ùª Ù:cat, hat, fat ªúatīú ğ Ù ú. īī Ù ú Ù: ^..at$ Ĝ ğ ª úat:heat.… [ . ] . Ù Ģ Ğ. :
  • 102. B 95 ^[abcdef]$ ú ÙÓ ú)(Ģ Ĩ : ^[abcdef][abcdef][abcdef][abcdef]$ īĝ úa, b, c, d, e, fÙ ī ú ğ Ġ ªú ğ ģ Ĩ. | ª. ī Ħ Ħ Ù ĝ ¯ī ğ Ġ| . ^com|net$ Ħ ú Ùcomnet. ( Ī. ) Ī. Ø Ī Ħ Ī . {a,b} :ú ğ Ę ĘªĜ. aª)0(ħb ğğ Ğ Ù. ú ª ¯:
  • 103. B 96 * = {0,} Ù Ù ª. + = {1,} Ğ. ? = {0,1} . . Ġ × ÙĪ ğě. Ó−: ^- ú ×. . ĩ. ^ . ]ú ğ ×. : Ģ. - . ú a-z0-9.
  • 104. C 97 nagios: Ĝ ī ªInternet: •nagios-3.0. .tar.gz •nagios-plugins-1. .6.tar •NSClient++-Win3 -0.3.5 •NRPE Addon ĩ ª ª ªnagiosĩ ª ª Ġ nagiosLinux open Suse: ħ packages •Apache •C/C++ development Libraries 1−ª: Become the root user Su –l Create a new nagios user account and give it a password /usr/sbin/useradd -m nagios passwd nagios Create a new nagios group. Add the nagios user to the group. /usr/sbin/groupadd nagios /usr/sbin/usermod -G nagios nagios Create a new nagcmd group for allowing external commands to be submitted through the web interface. Add both the nagios user and the apache user to the group
  • 105. C 98 /usr/sbin/groupadd nagcmd /usr/sbin/usermod -G nagcmd nagios /usr/sbin/usermod -G nagcmd wwwrun −nagios)Compile and Install nagios( mkdir ~/downloads cd ~/downloads Extract the Nagios source code tarball. tar xzf nagios-3.0. .tar.gz cd nagios-3.0. Run the Nagios configure script, passing the name of the group you created earlier like so: ./configure --with-command-group=nagcmd Compile the Nagios source code. make all Install binaries, init script, sample config files and set permissions on the external command directory: make install make install-init make install-config make install-commandmode Don’t start Nagios yet - there’s still more that needs to be done... 3−ª)Customize configuration( Ĝ ª ª /usr/local/nagios/etc ę contacts.cfg /usr/local/nagios/etc/objects/contacts.cfg
  • 106. C 99 ª ī ī Ù vi /usr/local/nagios/etc/objects/contacts.cfg −)configure Web Interface( Install the Nagios web config file in the Apache conf.d directory. make install-webconf Create a nagiosadmin account for logging into the Nagios web interface. Remember the password you assign to this account - you’ll need it later. htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin Restart Apache to make the new settings take effect. service apache restart 5−Nagios plugins: Extract the Nagios plugins source code tarball. cd ~/downloads tar xzf nagios-plugins-1. .11.tar.gz cd nagios-plugins-1. .11 Compile and install the plugins. ./configure --with-nagios-user=nagios --with-nagios-group=navies make make install 6−Start Nagios Add Nagios to the list of system services and have it automatically start when the system boots. chkconfig --add navies chkconfig nagios on Verify the sample Nagios configuration files. /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
  • 107. C 100 If there are no errors, start Nagio service nagios start −Login to the Web Interface You should now be able to access the Nagios web interface at the URL below. You’ll be prompted for the username (nagiosadmin) and password you specified earlier. http://localhost/nagios/ īService DetailÒ ¯ . NRPE: nagios-plugins-1. .6.tar.gzª Ġ 1−ª: Become the root user. You may have to use sudo -s on Ubuntu and other distros. su –l Create a new nagios user account and give it a password. /usr/sbin/useradd nagios passwd navies −nagios: Create a directory for storing the downloads. mkdir ~/downloads cd ~/downloads Extract the Nagios plugins source code tarball. tar xzf nagios-plugins-1.4.6.tar.gz cd nagios-plugins-1.4.6 Compile and install the plugins. ./configure make make install
  • 108. C 101 The permissions on the plugin directory and the plugins will need to be fixed at this point, so run the following commands. chown nagios.nagios /usr/local/nagios chown -R nagios.nagios /usr/local/nagios/libexec −NRPE daemon: cd ~/downloads Extract the NRPE source code tarball. tar xzf nrpe-2.8.tar.gz cd nrpe-2.8 Compile the NRPE addon. ./configure make all Install the NRPE plugin (for testing), daemon, and sample daemon config file. make install-plugin make install-daemon make install-daemon-config Install the NRPE daemon as a service under xinetd. make install-xinetd Edit the /etc/xinetd.d/nrpe file and add the IP address of the monitoring server to the only_from directive. only_from = 127.0.0.1 nagios_ip_address Add the following entry for the NRPE daemon to the /etc/services file. nrpe 5666/tcp # NRPE Restart the xinetd service. service xinetd restart
  • 109. D­ 102 ­ Ĝ Ë : Host: define host{ host_name bogus-router alias Bogus Router #1 address 192.168.1.254 parents server-backbone check_command check-host-alive check_interval 5 retry_interval 1 max_check_attempts 5 check_period 24x7 process_perf_data 0 retain_nonstatus_information 0 contact_groups router-admins notification_interval 30 notification_period 24x7 notification_options d,u,r } HostGroup: define hostgroup{ hostgroup_name novell-servers alias Novell Servers members netware1,netware2,netware3,netware4 } Service: define service{ host_name linux-server service_description check-disk-sda1 check_command check-disk!/dev/sda1 max_check_attempts 5 check_interval 5 retry_interval 3 check_period 24x7 notification_interval 30
  • 110. D­ 103 notification_period 24x7 notification_options w,c,r contact_groups linux-admins } Servicegroup: define servicegroup{ servicegroup_name dbservices alias Database Services members ms1,SQL Server,ms1,SQL Server Agent,ms1,SQL DTC } Contact: define contact{ contact_name M.Mohammad alias Moustafa Najm host_notifications_enabled 1 service_notifications_enabled 1 service_notification_period 24x7 host_notification_period 24x7 service_notification_options w,u,c,r host_notification_options d,u,r service_notification_commands notify-by-email host_notification_commands host-notify-by-email email Moustafa-MN@localhost. address1 xxxxx.xyyy@neotech.com address2 555-555-5555 can_submit_commands 1 } ContactGroup: define contactgroup{ contactgroup_name novell-admins alias Novell Administrators members Moustafa,Mohamad }
  • 111. D­ 104 Timeperiod: define timeperiod{ timeperiod_name misc-single-days alias Misc Single Days 2008-01-28 00:00-24:00 ; January 28th, 1999 monday 3 00:00-24:00 ; 3rd Monday of every month day 2 00:00-24:00 ; 2nd day of every month february 10 00:00-24:00 ; February 10th of every year february -1 00:00-24:00 ; Last day in February of every year friday -2 00:00-24:00 ; 2nd to last Friday of every month thursday -1 november 00:00-24:00 ; Last Thursday in November of every year } Command: define command{ command_name check_pop command_line /usr/local/nagios/libexec/check_pop -H $HOSTADDRESS$ } Servicedependency: define servicedependency{ host_name WWW1 service_description Apache Web Server dependent_host_name WWW1 dependent_service_description Main Web Site execution_failure_criteria n notification_failure_criteria w,u,c } Serviceescalation: define serviceescalation{ host_name nt-3 service_description Processor Load first_notification 4 last_notification 0 notification_interval 30 contact_groups all-nt-admins,themanagers }
  • 112. D­ 105 Hostdependency: define hostdependency{ host_name WWW1 dependent_host_name DBASE1 notification_failure_criteria d,u } Hostescalation: define hostescalation{ host_name router-34 first_notification 5 last_notification 8 notification_interval 60 contact_groups all-router-admins } Hostextinfo: define hostextinfo{ host_name netware1 notes This is the primary Netware file server notes_url http://webserver.localhost.localdomain/hostinfo.pl?host=netware1 icon_image novell40.png icon_image_alt IntranetWare 4.11 vrml_image novell40.png statusmap_image novell40.gd2 2d_coords 100,250 3d_coords 100.0,50.0,75.0 } Serviceextinfo: define serviceextinfo{ host_name linux2 service_description Log Anomalies notes Security-related log anomalies on secondary Linux server notes_url http://webserver.localhost.localdomain/serviceinfo.pl?host=linux2service=Log+Anomalies icon_image security.png icon_image_alt Security-Related Alerts }
  • 113. 106 ‫ﺍﳌﺮﺍﺟﻊ‬‫ﺍﳌﺮﺍﺟﻊ‬‫ﺍﳌﺮﺍﺟﻊ‬‫ﺍﳌﺮﺍﺟﻊ‬ 1. Network Management Principles and Practice ‐ Mani Subramanian 2. Simple Network Management Protocol, tutorials by Dr. Andreas Steffen 3. ‫ا‬ ‫ول‬ ‫ا‬ ‫ت‬ ‫ا‬:‫أ‬ ‫ا‬ ‫إ‬ 4. http://www.adsh2007.com/vb/Arabic_CCNA/CCNA_ARABIC_4/ 5. http://wndw.net/ 6. http://www.nagios.org 7. http://www.nagiosexchange.org 8. http://nagioswiki.org/wiki/Addon:NagiosGrapher 9. http://sourceforge.net/project 10. http://nagios.demo.netways.de/ 11. http://www.novell.com/coolsolutions/feature/19843.html 12. http://nsclient.org/nscp/ 13. http://www.linux-ar.org/forum/ 14. http://www.tech-faq.com/firewall.shtml 15. http://en.wikipedia.org/wiki/ 16. http://www.nagioscommunity.org/wiki/ 17. http://nrpe.org 18. www.itrainonline.org/itrainonline/mmtk 19. http://en.wikipedia.org/wiki/Comparison_of_network_monitoring_systems