62
RHQ Open Source Monitoring & Management Project 원원원 http://tedwon.com/display/dev/RHQ 2011. 12. 3.

RHQ 공감 Seminar 6th

  • Upload
    ted-won

  • View
    1.348

  • Download
    4

Embed Size (px)

DESCRIPTION

Open Source Monitoring & Management Project

Citation preview

Page 1: RHQ 공감 Seminar 6th

RHQOpen Source Monitoring & Management Project

원종석http://tedwon.com/display/dev/RHQ 2011. 12. 3.

Page 2: RHQ 공감 Seminar 6th

Agenda

• RHQ 소개

• Demo

• RHQ Contribution 활동 소개

Page 3: RHQ 공감 Seminar 6th

What is RHQ?

Page 4: RHQ 공감 Seminar 6th

For Instance...

• 내가 만든 Java Application 을 모니터링하고 싶다 .

• 장기간 지속적으로 ... Chart 도 필요하고 ... Statistics 도 필요하고 ...

• 직접 만들려고 해보면 너무 일이 커지고

• 돈 주고 사기에는 너무 비싸고

• 손쉽게 공짜로 사용 할 수 있는 것 어디 없을까 ?

• 게다가 좀 더 체계적이고 다양한 기능을 제공했으면 좋겠다 .

Page 5: RHQ 공감 Seminar 6th

"RHQ"

would be One of the Solutions!!

Page 6: RHQ 공감 Seminar 6th

RHQ would be one of the Solutions!

Page 7: RHQ 공감 Seminar 6th

RHQ would be one of the Solutions!

Page 8: RHQ 공감 Seminar 6th

RHQ would be one of the Solutions!

Page 9: RHQ 공감 Seminar 6th

RHQ would be one of the Solutions!

Page 10: RHQ 공감 Seminar 6th

RHQ would be one of the Solutions!

Page 11: RHQ 공감 Seminar 6th

RHQ Project Home

http://rhq-project.org

http://www.jboss.org/jopr

Page 12: RHQ 공감 Seminar 6th

Conclusions in Advance

• RHQ Server 와 Agent 설치

• Java Application 에 JMX MBean 추가

• JMX MBean 기반 Plugin Descriptor XML 파일 정의

• 나의 Application 용 JMX Plugin 을 RHQ Server 에 등록

• 모니터링 및 관리 시작 !!

Page 13: RHQ 공감 Seminar 6th

What is RHQ?

• JBoss Enterprise Management Platform

• JBoss Middleware 제품의 모니터링 Platform

o JBoss AS 5/6o HornetQo Infinispano BlackTieo Mobicentso CirrASo etc ...

Page 14: RHQ 공감 Seminar 6th

http://www.jboss.com/products

RHQ

Page 15: RHQ 공감 Seminar 6th

What is RHQ?

• Make technologies more manageable!!

• Aims to develop a common services management platform

• Java 기반의 Open Source System Management Project

• Sigar API 를 사용하여 System Information Gathering (Mem, CPU)

• JMX 기술 기반으로 원격 관리 기능 제공 - JMX Plugin

• OS 플랫폼에서 Server 리소스까지 전반적인 모니터링 / 관리 기능 제공

• Enterprise Management Platform

Page 16: RHQ 공감 Seminar 6th

What is RHQ?

• Client - Server Architecture

• Agent 의 plugin 을 통해서 모니터링 정보 수집

• 필요한 plugin 인만 구성해서 사용하면 적절

• 실시간 모니터링 서버는 아님 -  최소 30 초 주기로 모니터링

• 장기간 모니터링에 적합

• 설치시 DBMS 로 MySQL 를 지원하지 않으며 , PostgreSQL/Oracle 을 지원

• Jopr 라는 이름에서 RHQ 라는 이름 하나로 통합 - 2010 년

Page 17: RHQ 공감 Seminar 6th

What is RHQ?

Page 18: RHQ 공감 Seminar 6th

RHQ Management Functionality

• Inventory

• Monitoring

• Configuration

• Events

• Control

Page 19: RHQ 공감 Seminar 6th

RHQ Management Functionality

• Inventoryo 모니터링 대상 정의 / 등록 / 관리o Resource directory

• Monitoringo Monitoring any resourceo Automatic discovery of resourceso Monitoring for availability and performanceo Complex alerting

• Configurationo Configuration managemento Audited, validated configuration editing and history

