Sunday, September 26, 2010

Zwitscher, a twitter client for Android

Today I finally came around implementing list support for what is my Hello World of learning Android, a Twitter client called Zwitscher.

Main screen looks like this:

main-screen.png

 

You can see support for lists as first class citizens.

Zwitscher is still in a very early stage and of course contains bugs and unimplemented features.

Zwitscher is released as open source - to learn more about it, visit its home page at http://bsd.de/zwitscher/

Wednesday, September 22, 2010

First developer preview of RHQ4 available

We have just put a first developer preview of the new RHQ 4 UI online.

This preview is NOT intended FOR PRODUCTION or serious testing, but should rather be seen as an insight on what we are working on.

RHQ4 Dashboard
To learn more about the preview, visit the release notes page from where you can also download it.
As always feedback is very welcome (this includes patches and other code submissions) -- check the contributions page.
If you want to use RHQ for more more serious work, please use RHQ 3.

Friday, July 30, 2010

RHQ (Jopr) tab sweep (updated)

So since the last tab sweep I have accumulated quite some links.

First and foremost there is the Release of RHQ 3.0 (final). As we are phasing out the word "Jopr", the Jopr bits are now always included in RHQ.
This release has been reflected in other publications like



RHQ 3 has a new bundle provisioning feature. This article talks about bundle formats and a simple generator to create bundles for deployment by RHQ.
Mazz explains how to deploy in his article provisioning content via RHQ.

Greg Hinkle wrote three articles that talk about the upcoming GWT UI (parts of this are already in RHQ 3 in the bundle provisioning):
New UI technology, Exposing domain objects to GWT and RHQ and customizable dashboards

Joseph Marques has posted a very good in-depth analysis of the GWT compile performance (in RHQ) and shows how to tweak the settings to get the best results.

Tom Jenkins created a video on how to administrate BlackTie via RHQ plugin - the video actually features the admin console in AS 5

Wednesday, July 14, 2010

Simple Bundle generator for RHQ provisioning feature

So in RHQ 3 we've added this cool new provisioning feature.
This allows you to deploy a bundle to a group of platforms or other resources like e..g JBossAS servers.

So what is a bundle? Basically it is some piece of software to be deployed and a matching recipe file. There are two kinds of recipe files: FileTemplateBundle and AntBundle - I'll only talk about the ant-style recipes here.


When I started looking at the bundle UI, I remembered Mazz' great video, but being on the train, I had no access to it. So how do I deploy?
First thing you need to have is either a valid bundle distribution file or at least a valid recipe file.

A bundle distribution file is (by default) a zip file where all entries lie directly in the root directory like this (actually other is possible):

$ unzip -l bundle.zip
Archive: bundle.zip
Length Date Time Name
-------- ---- ---- ----
1150 07-12-10 16:27 demo.war
948 07-12-10 16:38 deploy.xml
-------- -------
2098 2 files


In the bundle I have demo.war to provision and the deploy.xml file as recipe. Lets have a look at the recipe file:


<?xml version="1.0"?>
<project name="demo" default="main"
xmlns:rhq="antlib:org.rhq.bundle">
 
<rhq:bundle name="demo" version="1.0"
description="Just some bundle">
 
<rhq:input-property
name="test.name"
description="Who do we greet?"
required="true"/>
 
<rhq:deployment-unit name="war">
<rhq:archive name="demo.war">
<rhq:replace>
<rhq:fileset>
<include name="*.jsp"/>
</rhq:fileset>
</rhq:replace>
</rhq:archive>
</rhq:deployment-unit>
 
</rhq:bundle>
 
<target name="main"/>
</project>


Some of you will see that this is an ant file with some extra tags in the rhq namespace. Lets go through the sections.

First is the boilerplate code that defines an ant project and then
within that we see one bundle denoted by the <rhq:bundle> tag. The bundle has a name of demo and is at version 1.0.

