Expand my Community achievements bar.

SOLVED

Connectivity/Monitoring of CQ from SCOM using beanspy/Mbeans

Avatar

Level 2

Hi ,
Does anyone know how can SCOM (System Center Operations Manager) connect to CQ's Mbean using Beanspy. What is the format of xml that is used .
The same thing is monitor to the Tomcat server also (using its mbean).
and the XML that is used there is mentioned below.

<Configuration>
  <ComputerName>$Target/Host/Property[Type="JEE!Microsoft.JEE.ApplicationServer.Monitored.Instance"]/HostName$</ComputerName>
  <Protocol>$Target/Host/Property[Type="JEE!Microsoft.JEE.ApplicationServer.Monitored.Instance"]/Protocol$</Protocol>
  <Port>$Target/Host/Property[Type="JEE!Microsoft.JEE.ApplicationServer.Monitored.Instance"]/Port$</Port>
  <BaseURL />
  <JMXQuery>Catalina:j2eeType=WebModule,*</JMXQuery>
  <AdditionalArguments>&amp;MaxDepth=1</AdditionalArguments>
  <RequestBody />
  <HealthyExpression>
    <SimpleExpression>
      <ValueExpression>
        <!-- The XPATH if it were applied directly against the XML in a browser should look like: -->
        <!-- /MBeans/org.apache.catalina.mbeans.ContextMBean[@objectName = "Catalina:j2eeType=WebModule,name=//localhost/,J2EEApplication=none,J2EEServer=none"]/Properties/state -->
        <XPathQuery Type="String">MBeans/MBean[@Name='org.apache.catalina.mbeans.ContextMBean' and @objectName="$Target/Property[Type="JEE!Microsoft.JEE.Application"]/ObjectName$"]/Properties/Property[@Name='stateName']</XPathQuery>
      </ValueExpression>
      <Operator>Equal</Operator>
      <ValueExpression>
        <Value Type="String">STARTED</Value>
      </ValueExpression>
    </SimpleExpression>
  </HealthyExpression>
  <NotHealthyExpression>
    <SimpleExpression>
      <ValueExpression>
        <!-- The XPATH should look like: -->
        <!-- /MBeans/org.apache.catalina.mbeans.ContextMBean[@objectName = "Catalina:j2eeType=WebModule,name=//localhost/,J2EEApplication=none,J2EEServer=none"]/Properties/state -->
        <XPathQuery Type="String">MBeans/MBean[@Name='org.apache.catalina.mbeans.ContextMBean' and @objectName="$Target/Property[Type="JEE!Microsoft.JEE.Application"]/ObjectName$"]/Properties/Property[@Name='stateName']</XPathQuery>
      </ValueExpression>
      <Operator>NotEqual</Operator>
      <ValueExpression>
        <Value Type="String">STARTED</Value>
      </ValueExpression>
    </SimpleExpression>
  </NotHealthyExpression>
  <IntervalSeconds>900</IntervalSeconds>
  <TimeoutSeconds>300</TimeoutSeconds>
</Configuration>

.So Similarly what is the format of XML that is used with CQ or How can the CQ application be monitored using SCOM /Beanspy..
Any help is greatly appreciated.

1 Accepted Solution

Avatar

Correct answer by
Employee

Hi,

As I understand it, Beanspy is a JavaEE web application which gets deployed into a JavaEE web container (Tomcat in your example) or application server and exposes MBeans over HTTP/JMX. If you are running AEM inside a application server, I would assume that you could deploy Beanspy and see various AEM MBeans through that same interface.

In a standalone deployment, it would be more complicated. You would essentially need to repackage Beanspy as an OSGi bundle and use the OSGi HttpService to expose the servlets.

And example of something similar is is Jolokia (http://www.jolokia.org/) which does the same thing, but using JSON, not XML. Jolokia is deployable either as a JavaEE webapp or as an OSGi bundle.

Regards,

Justin

View solution in original post

4 Replies

Avatar

Correct answer by
Employee

Hi,

As I understand it, Beanspy is a JavaEE web application which gets deployed into a JavaEE web container (Tomcat in your example) or application server and exposes MBeans over HTTP/JMX. If you are running AEM inside a application server, I would assume that you could deploy Beanspy and see various AEM MBeans through that same interface.

In a standalone deployment, it would be more complicated. You would essentially need to repackage Beanspy as an OSGi bundle and use the OSGi HttpService to expose the servlets.

And example of something similar is is Jolokia (http://www.jolokia.org/) which does the same thing, but using JSON, not XML. Jolokia is deployable either as a JavaEE webapp or as an OSGi bundle.

Regards,

Justin

Avatar

Level 2

Can you please provide steps on how to expose an OSGI bundle via OSGI HttpService ?

Avatar

Employee

That topic is reasonably well covered in the HttpService specification. Do you have a specific question?

Avatar

Level 1

Hi Justin,

we found this forum post since we tried to implement jolokia agent (1.3.7) into our apache felix running oak version 1.2.2.

The agent installs correctly and we can query the available jmx properties using /jolokia context path.

But since we want to enable basic authentication we also want to configure the agent as described in the jolokia docs via the configuration admin service. But in this config menu jolokia is not available.

So is there a specific part we are missing in order to run jolokia within apache felix for AEM?

kind regards