IBM Korea Skip to main content
       IBM Ȩ    |  Á¦Ç° & ¼­ºñ½º  |  °í°´Áö¿ø & ´Ù¿î·Îµå  |  È¸¿ø°¡ÀÔ  

IBM developerWorks > ÀÚ¹Ù
developerWorks

ºí·¢¹Ú½º¿¡¼­ ¿£ÅÍÇÁ¶óÀÌÁî ±îÁö, Part 3 : JMX ÅëÇÕ
JMX Agent¸¦ ³×Æ®¿öÅ© °ü¸® ½Ã½ºÅÛ¿¡ ¿¬°áÇϱâ

Level: Intermediate

Sing Li
ÀÛ°¡, Wrox Press
2002³â 12¿ù 17ÀÏ

½ÇÁ¦ Network Management System (NMS)¸¦ »ç¿ëÇÏ¿© JMX·Î ¸¸µé¾îÁø ÀÚ¹Ù ¾ÖÇø®ÄÉÀ̼ÇÀ» ¸ð´ÏÅ͸µÇÑ´Ù. NMS/JMX ÅëÇÕ¿¡ »ç¿ëµÈ ÀϹÝÀûÀÎ ±â¼úÀº ¹°·Ð JMX¸¦ Àü°³ÇÒ ¶§ ¹ß»ýÇÏ´Â ÀϹÝÀûÀÎ ¾î·Á¿òµéÀ» ¼³¸íÇÑ´Ù.

JMX´Â ÀÚ¹Ù Ç÷§ÆûÀÇ »õ·Î¿î Ç¥ÁØ È®ÀåÀ¸·Î¼­ Çö´ëÀû Network Management Systems (NMS)¸¦ ÅëÇØ ÀåÄ¡, ¾ÖÇø®ÄÉÀ̼Ç, ¼­ºñ½ºµéÀ» °ü¸® ¹× Á¦¾î, °¨½ÃÇÒ ¼ö ÀÖ´Ù. JMX°¡ ¼ÒÇÁÆ®¿þ¾î ¾ÖÇø®ÄÉÀ̼Ç/¼­ºñ½º¸¦ ¾î¶»°Ô È°¿ëÇÏ´ÂÁö¸¦ È®½ÇÈ÷ ¾Ë°í ½Í´Ù¸é ½ÇÁ¦ ¿ÀÇ ¼Ò½º NMS(OpenNMS)¸¦ »ç¿ëÇÏ¿© ClickMeter ¾ÖÇø®ÄÉÀ̼ÇÀ» ¸ð´ÏÅ͸µÇÑ´Ù. ±¤¹üÀ§ÇÑ °¡¿ë¼º°ú ´Ü¼øÇÑ µðÀÚÀÎ ¶§¹®¿¡ OpenNMS¸¦ ¼±ÅÃÇß´Ù. ¿©·¯ºÐµéµµ ´Ù¸¥ NMS Á¦Ç°¿¡ ¼³¸íµÈ ÅëÇÕ ±â¼úÀ» Àû¿ëÇÒ ¼ö ÀÖ´Ù. OpenNMS ½ºÆÑÀ¸·Î ÀÛ¾÷Çϱâ Àü¿¡ ÀϹÝÀûÀÎ µðÀÚÀÎ ¿¤¸®¸ÕÆ®¿Í ´ëºÎºÐÀÇ NMS Á¦Ç°ÀÌ °øÀ¯ÇÏ´Â ÀÛµ¿ ¸ðµ¨À» º¸µµ·Ï ÇÏÀÚ.

³×Æ®¿öÅ© °ü¸® ½Ã½ºÅÛ- ±× ±Ùº»ÀûÀÎ º¹À⼺
³×Æ®¿öÅ© °ü¸® »ç¿ëÀÚ Àα¸°¡ ´Ù¾çÇØÁø ´öÅÿ¡ Áö±ÝÀÇ NMS Á¦Ç°Àº °¡Àå ±¤¹üÀ§ÇÏ°í º¹ÀâÇÑ ¼ÒÇÁÆ®¿þ¾î ½Ã½ºÅÛÀÌ µÇ¾ú´Ù. ¿¹¸¦ µé¾î ºÐ»ê ÀÛµ¿ ¼¾Å͸¦ ÅëÇØ Åë½Å ³×Æ®¿öÅ© Àåºñ¸¦ °ü¸® ¹× °¨½ÃÇÏ´Â ´Ù±¹Àû Á¶Á÷Àº °¡»ó ÇÁ¶óÀ̺ø ³×Æ®¿öÅ©(VPN), PC ÀÚ»ê, µ¥ÀÌÅÍ Åë½Å ÀÚ»ê, ¾ÖÇø®ÄÉÀÌ¼Ç ¼­¹ö °ü¸®¿¡ ÇÊ¿äÇÑ Áö¿ª ºñÁö´Ï½ºÀÇ ´Ù¾çÇÑ ¿ä±¸¸¦ ¾È°Ô µÉ °ÍÀÌ´Ù.

ÀüÇüÀûÀÎ NMS´Â ¼öõ, ¼ö¸¸, ½ÉÁö¾î ¼ö¹é¸¸ ¿£µåÆ÷ÀÎÆ®(³ëµå)¸¦ °ü¸®ÇØ¾ß ÇÑ´Ù. NMSÀÇ ¸ñÇ¥ °í°´µéÀº Áß°£ ±Ô¸ð ÀÌ»óÀÇ Á¶Á÷µéÀÌ´Ù. ÀÌ·¯ÇÑ °í°´µéÀº ´Ù¾çÇÑ ºñÁö´Ï½º¸¦ Çϱ⠶§¹®¿¡ NMS´Â äÅüºÀÌ ³ôÀº ¼³Á¤ ¸ÞÄ¿´ÏÁò°ú °í°´ÀÇ ´Ù¾çÇÑ ¿ä±¸¸¦ ¸¸Á·½Ãų »ç¿ëÀÚ ÀÎÅÍÆäÀ̽º¸¦ °®Ãç¾ß ÇÑ´Ù. ÀüÇüÀûÀÎ NMS ¼Ö·ç¼ÇÀÇ °íºñ¿ëÀ» Á¤´çÈ­ ÇÒ ¼ö ÀÖ¾î¾ß ÇÑ´Ù.

°ü·Ã ±â¼úÀÚ·á

Part 1, "Management, JMX 1.1 style" (2002³â 9¿ù)

Part 2, "Beans, JMX 1.1 style" (2002³â 10¿ù)

OpenNMS: ¿ÀÇ ¼Ò½º NMS
OpenNMS´Â ¿ÀÇ ¼Ò½º ºÐ¾ß¿¡¼­´Â ÇϳªÀÇ ¼ÒÇÁÆ®¿þ¾î ½Ã½ºÅÛÀÌ´Ù. ÀÌ°ÍÀº °³¹ß Ä¿¹Â´ÏƼ¿¡ º¹ÀâÇÏÁö¸¸ äÅð¡´ÉÇÑ NMS ¼Ö·ç¼ÇÀÇ ½ÇÇàÆÄÀÏ°ú ¼Ò½º Äڵ带 ¹«·á·Î Á¦°øÇÏ·Á´Â ½ÃµµÀÌ´Ù.

OpenNMS´Â ·¹°Å½Ã ¾øÀÌ Åº»ýÇ߱⠶§¹®¿¡ º¸´Ù »õ·Î¿î Á¢±Ù¹æ½ÄÀÌ ÇÊ¿äÇß´Ù. OpenNMS´Â »ç¿ëÀÚ Áß½ÉÀÇ NMSÀ̸ç ÀüÇüÀûÀÎ ³×Æ®¿öÅ© °ü¸®ÀÚ¸¦ ½Ì±Û Æ÷ÀÎÆ® Æ÷Ä¿½º·Î µÎ¾î ÇÊ¿äÇÑ ±â´ÉÀ» °áÁ¤ÇÏ°ÔÇÑ´Ù. ¸î¸î ¾ÈµÇ´Â ±¸¼º¿øÀ¸·Î ÀÌ·ç¾îÁø Ãʱâ ÆÀÀº ³×Æ®¿öÅ© °ü¸® ÄÁ¼³ÅÏÆ®ÀÌ¸ç ±×µéÀÇ Áö½ÄÀ» Ãѵ¿¿øÇÏ¿© °´Ã¼, ŽºÅ©, ¿öÅ©ÇÃ·Î¿ì °ü·Ã ÀÛµ¿ ¸ðµ¨À» ±Ô¸íÇß´Ù. ÀÌ°ÍÀº »ó¿ë NMS Á¦Ç°¿¡ ´ëºñµÇ¸ç µð¹ÙÀ̽º Áß½É, ³×Æ®¿öÅ© Áß½É, ¼ÒÇÁÆ®¿þ¾î ¼­ºñ½º Á᫐ ¼º°ÝÀ̵ȴÙ.