Next there is an <rhq:input-property> tag which defines that the deploy UI should ask for a property test.name which may be used to replace tokens by the users input. This input-property is optional and can show up multiple times.

The most important part is the <rhq:deployment-unit> tag, which defines the content to deploy in its embedded <archive> tag - demo.war in our case. And then we have a <rhq:replace> element embedded in this which defines a standard ant fileset that defines files in which token replacements can occur, like .jsp files in our example.

While this recipe file is not complicated, it still needs some typing, so I started writing a bundle generator, which is in RHQ 4 master in modules/helpers/bundleGen/ (actually you can use that to define bundles for RHQ 3)

Using the bundle generator




$ java -jar bundleGen-4.0.0-SNAPSHOT-jar-with-dependencies.jar
Please give the project name[myProject]:
Please give the bundle name: demoBundle
Please specify the bundle version[1.0]:
Please describe your bundle: Just testing
Please give the name (only) of your bundle content file: demo.war
Please give the directory (only) of your bundle content file: /tmp/
Please give a patten of files to replace templates: *.jsp
Jul 14, 2010 9:24:31 AM org.rhq.helpers.bundleGen.BundleGen createFile
INFO: Trying to generate /var/folders/m9/m9pXAK2WHoyq22G2P9J8L++++TI/-Tmp-//bundleGen/deploy.xml
Jul 14, 2010 9:24:31 AM org.rhq.helpers.bundleGen.BundleGen run
INFO: Your bundle is now ready in [/tmp/generatedBundle.zip]


So this is asking some questions - those with [text] have this text as default, so you can just press return to accept it.

When the generator has finished it prints where you can obtain the created bundle from - /tmp/generatedBundle.zip in our case.

The generator is far from finished; for example there is no way to specify <rhq:input-property> tags so far.

XmlQuestionsReader



One interesting detail is the XmlQuestionsReader which takes input from an XML file about the questions to ask. It partially supports internationalization in the form that you can have basename_lang.xml variants of the input, as you can see here. I am not yet exactly happy with this, as there is no fallback to the default version if a question is not defined.

Also there is no way yet to tell that a certain <question> can be repeated to form a List/Set (as it would be needed for the <rhq:input-property> tags).

So please give me feedback and if you want to help improving the generator, you are free to do so.

Friday, July 09, 2010

RHQ 3 released, but where is Jopr ?



So we've released RHQ 3 two days ago -- but what about Jopr? Isn't that supposed to build on top of RHQ? Shouldn't there be a release as well?

Actually we did release Jopr too -- those bits are now (since last September) included in RHQ, so there will be no more separate artifacts or downloads. When you download RHQ, you'll get Jopr too -- so simple :-)


The documentation wiki has full install instructions.

Btw: DZone has a nice article about all the new features, check it out and vote it up. They also have my announcement post online.

Installing OpenSolaris on Parallels Desktop on Mac

To try some things I wanted to install OpenSolaris 2009.6 on Parallels Desktop on my Mac.

Install of OpenSolaris itself went well, but network was not available.
Searching around the net led to

http://www.opensolaris.com/use/network_administration.pdf
http://blogs.sun.com/lr/entry/opensolaris_in_parallels_vm_on

http://dlc.sun.com/osol/docs/content/2009.06/getstart/parallels.html
and finally

http://kb.parallels.com/de/7060 (or English: http://kb.parallels.com/en/7060)

But still no avail.

It turned out that the script change is almost complete, but is missing
one additional line. Below "Compiling driver ..." it should read


cd $tmpdir/$driver && /usr/ccs/bin/make install > /dev/null


After this change dladm show-phys shows the interface and ifconfig ni0 plumb is able to use it. After a reboot, networking is working :-)

Wednesday, July 07, 2010

RHQ 3.0.0 final has been released



The RHQ team is proud to announce the immediate availability of RHQ 3.0.0.

