Friday, April 30, 2010

RHQ/Jopr plugin development and versions

Recently a user showed up on IRC and said he had written a plugin and that deploying it is throwing this error:

2010-04-30 14:26:10,601 WARN [org.rhq.enterprise.server.core.plugin.AgentPluginDeploymentScanner] Failed to scan plugin [...../myPlugin-1.0.jar] found on filesystem. Skipping it.

Cause: java.lang.Exception: No version is defined for plugin jar [..../myPlugin-1.0.jar]. A version must be defined either via the MANIFEST.MF [Implementation-Version] attribute or via the plugin descriptor 'version' attribute.


While the error message is accurate, it is still not obvious, what is going on, as most of the plugins in the RHQ source tree do not explicitly set a version number.

As the message says you need to:

  • either explicitly set a version in the plugin descriptor like

    <plugin name="myPlugin" version="1.2.3" ... >

  • or tell maven to add a Specification-Version: in MANIFEST.MF, which automatically happens when you have the rhq-parent pom as (indirect) parent of your pom, which then contains this:
    <plugin>

    <artifactId>maven-jar-plugin</artifactId>

    <configuration>

    <archive>

    <manifest>

    <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>



In most cases, following the RHQ-version is easiest, as you don't have to do anything. If you want to do release-cycles outside of RHQ, the explicit version is for sure better.

Monday, April 26, 2010

Nagios support coming to RHQ...

Alexander Kiefer started working on supporting the Nagios monitoring system from within RHQ. The idea here is not to plugin the Nagios plugins directly into RHQ, but to talk from RHQ (better, a RHQ plugin) to the Nagios instance via mk_livestatus for Nagios. And overview of the setup is shown in the next figure.

NagiosSetup.png


The first cut of the implementation is mainly about talking to Nagios via mk_livestatus. Next steps will be

  • Implement the plugin in a way that the user only needs to modify the plugin descriptor to monitor additional Nagios resources
  • Implement dynamic metadata so that the plugin can automatically detect resource types present in Nagios and detect resources of the given types.


Alex has started documenting the Plugin in the RHQ Wiki

Code for this is in the nagios branch in git.

PLEASE try it and give feedback on the rhq-devel mailing list

Monday, April 19, 2010

Muskelkater (German)

Vorgestern bin ich das erste Mal dieses Jahr wieder die 21km gelaufen und merke deutlich, dass ich noch nicht so richtig in der Form für die Strecke bin. Ab Kilometer 14 fiel es mir zunehmend schwerer und die letzten Kilometer waren eine reine Willensleistung, nicht aufzugeben. Aber immerhin war ich mit < 1:58h etwas schneller als beim Stuttgart-Lauf letztes Jahr. Es bestehen also berechtigte Hoffnungen, dass es mit diesem einen Jahresziel hinhaut.

Auf jeden Fall habe ich heute noch einen granatenmäßigen Muskelkater - speziell in den Waden.

Aber noch sind 2 Monate Zeit, um für den diesjährigen Stuttgart-Lauf zu trainieren.

Der vorherige Lauf in Kiew war weniger beschwerlich :-) (aber auch deutlich kürzer).