NMS ºÐ¼®
¸¹Àº NMS Á¦Ç°µéÀº ¾ÖÇø®ÄÉÀ̼ÇÀÇ Æ¯Á¤ µµ¸ÞÀÎ, ÄÚµå À¯»ê, º¥´õ¿Í »ó°ü ¾øÀÌ À¯»çÇÑ °³³äÀû ±¸¼ºÀ» °®°íÀÖ´Ù. ±×¸² 1Àº ÀÌ·¯ÇÑ ÀϹÝÀû ±¸¼ºÀ» ¼³¸íÇÏ°í ÀÖ´Ù.

±×¸² 1. NMSÀÇ °³³äÀû ±¸¼º
Figure 1. Conceptual composition of an NMS

±¸¼ºÀº ÀϹÝÀûÀ¸·Î 3-TIER ÀÌ´Ù. ÇÁ·ÐÆ®(front) Ƽ¾î´Â °ü¸®µÇ°í ÀÖ´Â µð¹ÙÀ̽º¿Í ¼­ºñ½ºÀÇ ³×Æ®¿öÅ©, ½Ã½ºÅÛ »ç¿ëÀÚ, ¿ÜºÎ ½Ã½ºÅÛ°ú ÀÎÅÍÆäÀ̽ÌÇÑ´Ù. ¹Ìµé (middle) Ƽ¾î¿¡´Â NMSÀÇ ±â´É ¼¼Æ®¸¦ Á¦°øÇÏ´Â ¸¹Àº ·ÎÁ÷ÀÌ Æ÷ÇԵǾî ÀÖ´Ù. ¹é¿£µå(back-end) Ƽ¾î´Â µ¥ÀÌÅ͸¦ À¯ÁöÇÏ°í Á¶ÀÛÇÑ´Ù.

±¤¹üÀ§ÇÑ Á¤º¸¿Í µ¿ÀûÀÌÁö¸¸ °­·ÂÇÑ ±â¹Ý¿¡¼­ Æ®·¡Å·µÇ¾î¾ß ÇÒ º¹ÀâÇÑ »óÈ£°ü°è ¶§¹®¿¡ NMS´Â »ó¿ë °ü°èÇü µ¥ÀÌÅͺ£À̽º °ü¸® ½Ã½ºÅÛ(RDBMS)À» ¹é¿£µå Ƽ¾î¿¡ Àü°³Çß´Ù.

ù ¹ø° Ƽ¾î¿¡¼­ ¸ð´ÏÅ͸µ, °ü¸®, Á¦¾î ÄÄÆ÷³ÍÆ®´Â NMS ÀÛµ¿À» ½ÇÇàÇØ¾ß ÇÏ´Â ¸¹Àº µ¿½Ã ŽºÅ©µé·Î ±¸¼ºµÇ¾î ÀÖ´Ù. ¾×Ƽºê ³×Æ®¿öÅ© ¹ß°ß, µð¹ÙÀ̽º Á¤Áö ¹× ¼­ºñ½º µî·ÏÇϱâ, µð¹ÙÀ̽º, ¼­ºñ½º, °í±Þ ºÐ»ê ¿¡ÀÌÀüÆ®¿¡¼­ ºñµ¿±â½Ä À̺¥Æ® °³ÀÔ ¹× ÇÁ·Î¼¼½ÌÀ» ¸Ã°í ÀÖ´Ù. ÀÌ ÄÄÆ÷³ÍÆ®´Â ¼³Á¤ ·ÎÁ÷, Á¦°ø ·ÎÁ÷, ¿öÅ©ÇÃ·Î¿ì ½ÇÇàÀÚ, ¹Ìµé Ƽ¾îÀÇ Ä¿½ºÅÒ ·ÎÁ÷¿¡¼­ ¿Â ÀÛµ¿µé ¿ª½Ã ¼öÇàÇÑ´Ù.

OpenNMSÀÇ ¿ª»ç
2002³â º½, OpenNMS 1.0ÀÌ Åº»ýÇß´Ù. ¿ÀÇ ¼Ò½º·Î »ç¿ëÇÒ ¼ö ÀÖ´Â ÃÖÃÊÀÇ ¿£ÅÍÇÁ¸®ÀÌÁî±Þ ³×Æ®¿öÅ© °ü¸® Ç÷§ÆûÀÌ Åº»ýÇÑ °ÍÀÌ´Ù. 2002³â 5¿ù, ÇÁ·ÎÁ§Æ®ÀÇ ´ã´çÀÚµéÀº OpenNMS¿¡ Áö¿ø°ú ÄÁ¼³Æà ¼­ºñ½º¸¦ Á¦°øÇÏ´Â Sortova Consulting GroupÀ¸·Î ¿Å°åÁö¸¸ °³¹ß ÁøÈ­´Â °è¼ÓµÇ°í ÀÖ´Ù.

1999³â, ½Ã½ºÅÛ ÇÁ·Î±×·¡¸Óµé°ú ³×Æ®¿öÅ© °ü¸® ÄÁ¼³ÅÏÆ®µéÀº °ü¸® Á¦Ç°ÀÇ ÇöȲ¿¡ ½Ç¸ÁÇÏ°í ÇØ°áÃ¥À» ¸ð»öÇÒ °ÍÀ» °áÁ¤Çß´Ù. »ó¿ë NMS Á¦Ç°ÀÇ Ãµ¹®ÇÐÀû ºñ¿ëÀ» °¨ÁöÇÑ ÆÀÀº ¿ÀÇ ¼Ò½º °³¹ß ¸ðµ¨À» »ç¿ëÇÏ¿© º¸´Ù ³ªÀº °ÍÀ» °³¹ßÇϱâ·Î °áÁ¤Çß´Ù.

¶ÇÇÑ, ÇÁ·ÐÆ® Ƽ¾î´Â »ç¿ëÀÚ ÀÎÅÍÆäÀ̽º ÄÄÆ÷³ÍÆ®ÀÌ´Ù. NMS´Â "fat client GUI" ÀÎÅÍÆäÀ̽º´Â ¹°·Ð ½±°Ô Ä¿½ºÅ͸¶ÀÌ¡ ÇÒ ¼ö ÀÖ´Â À¥ ±â¹Ý »ç¿ëÀÚ ÀÎÅÍÆäÀ̽ºµµ °¡Áö°í ÀÖ´Ù. ¸®Æ÷Æà ÀåÄ¡°¡ ÀÌ ·¹À̾ ÀÖÀ¸¸ç UI¿Í ÀÎÅÍ·¢ÆÃÇÏ¿© ½Ç½Ã°£ ¼ÒÇÁÆ® Ä«ÇÇ ¸®Æ÷Æ®´Â ¹°·Ð ¹èÄ¡ Çϵå Ä«ÇÇ ¸®Æ÷Æ®µµ Á¦°øÇÑ´Ù.

ù ¹ø° Ƽ¾îÀÇ ¿ÜºÎ ÀÎÅÍÆäÀÌ½Ì ÄÄÆ÷³ÍÆ®´Â »ç¿ëÀÚ¿Í ¿ÜºÎ ½Ã½ºÅÛ¿¡ °øÁö ÇÁ·Î¼¼½º¸¦ ÇÒ ¼ö ÀÖ´Ù. ÆäÀÌÀúÈ£Ãâ, À̸ÞÀÏ, ÀüÈ£ È£Ãâ, ƯÁ¤ À̺¥Æ®¸¦ ¿ÜºÎ °ü¸® ½Ã½ºÅÛ¿¡ ÀüÇÑ´Ù. API¿Í È®Àå Ç÷¯±×ÀÎ ±â¹Ý±¸Á¶·Î ÀÎÇØ NMS´Â Ä¿½ºÅ͸¶ÀÌ¡ µÉ ¼ö ÀÖ°í ´Ù¸¥ ½Ã½ºÅÛ°ú ÀÎÅÍÆäÀÌ½Ì ¹× ÅëÇÕµÉ ¼ö ÀÖ´Ù.

¹Ìµé Ƽ¾î´Â NMSÀÇ ·ÎÁ÷ÀÌ Á¸ÀçÇÏ°í ÀÖ´Â °÷ÀÌ´Ù. NMS¿¡ ±¸º°µÈ ±â´É°ú Ư¼ºÀ» ºÎ¿©ÇÑ´Ù. Àç°í ¶Ç´Â ÀÚ»ê °ü¸®, µ¥ÀÌÅÍ ¼öÁý°ú ºÐ¼®, »ç¿ëÀÚ ¶Ç´Â ¿ªÇÒ °ü¸®, ¿öÅ© ÇÃ·Î¿ì °ü¸®/½ÇÇà µîÀÌ ¾Ë·ÁÁø ±â´ÉµéÀÌ´Ù.