This release features several month of hard work by the development team and external contributors. Many of the changes have been already made available in the past through seven community releases.

Highlights of this release are:

  • Pluggable alert senders
  • Provisioning of
  • Improved search capabilities



You can browse the full release notes on the RHQ wiki.

The release can be downloaded via the RHQ web site or directly from SourceForge

Thursday, June 17, 2010

Upcoming talks about JBossON / RHQ / Jopr

Below is a list of upcoming talks about
JBoss Operations Network (JBoss ON), RHQ and Jopr

Please inform me if you know of more talks around those topics, to that I can announce them here as well.

Thursday, June 10, 2010

RHQ - how to monitor local JMX servers

If you are using tools like JConsole or VisualVM, you may have seen that it is possible to monitor JVMs that don't have explicit jmx-remoting settings.
This post shows how you can easily achieve the very same in your plugin.

Basically you need to do four things:

  1. Have your plugin use the jmx-plugin:

    <plugin name="hadoop"
    displayName="hadoopPlugin"
    <depends plugin="JMX" useClasses="true"/>


  2. In the Discovery Class (could also be done in ResourceComponent.start() at the very beginning), you put some additional plugin properties:


    public Set<DiscoveredResourceDetails> discoverResources(
    ResourceDiscoveryContext context)
    throws Exception
    {
    Configuration pluginConfiguration = context.getDefaultPluginConfiguration();
    pluginConfiguration.put(new PropertySimple(
    JMXDiscoveryComponent.COMMAND_LINE_CONFIG_PROPERTY,
    javaClazz));
    pluginConfiguration.put(new PropertySimple(
    JMXDiscoveryComponent.CONNECTION_TYPE,
    LocalVMTypeDescriptor.class.getName()));
    ...

    The javaClazz is the fully qualified name of the main class as it would
    appear with jps -l :


    $ jps -l
    3299 org.apache.hadoop.mapred.TaskTracker
    12311
    3177 org.apache.hadoop.hdfs.server.namenode.SecondaryNameNode
    3037 org.apache.hadoop.hdfs.server.namenode.NameNode

    (the output is vmid and class, where the vmid is usually the process id)

  3. Have your component class extend JMXComponent

    public class HadoopServiceComponent extends JMXServerComponent, ...


  4. In component.start() call the JMXServerComponent

        
    public void start(ResourceContext context) throws Exception
    {
    super.start(context);
    ...
    }



From there on, you can get the JMX connection by a simple

     EmsConnection conn = getEmsConnection();


and so on ...

Back from Linuxtag





So I am back from a quick trip to Linuxtag 2010 in Berlin where I was presenting "Systemmanagement with RHQ - also for Linux". My talk featured an overview of RHQ by slides and live demo and a demonstration of the Nagios plugin, Alexander Kiefer has written.

The meeting room wasn't exactly crowded with around 20 people, but I saw them writing down stuff and they were asking questions, so I consider this good anyway.

At Linuxtag I also met Dalibor Topic from OpenJDK, my colleague David Lutterkort (who was presenting about deltacloud) and Hardy Ferentschik who was presenting about Hibernate Search. Unfortunately I was not able to attend any of those, as either I was still on my way to the conference or already back.

While I spent a good part of the day in trains (5h30 in the morning + commuter train within Berlin and 5h in the evening + commuter train), I was also able to walk around Linuxtag and have a glance at the exhibition. Many (larger) Open Source Projects were present (Fedora was missing to my surprise) and Debian even hold their own mini conference.
Also some system integrators and other companies like Google, O'Reilly or Addison-Weseley had a booth.


In the train I started hacking a plugin to monitor Hadoop clusters. It will find the various instances and already connects via JMX to them. The NameNode even has some statistics exposed. I'll put that into RHQ git within the next days.


You can find slides of my talk online - those are rather sparse as I was doing a long demo session showing RHQ, the Nagios integration and how easy it is to put an agent on a new platform and get this platform into inventory (literally took 2mins incl. downloading)

Sorry that there are no photos or even a video - I just did not feel like carrying the appropriate equipment around.

Friday, June 04, 2010

RHQ at Linuxtag






I will present "Systemmanagement mit RHQ - auch für Linux" at Linuxtag
Berlin next wednesday, June 9 at 3pm in room Europa 1.

I will talk about the architecture of RHQ and how it can be used
for Linux monitoring and will especially mention the Nagios integration by Alex Kiefer.

Wednesday schedule for Linuxtag is here (Don't worry, if you still see the CDI talk in this slot. I am sure my talk will soon show up at 3pm in room "Europa 1")

Monday, May 31, 2010

RHQ / Jopr tab sweep

RHQ release 3.0.0.B06 is out and contains support for provisioning of new software.

Alex Kiefer has worked hard and now we have Nagios support in RHQ.

Episode 6 of the Jopr podcast has been released and is talking about the new pluggable alert senders in RHQ.

And finally we've got portuguese translations of the installer messages by Rafael Soares Tuelho.

As always, give us feedback.

Thursday, May 27, 2010

Nagios Plugin for RHQ and Jopr available



As previously written, Nagios support is coming to RHQ.

Well, Alex has done more work and actually it is here now in its first version and is out-of the box able to monitor the standard services that are in a Nagios install:

Screenshot of resource tree and metric

(Screenshot with standard services and metrics)


This picture shows again the setup:
#alttext#


To take the nagios server into inventory, you need to go to a platform and use the Manually Add functionality, where you have to give the connection properties "host, where nagios is on" and "port" (6557 in the image)

But before you can start you have to:

  • install mk_livestatus within Nagios and xinetd.
    Alex has documented this in the Wiki; the mk_livestatus installation is very well described on the livestatus web page.
  • For all services in addition to the standard ones supplied in the plugin descriptor you need to update the plugin-descriptor of the plugin. This is described below.





As we know the second step is somewhat cumbersome, we will in the future work to make the detection of the resource types dynamic, so that you basically need to point the plugin at a Nagios install and the plugin will then "learn" all the types of service (e.g. SSH, Swap , ..).

PLEASE give feedback on the plugin on the rhq-devel mailing list.
Be it because you know more cool metrics to look at or because you want to help with the parser issue mentioned below. Also the source has a TODO file, that lists more ideas for contributions :-)

Source



You can get the source from the RHQ git repository in the nagios branch.
This first version has been tagged as RHQ_NAGIOS_PLUGIN_V1



Adding additional services



The following is an excerpt from the plugin descriptor:

   <service name="Root Partition"  
class="NagiosMonitorComponent"
discovery="NagiosMonitorDiscovery"
description="root partition service">
<metric property="free_space|plugin_output|.*/ ([\d]+).*"
displayName="Free space" measurementType="dynamic"
units="megabytes" displayType="summary"/>
</service>


The first thing you need to provide is the name of the RHQ-resourceType, which is used in <service name="Root Partition"... To obtain those, you can do the following query against mk_livestatus:

$ cat service-query
GET services
Columns: display_name
$ nc localhost 6557 < service-query
Root Partition
SSH
...
$

So in this example services were 'Root Partition' and 'SSH'

The next thing is to provide the metrics. The property="free_space|plugin_output|.*/ ([\d]+).*" attribute is used here. It actually consists of three parts separated by a bar (|) symbol:

  1. Text identifier - currently unused
  2. The column of the livestatus service query output (see below)
  3. A regular expression where the first capturing group is used as return value


Let's have a look at an extended service query (actually in version 1.0 of the plugin, only he plugin_output column is supported, as the parser in the plugin needs some more work (see below):
$ cat service-query
GET services
Columns: display_name plugin_output
$ nc localhost 6557 < service-query
Root Partition;DISK OK - free space: / 3611 MB (48% inode=71%)
...
$


So Root Partition delivered "DISK OK - free space: / 3611 MB (48% inode=71%)" which is then matched by .*/ ([\d]+).* to extract the value of 3611.

The parser issue



mk_livestatus delivers as default data separated by semicolon (;), but some columns like 'perf_data' (not shown above) can also return data that consist of multiple items separated by semicolon, so that the parser counts wrong and delivers bad answers.

Luckily mk_livestatus can do some
output formatting that can help to work around this. Please ping us if you want to help here.


RHQ community build 3.0.0.B06 released



The RHQ team is pleased to announce the immediate availability of community release 3.0.0.B06 of the RHQ systems management and monitoring platform. As before this release includes the Jopr bits.

This release features a lot of bug fixes as you can see on the
Release Notes.

New features include optimized search in Inventory and especially provisioning of software (like JBossAS servers). See below.

You can download the release from SourceForge

Provisioning...

To enable this you need to go to Administration -> System Configuration -> Settings and enable debug mode

#alttext#


This will then show a new menu "Debug" with a "GWT GUI" entry:

#alttext#


Click on "GWT GUI" and you'll get to a GUI written in GWT with a new "Bundle" menu item.

To learn more about this, have a look at the Wiki and especially
this flash demo video by Mazz

Translations for RHQ (we want you!)

Thanks to Rafael Soares, we now have Brazilian-Portuguese installer messages forRHQ

#alttext#

Click for a larger version


Those translated messages currently live in the 'translations' branch in git (which will shadow the master branch).

While we use I18Nlog for I18N output, there is no need to modify the java file, but one can just supply the "classical" .properties files for it.

We want you!

So if you want to help translate messages to your language, contact us and/or just start right away :) Make sure to also to check out the contributions page on our wiki.

