rhq 공감 seminar 6th

Post on 01-Nov-2014

1.346 Views

Category:

Technology

4 Downloads

Preview:

Click to see full reader

DESCRIPTION

Open Source Monitoring & Management Project

TRANSCRIPT

RHQOpen Source Monitoring & Management Project

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

Agenda

• RHQ 소개

• Demo

• RHQ Contribution 활동 소개

What is RHQ?

For Instance...

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

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

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

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

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

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

"RHQ"

would be One of the Solutions!!

RHQ would be one of the Solutions!

RHQ would be one of the Solutions!

RHQ would be one of the Solutions!

RHQ would be one of the Solutions!

RHQ would be one of the Solutions!

RHQ Project Home

http://rhq-project.org

http://www.jboss.org/jopr

Conclusions in Advance

• RHQ Server 와 Agent 설치

• Java Application 에 JMX MBean 추가

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

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

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

What is RHQ?

• JBoss Enterprise Management Platform

• JBoss Middleware 제품의 모니터링 Platform

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

http://www.jboss.com/products

RHQ

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

What is RHQ?

• Client - Server Architecture

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

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

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

• 장기간 모니터링에 적합

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

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

What is RHQ?

RHQ Management Functionality

• Inventory

• Monitoring

• Configuration

• Events

• Control

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

RHQ Management Functionality

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

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

RHQ License

GNU General Public License

GNU Lesser General Public License

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

• 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

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

JBoss AS 5/6 Admin Console

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

RHQ 3 Implementation Techniques

• JBoss Seam 2.1

• JBoss AS 4.2.3

JSF 1.2 + EJB 3

Pop-up Reference

Migrating Hyperic from EJB to Spring from JBoss to Apache Tomcat

Hyperic HQ

EJB + JBoss AS (EAR)

Spring + Apache Tomcat (WAR)

Migrating Hyperic from EJB to Spring from JBoss to Apache Tomcat

RHQ 4 New Techniques Adoption

• New Ajax Dynamic GUI

• Use Java SE 6 Script Feature for RHQ CLI

SmartGWT

RHQ 4's New GUI

• New Ajax Dynamic UI

• Use Java SE 6 Script Feature for CLI

SmartGWT

Useful Documentation Links

RHQ User Documentation

RHQ Server Installation Guide

RHQ Server Users Guide

RHQ Agent Users Guide

Frequently Asked Questions

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

RHQ Architecture

• Server / Agent Architecture

RHQ Architecture

RHQ Server Architecture

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

RHQ Agent Architecture

RHQ Monitor Architecture

RHQ Monitor Architecture

OS

Process

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

RHQ Agent Plugins

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

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

• Apache, Tomcat, JBoss AS

• MySQL, PostgreSQL, Oracle

• JMX Plugin 

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

RHQ Agent Plugin XML Schema

See rhq-plugin.xsd

Writing Custom JMX Plugins

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

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

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

• Jar Archive 로 패키징

• RHQ Server 에 Custom JMX Plugin 등록

Writing Custom JMX Plugins

• Sample Custom JMX Plugin 프로젝트 구조

Writing Custom JMX Plugins

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

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

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() : "";    }

}

Example: Sample JMX Application

• Sample JMX Application MBean 인터페이스

public interface MyJmxObjectMBean {

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

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

}

Example: Sample JMX Application

• Sample JMX Application 프로젝트 구조

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

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 에 표현될 서비스 스타일 정의

Example: Custom JMX Plugin

 

Example: Custom JMX Plugin

 

Online Demos

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

Videos about RHQ, Jopr and JBossON

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

RHQ / JBoss ON Team

 

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

Red Hat building in Westford, Massachusetts

Demo

RHQ ContributionsKorean Translation Jobs

Thanks

Q&A

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

top related