Page 20: RHQ 공감 Seminar 6th

RHQ Management Functionality

• Eventso WAS 의 로그 에러 트래킹과 레포트

• Controlo 원격에서 operation 실행o Operation 스케쥴링

Page 21: RHQ 공감 Seminar 6th

RHQ License

GNU General Public License

GNU Lesser General Public License

http://svn.rhq-project.org/repos/rhq/trunk/LICENSE

Page 22: RHQ 공감 Seminar 6th

• RHQ Commercial Product Version

• RHQ 유료 기술 지원 버전

• Code base 동일

• Fully quality-tested & certified by Red Hat

• JBoss ON 으로 줄여서 호칭

                      http://www.jboss.com/products/jbosson           http://en.wikipedia.org/wiki/JBoss_operations_network

JBoss Operations Network

Page 23: RHQ 공감 Seminar 6th

• Embedded Jopr• JBoss Application Server 전용 administration console• JBoss AS built-in admin console• RHQ 코드 재사용

JBoss AS 5/6 Admin Console

Page 24: RHQ 공감 Seminar 6th

RHQ History

• 2005 년 부터 시작한 Hyperic & Red Hat joint project

• Hyperic 이 Sigar API를 기반으로 프로젝트를 처음 시작

• Red Hat 이 확장 및 발전

• 2008 년 2 월 RHQ 1.0 배포

• Red Hat and Hyperic Launch Common Services Platform Project & Hyperic for RHX - 2008. 2

• RHQ Project Overview 

• Red Hat RHQ vs. SpringSource Hyperic HQ

Page 25: RHQ 공감 Seminar 6th

RHQ 3 Implementation Techniques

• JBoss Seam 2.1

• JBoss AS 4.2.3

JSF 1.2 + EJB 3

Page 26: RHQ 공감 Seminar 6th
Page 27: RHQ 공감 Seminar 6th
Page 28: RHQ 공감 Seminar 6th
Page 29: RHQ 공감 Seminar 6th
Page 30: RHQ 공감 Seminar 6th
Page 31: RHQ 공감 Seminar 6th
Page 32: RHQ 공감 Seminar 6th

Pop-up Reference

Migrating Hyperic from EJB to Spring from JBoss to Apache Tomcat

Hyperic HQ

EJB + JBoss AS (EAR)

Spring + Apache Tomcat (WAR)

Page 33: RHQ 공감 Seminar 6th

Migrating Hyperic from EJB to Spring from JBoss to Apache Tomcat

Page 34: RHQ 공감 Seminar 6th

RHQ 4 New Techniques Adoption

• New Ajax Dynamic GUI

• Use Java SE 6 Script Feature for RHQ CLI

SmartGWT

Page 35: RHQ 공감 Seminar 6th

RHQ 4's New GUI

• New Ajax Dynamic UI

• Use Java SE 6 Script Feature for CLI

SmartGWT

Page 36: RHQ 공감 Seminar 6th

Useful Documentation Links

RHQ User Documentation

RHQ Server Installation Guide

RHQ Server Users Guide

RHQ Agent Users Guide

Frequently Asked Questions

Page 37: RHQ 공감 Seminar 6th

• Server/Agent Architecture 여기에 내용을 넣어주세요 .

RHQ Architecture

• Server / Agent Architecture

Page 38: RHQ 공감 Seminar 6th

RHQ Architecture

Page 39: RHQ 공감 Seminar 6th

RHQ Server Architecture

Page 40: RHQ 공감 Seminar 6th

• OS 당 하나의 Agent 설치• 각 Plugin 은 특정 대상 (resource) 을 전담해서 모니터링• DB 저장 없는 Standalone Java Instance• 주기적으로 모니터링 정보를 수집하여 서버로 레포팅• JBoss Remoting  프레임워크를 이용한 socket 통신

RHQ Agent Architecture

Page 41: RHQ 공감 Seminar 6th

RHQ Monitor Architecture

Page 42: RHQ 공감 Seminar 6th

RHQ Monitor Architecture

OS

Process

• 모니터링 대상을 Resource 라고 통칭한다 .

Page 43: RHQ 공감 Seminar 6th

RHQ Agent Plugins

• http://rhq-project.org/display/RHQ/Plugin+Community

• 다양한 리소스를 위한 Plugin 제공

• Apache, Tomcat, JBoss AS

• MySQL, PostgreSQL, Oracle

• JMX Plugin 