Àç°í(¶Ç´Â ÀÚ»ê) °ü¸®´Â ´ëºÎºÐÀÇ NMS Á¦Ç°ÀÇ ÁÖ¿ä ±â´ÉÀÌ´Ù. Æ®·¡Å·µÇ´Â ¾ÆÀÌÅÛµéÀº NMS¿¡¼­ Àåºñ, ¼­Å¶, ¼­¹ö, ¼³Ä¡µÈ ¼ÒÇÁÆ®¿þ¾î ¼­ºñ½º¿Í ¾ÖÇø®ÄÉÀ̼ǿ¡ À̸£±â±îÁö ´Ù¾çÇÏ´Ù. ÀÌ ÄÄÆ÷³ÍÆ®ÀÇ »ç¿ëÀÚ ÀÎÅÍÆäÀ̽º¿Í ¾ÖÇø®ÄÉÀÌ¼Ç ·ÎÁ÷Àº °ü¸®µÇ´Â ´Ù¸¥ ¾ÆÀÌÅ۵鿡°Ôµµ À¯¿¬ÇÏ°Ô Àû¿ëµÉ ¼ö ÀÖ´Ù.

µ¥ÀÌÅÍ ¼öÁý°ú ºÐ¼® ±â´ÉÀº °ü¸®µÇ°í ÀÖ´Â µð¹ÙÀ̽º¿Í ¼­ºñ½º¿¡ ´ëÇÑ ÇöÀç¿Í ±âÁ¸ÀÇ Åë°è¸¦ Á¦°øÇÑ´Ù. ³×Æ®¿öÅ©¿Í ¼­ºê ³×Æ®¿öÅ©, µð¹ÙÀ̽º/¼­ºñ½º °¡¿ë¼ºÀ» µå·¯³»´Â Åë°èÀû ºÐ¼®À» Á¦°øÇÑ´Ù. ÀÌ ÄÄÆ÷³ÍÆ®´Â Ä¿½ºÅÒ ¿öÅ©Ç÷ο츦 ÇÚµéÇϱâ À§ÇØ ¿öÅ©ÇÃ·Î¿ì ½ÇÇà ·ÎÁ÷°ú ÀÎÅÍ·¢Æà ÇÒ ¼ö ÀÖ´Ù.

»ç¿ëÀÚ¿Í ¿ªÇÒ °ü¸® ÄÄÆ÷³ÍÆ®´Â NMS¿¡ ´Ù¾çÇÑ ·¹º§ÀÇ Á¢±ÙÀ» Á¦°øÇÑ´Ù. °¡Àå ³ÐÀº ³×Æ®¿öÅ©´Â Çϳª ÀÌ»óÀÇ ÆÀÀÌ °ü¸®ÇÑ´Ù. »ç¿ëÀڵ鿡°Ô ÇÒ´çµÈ ¿ªÇÒÀº µðÀÚÀΰú Ä¿½ºÅÒ º¸¾È Á¤Ã¥ÀÇ ±¸Çö »Ó¸¸ ¾Æ´Ï¶ó Ä¿½ºÅÒ ¿öÅ©Ç÷οì¿Í À̺¥Æ® Áõ´ë Ç÷ο쿡 »ç¿ëµÉ ¼ö ÀÖ´Ù.

¿öÅ©ÇÃ·Î¿ì °ü¸® ¹× ½ÇÇàÀº Àå´Ü±â °ü¸® ŽºÅ©ÀÇ °ü¸® ¹× ÀÚµ¿ ½ÇÇàÀ» Á¦°øÇÑ´Ù. ÀÚµ¿È­µÈ Ä¿½ºÅÒ ¿öÅ©Ç÷οì´Â ´Ù¾çÇÑ Á¶Á÷ÀÇ ´Ù¾çÇÑ ºñÁö´Ï½º ¿ä±¸»çÇ׿¡ NMS°¡ äÅõǴµ¥ ÇʼöÀûÀÎ ¿ä¼ÒÀÌ´Ù.

NMS ¸ðµç NMS°¡ ÀÌ ¸ðµç ÄÄÆ÷³ÍÆ®µéÀ» °®°í ÀÖ´Â °ÍÀº ¾Æ´Ï°í ¾î¶² °ÍÀº º¸´Ù ±¸Ã¼È­µÈ º¯À̸¦ °®°í ÀÖÀ» ¼öµµ ÀÖ´Ù. ÀÌ ±Û¿¡¼­ °ËÅäµÇ´Â °ÍµéÀº NMS¸¦ ±¸¼ºÇÏ°í ÀÖ´Â °Íµé¿¡ ´ëÇÑ ÀϹÝÀû °³¿ä¶ó ÇÒ ¼ö ÀÖ´Ù.

OpenNMS ¾ÆÅ°ÅØÃÄ
±×¸² 1À» ·¹ÆÛ·±½º·Î »ç¿ëÇÏ¿© ·¹ÆÛ·±½º ±¸¼º°ú OpenNMSÀÇ ¾ÆÅ°ÅØÃÄ »çÀÌÀÇ ±¸Ã¼Àû ±¸¼ºµµ¸¦ ±×¸± ¼ö ÀÖ´Ù. ±×¸² 2´Â OpenNMS¸¦ ±¸¼ºÇÏ°í ÀÖ´Â ÄÄÆ÷³ÍÆ®ÀÌ´Ù.

±×¸² 2. OpenNMSÀÇ ÄÄÆ÷³ÍÆ®
Figure 2. Components of OpenNMS

¹é¿£µå Ƽ¾î¿¡¼­ OpenNMS´Â RDBMS·Î¼­ PostgreSQL (Âü°íÀÚ·á)À» »ç¿ëÇÑ´Ù. ÇÁ·ÐÆ® Ƽ¾î¿¡¼­ Apache Jakarta Tomcat (Âü°íÀÚ·á)ÀÇ JSP¿Í ¼­ºí¸´ ±â¼úÀ» »ç¿ëÇÏ¿© À¯¿¬ÇÏ°Ô Ä¿½ºÅ͸¶ÀÌ¡ ÇÒ ¼ö ÀÖ´Â »ç¿ëÀÚ ÀÎÅÍÆäÀ̽º¸¦ Á¦°øÇÑ´Ù. ±âÁ¸ Perl ±â¹ÝÀÇ »ç¿ëÀÚ ÀÎÅÍÆäÀ̽º ¿ª½Ã »ç¿ëÇÒ ¼ö ÀÖ´Ù. ¿©·¯ °ü¸® À¯Æ¿¸®Æ¼µéÀº UNIX ½© ½ºÅ©¸³Æ®¿Í Perl·Î ÀÛ¼ºµÈ´Ù. OpenNMS´Â ±×¸² 1ÀÇ ¸ð´ÏÅ͸µ, °ü¸®, Á¦¾î ÄÄÆ÷³ÍÆ®¿¡ »óÀÀÇÏ´Â ÄÁÄ¿·±Æ® Àڹ٠ŽºÅ©¸¦ »ç¿ëÇÏ¿© ÀÌ ±â´ÉÀ» Á¦°øÇÑ´Ù. ÀÌ·¯ÇÑ µ¿½Ã ŽºÅ©µéÀº ±×¸² 2¿¡ ¿øÀ¸·Î Ç¥ÇöµÇ¾ú´Ù.

OpenNMS µ¥¸ó: ÄÁÄ¿·±Æ®(concurrent) °ü¸® ŽºÅ©
OpenNMSÀÇ ¸ð´ÏÅ͸µ, Á¦¾î, µ¥ÀÌÅÍ ¼öÁý ±â´ÉµéÀº µ¥¸ó(daemon) À̶ó°í ÇÏ´Â ÄÁÄ¿·±Æ® ŽºÅ©¿¡ ÀÇÇØ ÇÚµéµÈ´Ù. (BSD UNIX ±Ô¾à). Ç¥ 1Àº ÄÁÄ¿·±Æ® °ü¸® ŽºÅ©µé ÀÌ´Ù.

