2012-12-04 5 views
1

나는 Jonbo 네트워크를 모니터링하기위한 커스텀 플러그인을 작성했습니다. 그러나 RHQ 서버/JON에서는 모니터링을위한 메트릭이 추가되지 않습니다.낙타 경로 모니터링을위한 RHQ/JON 에이전트 구성

RHQ- 에이전트 로그 파일에서 다음을 볼 수 있습니다.

2012-12-04 13:47:13,515 DEBUG [InventoryManager.discovery-1] (rhq.core.pc.inventory.InventoryManager)- Executing discovery for [Srikanth Custom Service] Resources... 
2012-12-04 13:47:13,515 DEBUG [ResourceDiscoveryComponent.invoker.daemon-1] (org.rhq.plugins.jmx.MBeanResourceDiscoveryComponent)- Discovering MBean resources with object name query template: org.apache.camel:type=routes,* 
2012-12-04 13:47:13,531 DEBUG [ResourceDiscoveryComponent.invoker.daemon-1] (org.rhq.plugins.jmx.MBeanResourceDiscoveryComponent)- Found [1] mbeans for query [org.apache.camel:type=routes,*]. 
2012-12-04 13:47:13,531 DEBUG [ResourceDiscoveryComponent.invoker.daemon-1] (org.rhq.plugins.jmx.MBeanResourceDiscoveryComponent)- **[0] services have been added** 
2012-12-04 13:47:13,531 DEBUG [InventoryManager.discovery-1] (rhq.core.pc.inventory.InventoryManager)- Discovery for [Srikanth Custom Service] resources completed in [16] ms 

여기서는 ON JON을 배포 한 플러그인 코드를 보내고 있습니다.

RHQ-plugin.xml에

<?xml version="1.0" encoding="UTF-8" ?> 
<!-- Writing custom plugin for RHQ/JON --> 
<plugin name="SampleRHQPlugin" 
     displayName="Sample RHQ JMX Plugin" 
     version="1.0" 
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
     xmlns="urn:xmlns:rhq-plugin" 
     xmlns:c="urn:xmlns:rhq-configuration"> 
    <!-- Writing custom plugin for RHQ/JON --> 
    <depends plugin="JMX" useClasses="true"/> 
<!-- Custom service metrics--> 
    <service name="Srikanth Custom Service" 
      description="Our Srikanth MBean custom service that has a code associated with it." 
      discovery="org.rhq.plugins.jmx.MBeanResourceDiscoveryComponent" 
      class="org.rhq.plugins.jmx.MBeanResourceComponent"> 
<!-- Custom run Inside--> 
     <runs-inside> 
     <parent-resource-type name="JMX Server" plugin="JMX"/> 
     <parent-resource-type name="JBossAS Server" plugin="JBossAS"/> 
     </runs-inside> 

<!-- plugin configuration metrics--> 
     <plugin-configuration> 
     <c:simple-property name="objectName" readOnly="true" default="org.apache.camel:type=routes,*" /> 
     <c:simple-property name="connectorAddress" default="service:jmx:rmi://localhost:44444/jndi/rmi://localhost:1099/karaf-root" required="false" type="string" description="The connection url in the form of a JMXServiceURL - this should only be set if the JVM has JMX Remoting enabled" /> 
     <c:simple-property name="installURI" required="false" type="string" description="The installation path for the selected server type which will be used to find client libraries (if appropriate)" /> 
     <c:simple-property name="principal" required="false" default="smx" description="The login principal/username" /> 
     <c:simple-property name="credentials" required="false" type="password" default="smx" description="The login credentials/password" /> 
     </plugin-configuration> 
<!-- Custom metrics--> 
     <metric property="ExchangesCompleted" 
       displayName="ExchangesCompleted" 
       defaultOn="true" 
       displayType="summary" 
       defaultInterval="30000" 
       description="Number of completed exchanges"/> 
    <!-- END of Custom metrics --> 
    </service> 
    <!-- END of service --> 
</plugin> 
<!-- END of plugin--> 

어떻게 모니터링 JON 서버에이 ExchangesCompleted 메트릭을 추가하려면?

도와주세요.

답변

2

JON이 Red Hat에서 제공하는 퓨즈 제품에 대한 플러그인을 제공한다는 사실을 알고 계십니까?

메시지를 작성하는 시점에서 JBoss 브랜드의 퓨즈 제품이 출시되지 않았기 때문에 아직 지원되지 않았고 제공되지 않았습니다.

이제는 휠을 다시 발명하지 않아도되지만 플러그인을 사용해 보셨 으면합니다.

건배. 내가 옆에 퓨즈 제품에 대한 아무것도 알고 있지만 여기 객체 이름 패턴을 사용으로

0

, 난 당신이 단순히 특히

<metric property="ExchangesCompleted" 

에서 속성의 이름에 맞는 표현을 공격하지 않는 것이 의심 :

<c:simple-property name="objectName" readOnly="true" default="org.apache.camel:type=routes,*" /> 

하는 org.apache.camel:type=routes,*와 개체의 ExchangesCompleted이 실제로 존재하는지 확인하십시오.

아마도 개체 이름 패턴을 사용하지 않고이 단일 개체 이름을 좁히는 것으로 시작하십시오.