Thursday, May 06, 2010

No wonder Mighty Mouse refused to work

I am for a long time user of a Mighty Mouse (actually 2 of them. And as every user of a Mighty Mouse, I have the issues of the mouse ball being stuck and needing some cleanup.

In the past I've turned the mouse around and rolled it over some issue, which helped more or less. But just now I had the urge to finally open it and really clean it. There are many "how-to"s on the web for this.

When the mouse was open, it became very obvious why it did not really work well anymore:

IMG_8664.JPG
(click for a larger version)


opening the white cage an removing the ball (which itself was totally clean) revealed more dirt:

IMG_8666.JPG
(click for a larger version)


Cleaning the little rolls was no issue, but putting them back was somewhat harder, as the thicker black rolls are magnetic and would directly attach to a screwdriver.

After assembling everything, the mouse responds well again, so problem solved for the years to come :)

Tuesday, May 04, 2010

RHQ community build 3.0.0.B05 released



The RHQ development team is happy to announce the availability of the 3.0.0.B05 community build of RHQ. As in previous community releases, this also contains the Jopr bits.

As usual, changes have been recorded on the change log page.

Most notable changes were:

  • Support for obfuscated db passwords

  • A fix for postgres 8.4+ servers to display statistics again
  • Completion of the alert sender plugins. This includes the possibility to finally execute resource operations on any resource as result of an alert
  • Suport for Oracle 11g database



Please use and test this release and report issues or feature requests in Bugzilla. If you want to contribute to the project, please have a look at the Contributions page on the wiki.

You can download the release from SourceForge.

If you want to develop plugins against this version, you can find the respective artifacts in the new JBoss Maven repository at https://repository.jboss.org/nexus/content/repositories/releases/org/rhq/.

Monday, May 03, 2010

Neues Maskottchen für die -T---kom ?

Heute auf dem Heimweg beim Alten Landtag gesehen:

DSC00106.JPG

(click auf's Bild für eine größere Version)


Die Farbe scheint nicht so ganz das Original-Magenta zu sein, aber das gibt dem Konzern ja auch ein ganz neues Image :-)

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