Ç¥ 1. OpenNMSÀÇ ÄÁÄ¿·±Æ® °ü¸® ŽºÅ©
Concurrent Task daemon À̸§ Description
Action daemon actiond ÀÚµ¿ ¾×¼Ç ½ÇÇà ÀåÄ¡. ÀÎÄ¿¹Ö À̺¥Æ®¿¡ ±Ù°ÅÇÑ ÀÚµ¿È­µÈ ¾×¼Ç.
Collection daemon collectd °ü¸®µÇ´Â ³ëµå¿¡¼­ µ¥ÀÌÅÍ ¼öÁý.
Capability daemon capsd ¹ß°ßµÈ ³ëµå »ó¿¡¼­ ±â´É °Ë»ç ¼öÇà. ¾Ë·ÁÁø ¼­ºñ½º ÇÁ·ÎÅäÄÝ Áö¿øÀ» À§ÇÑ ÀÎÅÍÆäÀ̽º Æ÷Æ® Á¡°Ë.
DHCP daemon dhcpd OpenNMS¿¡ DHCP Ŭ¶óÀ̾ðÆ® ±â´É Á¦°ø.
Discovery daemon discovery °ü¸®µÇ´Â ³×Æ®¿öÅ© ³ëµåÀÇ ÃÊ±â ¹× Áö¼ÓÀûÀÎ ¹ß°ß.
Events manager daemon eventd ´Ù¸¥ ÄÁÄ¿·±Æ® ŽºÅ©¿¡¼­ ³ª¿Â À̺¥Æ®ÀÇ °ü¸® ¹× (RDBMS¿¡) ÀúÀå
Notification daemon notifd ¿ÜºÎ °øÁö ¼öÇà.
Outage manager daemon outaged À̺¥Æ®¸¦ °áÇÕÇÏ¿© °¢ °ü¸®µÇ´Â ³ëµå/¼­ºñ½º¿¡ outage ºä Á¦°ø.
Poller daemon pollerd °ü¸®µÇ´Â ³ëµå/¼­ºñ½º¸¦ Á¤±âÀûÀ¸·Î µî·ÏÇÏ¿© ÀÛµ¿ »óÅ °áÁ¤.
RTC manager daemon rtcd ½Ç½Ã°£À¸·Î µ¥ÀÌÅ͸¦ ¼öÁýÇÏ¿© °ü¸®µÇ´Â ³ëµå/¼­ºñ½ºÀÇ »ç¿ëÀÚ Á¤ÀÇ Ä«Å×ÄÚ¸®¿¡ °¡¿ë¼º Á¤º¸ Á¦°ø.
SNMP trap daemon trapd SNMP Æ®·¦(À̺¥Æ®) ÇÚµé.
Threshold service daemon threshd ƯÁ¤ ÀÓ°è°ª¿¡ µµ´ÞÇÑ ¾ÖÆ®¸®ºäÆ® °ª¿¡ ±Ù°ÅÇÏ¿© ³ëµå/¼­ºñ½º °¨½Ã.

OpenNMS È®ÀåÇϱâ
OpenNMSÀÇ ÇÁ·ÐÆ® Ƽ¾î¿¡¼­ ƯÁ¤ ¼öÁ÷ ¾ÖÇø®ÄÉÀÌ¼Ç µµ¸ÞÀο¡ ½Ã½ºÅÛÀ» Àû¿ëÇÏ´Â °ÍÀº ¸Å¿ì ´Ü¼øÇÏ´Ù. JSP ±â¼úÀÇ À¯¿¬¼º ´öÅÿ¡ OpenNMSÀÇ »ç¿ëÀÚ ÀÎÅÍÆäÀ̽º´Â ÀÚ¹Ù °³¹ßÀÚµéÀÌ ½±°Ô Ä¿½ºÅ͸¶ÀÌ¡ÇÒ ¼ö ÀÖ´Ù. »õ·Î¿î NMS ¾ÖÇø®ÄÉÀÌ¼Ç ·ÎÁ÷Àº JSP ÆÄÀÏ°ú ¼­ºí¸´ ÄÚµùÀÇ °áÇÕÀ» ÅëÇØ ºü¸£°Ô Ãß°¡µÉ ¼ö ÀÖ´Ù.

OpenNMS´Â °ü¸®µÇ´Â µð¹ÙÀ̽º/¼­ºñ½º¿ë SNMP Áö¿øÀÌ µÊÀ¸·Î¼­ Ç¥ÁØÀÌ µÇ¾ú´Ù. SNMP´Â °ü¸®°¡ Æí¸®ÇÑ µð¹ÙÀ̽º/¼­ºñ½º¿ë »ê¾÷ Ç¥ÁØÀÌ´Ù. ÀÌ Ç¥ÁØÀº OpenNMS°¡ TCP/IP ³×Æ®¿öÅ© »ó¿¡¼­ ´Ù¾çÇÏ°í ±¤¹üÀ§ÇÑ ±âÁ¸ µð¹ÙÀ̽º¸¦ °ü¸® ÇÒ ¼ö ÀÖµµ·Ï ÇÑ´Ù.

SNMP ¹Û¿¡¼­, OpenNMS´Â ´ëÁßÀûÀÎ ¼ÒÇÁÆ®¿þ¾î ¼­ºñ½º(FTP, ÆÄÀÏ ¼­¹ö, µ¥ÀÌÅͺ£À̽º ¼­¹ö)¸¦ ŽÁöÇÏ°í °ü¸®ÇÒ ¼ö ÀÖ´Ù. ¼­ºñ½º ½ºÆÑÀÇ Ç÷¯±×ÀÎÀ» Á¦°øÇÏ°í À̸¦ ¼öÇàÇÏ´ÂÁö¸¦ °¨½ÃÇÑ´Ù. »õ·Î¿î Ç÷¯±×Àΰú ¸ð´ÏÅ͸¦ ¸¸µêÀ¸·Î¼­ OpenNMS´Â »õ·Î¿î µð¹ÙÀ̽º ¶Ç´Â ¼­ºñ½º¸¦ ŽÁöÇÏ°í °¨½ÃÇÒ Á¤µµ·Î È®ÀåµÉ ¼ö ÀÖ´Ù.

Ä¿½ºÅÒ ±â´ÉÀÇ Ç÷¯±×ÀÎ ¸¸µé±â
OpenNMSÀÇ µð½ºÄ¿¹ö¸® µ¥¸ó(discovery)Àº °ü¸®µÇ´Â ³×Æ®¿öÅ©ÀÇ ÃÊ±â ¹× Áö¼ÓÀûÀÎ ¹ß°ßÀ» ¸Ã°íÀÖ´Ù. ÀÏ´Ü discovery°¡ ³ëµå¸¦ ¹ß°ßÇÏ¸é ±â´É µ¥¸ó¿¡°Ô ³ëµå°¡ Áö¿øÇÏ´Â ¼­ºñ½º°¡ ¹«¾ùÀÎÁö¸¦ ¿äûÇÑ´Ù. ±â´É µ¥¸óÀº ƯÁ¤ ÇÁ·ÎÅäÄÝ Ç÷¯±×ÀÎÀ» ÅëÇØ ¹Ýº¹ÇÏ¿© ¼­ºñ½º°¡ Áö¿øÇÏ´Â °ÍÀ» °Ë»çÇÑ´Ù. Ä¿½ºÅÒ ÇÁ·ÎÅäÄÝ Ç÷¯±×ÀÎÀ» ÀÛ¼ºÇÏ´Â °ÍÀº ´Ü¼øÇÏ´Ù. ´Ü°è´Â ´ÙÀ½°ú °°´Ù:

  1. org.opennms.netmgt.capsd.Plugin ÀÎÅÍÆäÀ̽º¸¦ ±¸ÇöÇϴ Ŭ·¡½º¸¦ ¸¸µç´Ù. ƯÈ÷ ÀÌ ÀÎÅÍÆäÀ̽º´Â Ç÷¯±×ÀÎÀÌ ±¸ÇöÇØ¾ß ÇÏ´Â ¼¼ °³ÀÇ ¸Þ¼Òµå¸¦ °®°íÀÖ´Ù. (Ç¥ 2):

    Ç¥ 2. org.opennms.netmgt.capsd.Plugin ÀÎÅÍÆäÀ̽ºÀÇ ¸Þ¼Òµå
    ¸Þ¼Òµå À̸§°ú »çÀÎ Description
    String getProtocolName(); ÀÌ Ç÷¯±×ÀÎÀÇ ÇÁ·ÎÅäÄÝ À̸§À» ¸®ÅÏÇÑ´Ù.
    Boolean isProtocolSupported(java.nnet.InetAddress address);
    boolean isProtocolSupported(java.nnet.InetAddress address, java.util.Map properties);
    ÇÊ¿äÇÒ °æ¿ì ÀÎÄ¿¹Ö ¸Å°³º¯¼ö¿ë ÇÁ·ÎÆÛƼ ¸ÊÀ» »ç¿ëÇÏ¿© ÀÌ ÇÁ·ÎÅäÄÝÀÌ ±¸Ã¼ÀûÀÎ InetAddressÀÇ Áö¿øÀ» ¹Þ´ÂÁö¸¦ °áÁ¤ÇÑ´Ù.



  2. /etc/capsd-configuration.xml ÆÄÀÏ¿¡ ÇÁ·ÎÅäÄÝ-Ç÷¯±×ÀÎ Á¤ÀǸ¦ ¸¸µç´Ù. ÀÌ°ÍÀº capsd°¡ ½ÃÀÛÇÏ´Â µ¿¾È »ç¿ëÇÒ ÇÁ·ÎÅäÄÝ Ç÷¯±×ÀÎÀ» °áÁ¤Çϱâ À§ÇØ ÀаԵȴÙ.