• 필요에 맞는 Custom Plugin 제작 가능

Page 44: RHQ 공감 Seminar 6th

RHQ Agent Plugin XML Schema

See rhq-plugin.xsd

Page 45: RHQ 공감 Seminar 6th

Writing Custom JMX Plugins

• Java Application 을 모니터링 할 수 있는 Custom JMX Plugin 제작

• rhq-plugin.xml 파일에 JMX 에서 정의한 Attribute/Operation 정의

• 모니터링 대상 데이터를 선정하고 Chart 속성을 정의

• Jar Archive 로 패키징

• RHQ Server 에 Custom JMX Plugin 등록

Page 46: RHQ 공감 Seminar 6th

Writing Custom JMX Plugins

• Sample Custom JMX Plugin 프로젝트 구조

Page 47: RHQ 공감 Seminar 6th

Writing Custom JMX Plugins

• JMX Plugin 을 상속하면 Plugin Descriptor XML 파일만 정의하면 OK

Page 48: RHQ 공감 Seminar 6th

Writing Custom JMX Plugins

• Download Sample Project: custom-jmx-plugin-demo-code.zip

• RHQ Server 에 Custom JMX Plugin 등록 후

• RHQ Agent Plugin 업데이트 실시

• RHQ Server 에 신규 리소스 추가

• 모니터링 시작 !

• See Writing And Using Your Own Custom JMX Plugin

• See Demo Video

Page 49: RHQ 공감 Seminar 6th

Example: Sample JMX Application

• Sample JMX Application 클래스 : Business Class

public class MyJmxObject implements MyJmxObjectMBean {

    // 모니터링 하고자하는 대상 데이터

    public double getRandomNumber() {

        return Math.random();    }

    // 원격에서 실행하고자 하는 Operation

    public String toUppercase(String string) {

        return (string != null) ? string.toUpperCase() : "";    }

}

Page 50: RHQ 공감 Seminar 6th

Example: Sample JMX Application

• Sample JMX Application MBean 인터페이스

public interface MyJmxObjectMBean {

    // Attribute:  모니터링 하고자하는 대상 데이터    double getRandomNumber();

    // Operation:  원격에서 실행하고자 하는 Operation    String toUppercase(String string);

}

Page 51: RHQ 공감 Seminar 6th

Example: Sample JMX Application

• Sample JMX Application 프로젝트 구조

Page 52: RHQ 공감 Seminar 6th

Example: Sample JMX Application

• Sample JMX Application 을 구동합니다

java -Dcom.sun.management.jmxremote.port=19999 \-Dcom.sun.management.jmxremote.authenticate=false \-Dcom.sun.management.jmxremote.ssl=false \-jar ./jmxapp.jar

Page 53: RHQ 공감 Seminar 6th

Example: rhq-plug.xml

<plugin name="CustomJmx" displayName="Custom JMX Plugin">   <depends plugin="JMX" useClasses="true"/>   <service name="First Custom Service">                ==> 모니터링 서비스 정의      <operation name="toUppercase"                         ==> Operation 정의                 displayName="String To Uppercase"/>      <metric property="RandomNumber"                    ==> Chart 정의              displayType="summary"              defaultInterval="30000"/>   </service></plugin>

• Central Server GUI 에 표현될 서비스 스타일 정의

Page 54: RHQ 공감 Seminar 6th

Example: Custom JMX Plugin

 

Page 55: RHQ 공감 Seminar 6th

Example: Custom JMX Plugin

 

Page 56: RHQ 공감 Seminar 6th

Online Demos

http://rhq-project.org/display/JOPR2/Demos

Page 57: RHQ 공감 Seminar 6th

Videos about RHQ, Jopr and JBossON

http://support.rhq-project.org/display/RHQ/Videos

Page 58: RHQ 공감 Seminar 6th

RHQ / JBoss ON Team

 

https://plus.google.com/114249341487134308671/posts/6gNTfxEr1zQ

Red Hat building in Westford, Massachusetts

Page 59: RHQ 공감 Seminar 6th

Demo

Page 60: RHQ 공감 Seminar 6th

RHQ ContributionsKorean Translation Jobs

Page 61: RHQ 공감 Seminar 6th

Thanks

Q&A

Page 62: RHQ 공감 Seminar 6th

JBoss Community (http://www.jboss.org)Korea JBoss User Group (http://cafe.naver.com/jbossug)