Ä¿½ºÅÒ Æú·¯(poller) ¸ð´ÏÅÍ ¸¸µé±â
OpenNMS°¡ °ü¸® ³ëµå»óÀÇ ¼­ºñ½º¸¦ °áÁ¤ÇÑ ÈÄ¿¡ Æú·¯ µ¥¸ó(pollerd)À» »ç¿ëÇÏ¿© °ü¸®µÇ´Â µð¹ÙÀ̽º/¼­ºñ½º¸¦ Á¤±âÀûÀ¸·Î µî·ÏÇÑ´Ù. ±×µéÀÌ ÀÛµ¿ÇÏ°í ÀÖ´Ù´Â °ÍÀ» È®ÀÎÇϱâ À§Çؼ­ÀÌ´Ù. pollerd´Â ÁöÁ¤µÈ Æú·¯ ¸ð´ÏÅÍ "Ç÷¯±×ÀÎ"À» ÅëÇØ ¹Ýº¹Çϸ鼭 °³º° ¼­ºñ½º ÆúµéÀ» ¼öÇàÇÑ´Ù:

  1. org.opennms.netmgt.poller.ServiceMonitor ÀÎÅÍÆäÀ̽º¸¦ ±¸ÇöÇϴ Ŭ·¡½º¸¦ ¸¸µç´Ù. ƯÈ÷ ÀÌ ÀÎÅÍÆäÀ̽º´Â ¸ð´ÏÅÍ°¡ ±¸ÇöÇØ¾ß ÇÏ´Â ´Ù¼¸ °³ÀÇ ¸Þ¼Òµå¸¦ °®°íÀÖ´Ù. (Ç¥ 3):

    Ç¥ 3. org.opennms.netmgt.poller.ServiceMonitor ÀÎÅÍÆäÀ̽ºÀÇ ¸Þ¼Òµå
    ¸Þ¼Òµå À̸§°ú »çÀÎ Description
    void initialize(java.util.Map parameters);
    void initialize(org.opennms.netmgt.poller.NetworkInterface iface);
    ù ¹ø° Çü½ÄÀº ½ÃÀÛÇÏ´Â µ¿¾È È£ÃâµÇ¾î Ç÷¯±×ÀÎÀÌ ÃʱâÈ­ Áß¿¡ ½ÇÇàÇÒ ¼ö ¾øµµ·Ï ÇÒ ±âȸ¸¦ Á¦°øÇÑ´Ù. µÎ ¹ø° Çü½ÄÀº »õ·Î¿î ³ëµå°¡ ¹ß°ßµÉ ¶§¸¶´Ù ¼­ºñ½º¸¦ Áö¿øÇϱâ À§ÇØ, ±×¸®°í ù ¹ø° poll()ÀÌ È£ÃâµÇ±â Àü¿¡ È£ÃâµÈ´Ù.
    void release();
    void release(java.net.NetworkInterface iface);
    ù ¹ø° Çü½ÄÀº OpenNMS Á¤Áö ½Ã È£ÃâµÈ´Ù. µÎ ¹ø° Çü½ÄÀº ¼­ºñ½º¸¦ Áö¿øÇϱâ À§ÇØ ¹ß°ßµÈ ³ëµå°¡ ´õÀÌ»óÀÇ Æú¸µ ½ºÄÉÁì¿¡¼­ Á¦°ÅµÉ ¶§ ¸¶´Ù È£ÃâµÈ´Ù.
    int poll(java.net.NetworkInterface iface, org.opennms.netmgt.utils.EventProxy eproxy, java.util.Map parameters); °¨½ÃµÇ°í ÀÖ´Â ¼­ºñ½º¸¦ ¿©ÀüÈ÷ »ç¿ëÇÒ ¼ö ÀÖ´ÂÁö¸¦ °áÁ¤ÇÒ ¶§ »ç¿ëµÇ´Â ¸Þ¼ÒµåÀÌ´Ù. ¼­ºñ½º°¡ ½ÇÇà ÁßÀÏ °æ¿ì¿¡´Â ServiceMonitor. SERVICE_AVAILABLEÀ»±×·¸Áö ¾ÊÀ¸¸é ServiceMonitor. SERVICE_UNAVAILABLEÀ» ¸®ÅÏÇØ¾ß ÇÑ´Ù.

  2. /etc/poller-configuration.xml ÆÄÀÏ¿¡ ¼­ºñ½º Á¤ÀÇ¿Í ¸ð´ÏÅÍ Á¤ÀǸ¦ ¸¸µç´Ù.

OpenNMS ´Ù¿î·Îµå ¹× ¼³Ä¡
¸®´ª½º ¹èÆ÷ÆÇ°ú OpenNMSÀÇ ½Ã½ºÅÛ ¿ä±¸»çÇ×À» ¼÷ÁöÇØ¾ß ÇÑ´Ù. ÀÚ¼¼ÇÑ ¼³Ä¡ ¹× ¾÷µ¥ÀÌÆ® ÀýÂ÷´Â ÀÌ ±Û¿¡¼­ ´Ù·çÁö´Â ¾Ê´Â´Ù. Âü°íÀÚ·á ¼½¼Ç¿¡¼­ OpenNMSÀÇ ÃֽŠ¹öÀü ´Ù¿î·Îµå Á¤º¸¸¦ °Ë»öÇÒ ¼ö ÀÖ´Ù.

OpenNMSÀÇ ÃֽŠ¾ÈÁ¤ ¹öÀüÀº 1.0.2ÀÌ´Ù. ÀÌ ±ÛÀÇ ¸ðµç ÄÚµå´Â ÀÌ ¾ÈÁ¤ ¹öÀüÀ¸·Î Å×½ºÆ®¸¦ ÇÑ °ÍÀÌ´Ù. OpenNMS1.0.2´Â ¼¼ °¡Áö ¸®´ª½º ½ºÆÑ(Red Hat Linux 7 & 8, Mandrake 8)¿¡¼­ Å×½ºÆ®µÇ¾ú´Ù. º¹ÀâÇÑ ½Ã½ºÅÛÀ¸·Î Ãʱ⠽ÇÇè ½Ã ÀÌ ¼¼ ¹èÆ÷ÆÇ Áß Çϳª¸¦ »ç¿ëÇϱ⠹ٶõ´Ù.

OpenNMS¸¦ »ç¿ëÇÏ¿© JMX °¡´ÉÇÑ ClickMeter °¨½ÃÇϱâ
capsd Ç÷¯±×Àΰú pollerd ¸ð´ÏÅ͸¦ ¸¸µêÀ¸·Î¼­ OpenNMS¿Í JMX ±¸µ¿ÀÇ ClickMeter¸¦ ÅëÇÕÇÒ ¼ö ÀÖ´Ù´Â °ÍÀ» ¾Ë°í ÀÖ´Ù. ÇÏÁö¸¸ ÇÑ°¡Áö Áú¹®ÀÌ ³²¾ÆÀÖ´Ù. OpenNMS´Â JMX¸¦ Áö¿øÇÏÁö ¾Ê´Â°¡?

½ÉÁö¾î À¯¸íÇÑ »ó¿ë NMS ¿ÀÆÛ¸µ¿¡¼­µµ °°Àº °æÇâÀ» ¿³º¼ ¼ö ÀÖ´Ù. JMX°¡ ±âº»ÀûÀ¸·Î Áö¿øµÇÁö ¾Ê´Â´Ù. JMX ±¸µ¿ÀÇ µð¹ÙÀ̽º¿Í ¼­ºñ½º´Â ÁøÇàÁß¿¡ Àֱ⠶§¹®À̱⵵ÇÏ°í SNMP ȣȯÀÌ Á¦ 3ÀÇ µð¹ÙÀ̽º¿Í ¼­ºñ½ºÀÇ °ü¸®¿¡ Á¦°øµÇ¾ú±â ¶§¹®À̱⵵ ÇÏ´Ù.

JMXÀÇ ÅëÇÕ °úÁ¤ÀÌ NMS º¥´õµé »çÀÌ¿¡¼­ ºñ±³Àû ´À¸®°Ô ÁøÇàµÇ´Â Áß¿äÇÑ ÀÌÀ¯°¡ ÀÖ´Ù. JMX »ç¿ë ·¹º§°ú ¿¡ÀÌÀüÆ® ·¹º§ÀÌ 1.1 ½ºÆÑ¿¡´Â ÀûÀýÈ÷ Á¤ÀǵǾîÀÖ´õ¶óµµ ³×Æ®¿öÅ©¸¦ ÅëÇØ JMX ¿¡ÀÌÀüÆ®¿¡ ¾×¼¼½º ÇÏ´Â ¹æ¹ýÀº ¾ÆÁ÷±îÁö´Â ¸ðÈ£ÇÏ´Ù.

JMX Remoting µô·¹¸¶
JMX ¿¡ÀÌÀüÆ®°¡ ³×Æ®¿öÅ© °ü¸® ¾ÖÇø®ÄÉÀ̼ÇÀ̳ª ºÐ»ê ¼­ºñ½º¿¡ ÀÇÇØ ³×Æ®¿öÅ©¸¦ ÅëÇØ ¾×¼¼½ºµÇ´Â ¹æ¹ýÀº JMX RemotingÀ̶ó°í ¾Ë·ÁÁ®ÀÖ°í ÀÌ°ÍÀÌ JSR 160ÀÇ ÇÙ½É »ç¾ÈÀÌ´Ù.(Âü°íÀÚ·á).

JSR 160Àº JMX ¿¡ÀÌÀüÆ®ÀÇ ¹ß°ßÀÌ ³×Æ®¿öÅ©¸¦ ÅëÇؼ­³ª ¿¡ÀÌÀüÆ®ÀÇ ±â´É¿¡ ¿ø°ÝÀ¸·Î ¾×¼¼½ºÇÏ´Â ±¸Ã¼ÀûÀÎ ¹æ¹ýÀ» ÅëÇØ ¾î¶»°Ô ¼öÇàµÇ´ÂÁö¸¦ Á¤ÇÑ´Ù. ¿©±â¿¡´Â »ç¿ëµÉ ÇÁ·ÎÅäÄÝ ¾î´ðÅÍ °ü·Ã ½ºÆѵéÀÌ Æ÷Ç﵃ °ÍÀÌ´Ù. JMX Remoting 1.2 ½ºÆÑÀÌ ¸¶°¨µÉ ¶§±îÁö OpenNMS¿Í ClickMeter MBeanÀ» °ü¸®ÇÏ´Â JMX ¿¡ÀÌÀüÆ® »çÀÌÀÇ Åë½Å ´ë¾ÈÀ» ã¾Æ¾ß ÇÑ´Ù.

JMX remoting ¼Ö·ç¼Ç
¹°·Ð, JMX ¿¡ÀÌÀüÆ®ÀÇ ÁÖ¿ä ¸ñÀûÀº ÀÌ°ÍÀÌ °ü¸®ÇÏ´Â JMX MBeans·ÎÀÇ ¿ø°Ý ¾×¼¼½º¸¦ Á¦°øÇÏ´Â °ÍÀÌ´Ù. ¿¡ÀÌÀüÆ®µéÀº Ä¿³ØÅÍ¿Í ÇÁ·ÎÅäÄÝ ¾î´ðÅ͸¦ »ç¿ëÇÏ¿© NMS ¾ÖÇø®ÄÉÀÌ¼Ç ¶Ç´Â ºÐ»ê ¼­ºñ½ºµé°ú Åë½ÅÇÑ´Ù.

ClickMeterÀÇ °æ¿ì JMX ·¹ÆÛ·±½º ±¸ÇöÀÇ °£´ÜÇÑ ¿¡ÀÌÀüÆ®¸¦ »ç¿ëÇß´Ù. ¿©±â¿¡´Â HTTP ÇÁ·ÎÅäÄÝ ¾î´ðÅÍ°¡ Æ÷ÇԵǾî ÀÖ´Ù. ÀÌ °£´ÜÇÑ ¿¡ÀÌÀüÆ®´Â HTTP ÇÁ·ÎÅäÄÝ ¾î´ðÅ͸¦ ÅëÇØ ¸ðµç MBeansÀÇ ¾ÖÆ®¸®ºäÆ®¿Í ÀÛµ¿À» ³ëÃâÇÑ´Ù.

HTTP ¾î´ðÅ͸¦ »ç¿ëÇÏ¿© ÀÛ¾÷À» ÃÖ¼ÒÈ­Çϱâ
OpenNMS¿Í ClickMeter MBean »çÀÌÀÇ Åë½ÅÀ» À§ÇØ JMX ·¹ÆÛ·±½º ±¸Çö¿¡¼­ °£´ÜÇÑ ¿¡ÀÌÀüÆ®¿Í HTTP ÇÁ·ÎÅäÄÝÀ» ½±°Ô »ç¿ëÇÒ ¼ö ÀÖ´Ù. ±×¸² 3Àº Åë½Å ¹æ½ÄÀ» Á¦¾ÈÇÑ °ÍÀÌ´Ù. ÀÛµ¿Áß¿¡ OpenNMSÀÇ capsd´Â ŽÁöµÈ ³ëµå¸¦ °Ë»çÇÏ¿© "CLICKMETER" ¼­ºñ½º°¡ Áö¿øµÇ´ÂÁöÀÇ ¿©ºÎ¸¦ º»´Ù. pollerd´Â ŽÁöµÈ ¼­ºñ½º¸¦ Á¤±âÀûÀ¸·Î µî·ÏÇÏ¿© À̵éÀÌ ÀÛµ¿ÁßÀÓÀ» È®ÀÎÇÑ´Ù. ÀÌ·¯ÇÑ Å½Ä§µéÀ» ¼ö¿ëÇϱâ À§Çؼ­ incPanelValue È£Ãâ ÀÛµ¿À» »ç¿ëÇÒ ¼ö ÀÖ´Ù. Žħ ¸ÞÄ¿´ÏÁòÀ¸·Î¼­ incPanelValue ÀÛµ¿À» »ç¿ëÇÏ´Â °ÍÀÇ ÀÌÁ¡Àº OpenNMSÀÇ Å½Áö ¹× µî·Ï ¾×¼ÇÀ» ½Ã°¢ÀûÀ¸·Î º¼ ¼ö ÀÖ´Ù´Â °ÍÀÌ´Ù. ClickMeterÀÇ °ªÀº Žħ ¶§¸¶´Ù Áõ°¡ÇÑ´Ù.

±×¸² 3. HTTP ¾î´ðÅÍ·Î ClickMeter¿¡ ¾×¼¼½ºÇϱâ
Figure 3. Accessing ClickMeter with the HTTP adapter

ÀÌÁ¦ ³²Àº ÀÏÀº ClickMeter MBean ¿¡¼­ incPanelValue ÀÛµ¿¿¡ ¾×¼¼½º Çϱâ À§ÇØ HTTP ÇÁ·ÎÅäÄÝ ¾î´ðÅ͸¦ »ç¿ëÇÏ´Â ¹æ¹ýÀ» °áÁ¤ÇÏ´Â ÀÏÀÌ´Ù. ºê¶ó¿ìÀú¸¦ »ç¿ëÇÏ¿© ´ÙÀ½ URL¿¡¼­ JMX ¿¡ÀÌÀüÆ®¿¡ ¾×¼¼½ºÇÒ ¼ö ÀÖ´Ù:

http://<host of agent>:8082/

¹°·Ð À̸¦ ¼öÇàÇϱâ Àü¿¡ ¿¡ÀÌÀüÆ®°¡ ½ÇÇàµÇ´ÂÁö È®ÀÎÇØ¾ß ÇÑ´Ù. ±×·± ´ÙÀ½ ¹öÆ°À» Ŭ¸¯ÇÏ¿© ³ëÃâµÈ incPanelValue ÀÛµ¿À» ½ÇÇàÇÑ´Ù. (±×¸² 4).

±×¸² 4. Žħ URL °áÁ¤Çϱâ
Figure 4. Determining the probe URL

±×¸² 4 ¿¡¼­, ÀÌ ÀÛµ¿¿¡ ¾×¼¼½ºÇϱâ À§ÇØ »ç¿ëµÈ URLÀº ´ÙÀ½°ú °°´Ù:


http://<host of agent>:8082/InvokeAction//MBean:name=ClickMeter/
action=incPanelValue?action=incPanelValue

ClickMeter ¾ÖÇø®ÄÉÀ̼ÇÀÌ ¿Ã¹Ù¸£°Ô ±â´ÉÀ» ¹ßÈÖÇÏ°í ÀÖ´Ù¸é °á°úÆäÀÌÁö¿¡´Â incPanelValue Successful À̶ó´Â ¹®ÀåÀÌ ¶á´Ù. ÀÌ Á¤º¸¸¦ »ç¿ëÇÏ¿© OpenNMS¿¡¼­ ¿ø°ÝÀ¸·Î MBean¿¡ ¾×¼¼½ºÇÏ°Ú´Ù.

OpenNMS ÅëÇÕ
ÀÌÁ¦ »õ·Î¿î "CLICKMETER" ¼­ºñ½º¸¦ OpenNMS¿¡ ÅëÇÕÇÒ Áغñ°¡ µÇ¾ú´Ù. À̸¦ À§ÇØ capability µ¥¸ó(capsd)¿ë Ç÷¯±×Àΰú poller µ¥¸ó(pollerd)¿ë ¸ð´ÏÅ͸¦ ¸¸µé°ÍÀÌ´Ù.

OpenNMS µð½ºÄ¿¹ö¸®¿ë ClickMeterPlugin
capability µ¥¸ó Ç÷¯±×ÀÎ ÄÚµå´Â org.opennms.netmgt.capsd.ClickMeterPlugin Ŭ·¡½º¿¡ ÀÖ´Ù. ÀÌ Ç÷¯±×ÀÎÀº org.opennms.netmgt.capsd.Plugin ÀÎÅÍÆäÀ̽º¸¦ ±¸ÇöÇØ¾ß ÇÑ´Ù´Â °ÍÀ» ¾Ë°íÀÖ´Ù. Listing 1Àº AbstractPlugin ÀÇ Å¬·¡½ºÀÌ´Ù. OpenNMS°¡ Á¦°øµÇ´Â Ŭ·¡½º´Â µÎ °³ÀÇ ¸Å°³º¯¼ö ÃßÃâ ¸Þ¼Òµå(getKeyedInteger() & getKeyedString())¸¦ Á¦°øÇÑ´Ù.

Listing 1. ClickMeterPlugin °ü¸® Ŭ·¡½º


public final class ClickMeterPlugin extends AbstractPlugin {
    private static final String   PROTOCOL_NAME = "CLICKMETER";
    private static final int  DEFAULT_PORT  = 8082;
    private final static int  DEFAULT_RETRY = 0;
    private final static int  DEFAULT_TIMEOUT = 5000; // in milliseconds

getProtocolName() ¸Þ¼Òµå´Â Listing 2ÀÇ ÄÚµå·Î °£´ÜÈ÷ ±¸ÇöµÈ´Ù:

Listing 2. getProtocolName() ¸Þ¼Òµå

public String getProtocolName() {
     return PROTOCOL_NAME;
     }

Listing 3Àº isProtocolSupported() ¸Þ¼Òµå°¡ ±¸ÇöµÇ´Â ¹æ¹ýÀÌ´Ù:

Listing 3. isProtocolSupported() ¸Þ¼Òµå

public boolean isProtocolSupported(InetAddress address) {
  return isClickMeter(address, DEFAULT_PORT, DEFAULT_RETRY, DEFAULT_TIMEOUT);
  }

º¸´Ù ±ä ¹öÀüÀÇ isProtocolSupported() ¸Þ¼Òµå¿¡¼­´Â, ¿ø°Ý JMX ¿¡ÀÌÀüÆ®¿¡ ¾×¼¼½ºÇÏ´Â URLÀ» ¸¸µå´Âµ¥ »ç¿ëµÇ´Â ÀÎÄ¿¹Ö ¸Å°³º¯¼ö¸¦ ó¸®ÇÑ´Ù. ÀÏ´Ü, IP¿Í Æ÷Æ®°¡ ¸Å°³º¯¼ö¿¡¼­ ¾ò¾îÁö¸é, isProtocolSupported()´Â isClickMeter() ¸Þ¼Òµå¸¦ È£ÃâÇÏ¿© ClickMeter°¡ ÀÌ ³ëµå¿¡¼­ È°¼ºÀÎÁö¸¦ °áÁ¤ÇÑ´Ù. Listing 4´Â isClickMeter()¿¡ ´ëÇÑ ÄÚµåÀÌ´Ù. URL¿ëÀ¸·Î Á¤ÀÇµÈ µÎ °³ÀÇ »ó¼ö°¡ ClickMeterÀÇ incPanelValue ÀÛµ¿À» À§ÇÑ HTTP ÇÁ·ÎÅäÄÝ ¾î´ðÅÍ ¾×¼¼½º URL°ú »óÀÀÇÑ´Ù´Â °Í¿¡ ÁÖ¸ñÇ϶ó.

Listing 4. isClickMeter() ¸Þ¼Òµå

private final static String CLICK_METER_BEAN_LOCATOR_URL =
 "/InvokeAction//MBean:name=ClickMeter/action=incPanelValue?
   action=incPanelValue";
      private final static String CLICK_METER_ID = "incPanelValue Successful";

      private boolean isClickMeter(InetAddress host, int port, 
        int retries, int timeout) {
          Category log = ThreadCategory.getInstance(getClass());
          boolean foundClickMeter = false;
          for (int attempts=0; attempts <= retries && !foundClickMeter; 
            attempts++)
          {                  
                  URL jmxLink = null;
                  InputStream iStream = null;
               try
               {
                      String hostIP = host.getHostAddress();
                      jmxLink = new URL("http", hostIP, port, 
                        CLICK_METER_BEAN_LOCATOR_URL);
                      if (scanURL(jmxLink, CLICK_METER_ID, log)) {
                            foundClickMeter = true;
                            break;   // get out of the for loop
                           }
                     }
          catch(IOException e) {
                    log.info("ClickMeterPlugin: Error communicating 
                       with host " + host.getHostAddress(), e);
                    foundClickMeter = false;
              }
          }
          return foundClickMeter;
  }

scanURL() ¸Þ¼Òµå(Listing 5)´Â ÀÎÀڷμ­ URL°ú ½ºÆ®¸µÀ» ÃëÇÏ´Â ÇïÆÛ ¸Þ¼ÒµåÀÌ´Ù. ÀÌ°ÍÀº URL¿¡ ¾×¼¼½ºÇÏ°í °á°ú ÆäÀÌÁö¿¡¼­ ÁöÁ¤µÈ ½ºÆ®¸µÀ» ã´Â´Ù. ½ºÆ®¸µÀÌ ¹ß°ßµÇ¸é true¸¦ ¸®ÅÏÇÑ´Ù. ±×·¸Áö ¾ÊÀ» °æ¿ì false¸¦ ¸®ÅÏÇÑ´Ù. ÀÌ °æ¿ì, ClickMeterÀÇ incPanelValue ÀÛµ¿¿ë URL¿¡ ¾×¼¼½ºÇÑ ÈÄ¿¡ incPanelValue Successful ½ºÆ®¸µÀ» ã°íÀÖ´Ù.

Listing 5. scanURL() ¸Þ¼Òµå

private boolean scanURL(URL inURL, String toSearch, Category log)    {
                  InputStream iStream = null;
           try {                       
                     iStream = inURL.openStream();
                     BufferedReader urlReader = 
                       new BufferedReader(new InputStreamReader(iStream));
     
                     String curLine = urlReader.readLine();
                        do  {
                                if (curLine.indexOf(toSearch) != -1) {
                                       return true;
                                      }
                           curLine = urlReader.readLine();
                         } while (curLine != null);
          
              }
                 catch  (IOException e) {
                              e.fillInStackTrace();
                      log.debug("ClickMeterMonitor.poll: 
                        Error reading from URL:" 
                        + inURL, e);
    
                  }
               finally  {
                   try  {
                       if(iStream != null)
                             iStream.close();
                    }
                    catch(IOException e) {
                        e.fillInStackTrace();
                        log.debug("ClickMeterMonitor.poll: 
                          Error closing stream to URL.", e);
                    }
               }
      return false;
   }
}

Ç÷¯±×ÀÎ ÅëÇÕ¿¡ ÇÊ¿äÇÑ µÎ ¹ø° ´Ü°è´Â <OpenNMS installation directory>/etc/capsd-configuration.xml ÆÄÀÏÀ» ÆíÁýÇÏ°í ÇÁ·ÎÅäÄÝ-Ç÷¯±×ÀÎ Á¤ÀǸ¦ Ãß°¡ÇÏ´Â °ÍÀÌ´Ù.(Listing 6):

Listing 6. ÇÁ·ÎÅäÄÝ-Ç÷¯±×ÀÎ Á¤ÀÇ

  <protocol-plugin 
    protocol="CLICKMETER"  
    class-name="org.opennms.netmgt.capsd.ClickMeterPlugin" 
    scan="on" >
    <property key="port" value="8082"/>
    <property key="timeout" value="2000"/>
    <property key="retry" value="1"/>
  </protocol-plugin>

OpenNMS°¡ °ü¸®µÇ´Â ³ëµå¸¦ °Ë»çÇؾßÇÒ IP ¹üÀ§¸¦ Á¦ÇÑÇϱâ À§ÇØ discovery-configuration.xml ÆÄÀÏÀ» ÆíÁýÇÏ°í ½ÍÀ» °ÍÀÌ´Ù. Listing 7¿¡¼­´Â µÎ °³ÀÇ IP·Î Á¦ÇÑÇÏ¿© ClickMeter ¾ÖÇø®ÄÉÀ̼ÇÀÌ »¡¸® À§Ä¡ÇÒ ¼ö ÀÖµµ·Ï ÇÑ´Ù:

Listing 7. µð½ºÄ¿¹ö¸® ¹üÀ§ Á¦ÇÑ

  <include-range retries="2" timeout="3000">
    <begin>192.168.23.75</begin>
    <end>192.168.23.76</end>
  </include-range>

OpenNMS¿ë ClickMeterMonitor
´ÙÀ½¿¡´Â, poller µ¥¸ó(pollerd) ¸ð´ÏÅÍ Ç÷¯±×ÀÎ, org.opennms.netmgt.poller.ClickMeterMonitor Ŭ·¡½º¸¦ ¸¸µç´Ù: ÀÌ Å¬·¡½º´Â org.opennms.netmgt.poller.ServiceMonitor ÀÎÅÍÆäÀ̽º¸¦ ±¸ÇöÇØ¾ß ÇÑ´Ù. OpenNMS´Â ÀÌ ÀÎÅÍÆäÀ̽ºÀÇ ¸ðµç ¸Þ¼Òµå¿ë µðÆúÆ® ±¸ÇöÀ» °®°íÀÖ´Â ±âº» Ŭ·¡½º(org.opennms.netmgt.poller.IPv4Monitor)¸¦ Á¦°øÇÑ´Ù. Ưº°ÇÑ ÃʱâÈ­³ª ¸±¸®½º°¡ ÇÊ¿ä¾ø±â ¶§¹®¿¡ poll() ¸Þ¼Òµå¸¦ ¿À¹ö¶óÀ̵ù ÇϸéµÈ´Ù.(Listing 8):

Listing 8. poll() ¸Þ¼Òµå

public int poll(NetworkInterface iface, Map parameters) {
       if(iface.getType() != NetworkInterface.TYPE_IPV4)
              throw new NetworkInterfaceNotSupportedException("Unsupported 
                    interface type, only TYPE_IPV4 currently supported");

    Category log = ThreadCategory.getInstance(getClass());
    int retry   = 
      getKeyedInteger(parameters, "retry", DEFAULT_RETRY);
    int port    = 
      getKeyedInteger(parameters, "port", DEFAULT_PORT);
    int timeout = 
      getKeyedInteger(parameters, "timeout", DEFAULT_TIMEOUT);

    InetAddress ipv4Addr = (InetAddress)iface.getAddress();
            String hostIP = ipv4Addr.getHostAddress();
    if (log.isDebugEnabled())
               log.debug("ClickMeterMonitor.poll: Polling interface: " 
                     + hostIP + " timeout: " + timeout + " retry: " + retry);
    
    int serviceStatus = ServiceMonitor.SERVICE_UNAVAILABLE;
    for (int attempts=0; attempts <= retry && serviceStatus != 
              ServiceMonitor.SERVICE_AVAILABLE; attempts++) {
                  URL jmxLink = null;
                  InputStream iStream = null;
        try {  
                        jmxLink = new URL("http", hostIP, port, 
                                    CLICK_METER_BEAN_LOCATOR_URL);
                        if (scanURL(jmxLink, CLICK_METER_ID, log)) {
                            serviceStatus = ServiceMonitor.SERVICE_AVAILABLE;
                            break;                             }
                     }    
      catch(IOException e) {
        e.fillInStackTrace();
        log.debug("ClickMeterMonitor.poll: 
               IOException while polling address: " 
               + ipv4Addr, e);
      }
    }  // of for
       return serviceStatus;
  }

scanURL() ÇïÆÛ ¸Þ¼Òµå(Listing 8)¸¦ »ç¿ëÇÏ¿© ClickMeter MBean¿¡ ¾×¼¼½ºÇÑ´Ù´Â °Í¿¡ ÁÖ¸ñÇ϶ó.

<OpenNMS installation directory>/etc/poller-configuration.xml ÆÄÀÏ¿¡¼­, ¼­ºñ½º Á¤ÀÇ ¿£Æ®¸®¸¦ Ãß°¡ÇØ¾ß ÇÑ´Ù. Listing 9¿¡¼­ Æú¸µ °£°ÝÀ» 10,000 ¹Ð¸®ÃÊ·Î Á¤Çß´Ù:

Listing 9. poller µ¥¸ó ¼­ºñ½º Á¤ÀÇ

  <service name="CLICKMETER" interval="10000" 
    user-defined="false" status="on">
      <parameter key="timeout" value="3000"/>
      <parameter key="port" value="8082"/>
  </service>

°°Àº poller-configuration.xml ÆÄÀÏ¿¡ ¸ð´ÏÅÍ Á¤ÀǸ¦ »ðÀÔÇØ¾ß ÇÑ´Ù. (Listing 10):

Listing 10. poller µ¥¸ó ¸ð´ÏÅÍ Á¤ÀÇ

<monitor service="CLICKMETER"  
  class-name="org.opennms.netmgt.poller.ClickMeterMonitor" />

ClickMeter ¼­ºñ½º·Î OpenNMS Å×½ºÆ®Çϱâ
¼Ò½º¿¡¼­ µÎ °³ÀÇ Ç÷¯±×ÀÎÀ» ±¸ÇöÇÏ·Á¸é compile.bat ÆÄÀÏÀ» »ç¿ëÇÑ´Ù. ¸î¸î OpenNMS ¶óÀ̺귯¸® ÆÄÀÏÀ» <article code distribution>/lib µð·ºÅ丮¿¡ º¹»çÇØ¾ß ÇÒ °ÍÀÌ´Ù. compile.bat ÆÄÀÏÀº dwClickMeterJMX.jar¸¦ ¸¸µç´Ù. ÀÌ °á°ú JAR ÆÄÀÏÀ» <OpenNMS installation directory>/lib µð·ºÅ丮¿¡ ³õÀ¸¸é OpenNMS´Â ½ÃÀÛÇÒ ¶§ ÀÚµ¿ÀûÀ¸·Î »õ·Î¿î Ç÷¯±×ÀÎÀ» ·ÎµùÇÏ°Ô µÈ´Ù.

¹Ýµå½Ã OpenNMSÀÇ À¥ ±â¹Ý GUI¿¡ ¾×¼¼½ºÇÏ¿© ½Ã½ºÅÛÀ» ½ÃÀÛÇ϶ó. ÀϹÝÀûÀÎ URLÀº ´ÙÀ½°ú °°´Ù:


http://<host of OpenNMS>:8080/opennms/

ÇÁ·ÒÇÁÆ®µÇ¸é userid¿¡´Â adminÀ» Æнº¿öµå¿¡´Â adminÀ» »ç¿ëÇÑ´Ù. (±×¸² 5):

±×¸² 5. OpenNMS ½ÃÀÛ ½ºÅ©¸°
Figure 5. OpenNMS startup screen

OpenNMS°¡ ½ÃÀÛÇÏ´Â µ¿¾È µÎ¹øÀ̳ª ºü¸£°Ô Áõ°¡ÇÏ´Â ClickMeter Ä«¿îÆ®¸¦ º¸°ÔµÈ´Ù. ClickMeter´Â pollerd°¡ ÀÛµ¿ÇÒ ¶§ º¸Åë 10ÃÊ °£°ÝÀ¸·Î Áõ°¡ÇÑ´Ù.

ÀÏ´Ü capsd°¡ ClickMeter ¾ÖÇø®ÄÉÀ̼ÇÀ» ŽÁöÇϸé À̸¦ °ü¸® ¼­ºñ½º·Î¼­ RDBMS¿¡ Ãß°¡ ÇÒ °ÍÀÌ´Ù. Á¦Ç°ÀÇ °æ¿ì OpenNMSÀÇ ÀÚ»ê °ü¸® ±â´ÉµéÀº ÀÌ ¼­ºñ½º¸¦ º¸´Ù ÀÚ¼¼È÷ ¹üÁÖÈ­ ÇØ ³õÀ» ¼ö ÀÖ´Ù. ¿ì¸® ½ÇÇè¿¡¼­´Â OpenNMS GUI¸¦ »ç¿ëÇÏ¿© ClickMeter ¼­ºñ½º¸¦ ¿¬±¸ÇÏ°í ÀÌ¿¡ °³ÀÔµÈ ÀÚ¼¼ÇÑ À̺¥Æ®¸¦ º¼ ¼ö ÀÖ´Ù.(±×¸² 6):

±×¸² 6. ClickMeter ¼­ºñ½º¸¦ °ü¸®ÇÏ´Â OpenNMS
Figure 6. OpenNMS managing ClickMeter service

Âü°íÀÚ·á

¸ñ Â÷:
Å»ýÀû º¹À⼺
OpenNMS
NMS ºÐ¼®
OpenNMS ¾ÆÅ°ÅØÃÄ
OpenNMS È®ÀåÇϱâ
JMX µô·¹¸¶
OpenNMS integration
ClickMeter ¼­ºñ½º·Î OpenNMS Å×½ºÆ®Çϱâ
Âü°í ÀÚ·á
ÇÊÀÚ ¼Ò°³
±â»ç¿¡ ´ëÇÑ Æò°¡
°ü·Ã dW ¸µÅ©:
Subscribe to the developerWorks newsletter
US ¿ø¹® Àбâ
ÇÊÀÚ¼Ò°³
Photo of Sing LiSing Li´Â Early Adopter JXTA¿Í Professional JiniÀÇ ÀúÀÚÀ̸ç Wrox Press¿¡¼­ Ãâ°£µÈ ¸¹Àº Ã¥µéÀ» Àú¼úÇß´Ù.
ÀÌ ±â»ç¿¡ ´ëÇÏ¿© ¾î¶»°Ô »ý°¢ÇϽʴϱî?

Á¤¸» ÁÁ´Ù (5) ÁÁ´Ù (4) ±×Àú±×·¸´Ù (3) ¼öÁ¤º¸¿ÏÀÌ ÇÊ¿äÇÏ´Ù(2) ÇüÆí¾ø´Ù (1)

  È¸»ç¼Ò°³  |  °³ÀÎÁ¤º¸ º¸È£Á¤Ã¥  |  ¹ý·ü  |  ¹®ÀÇ