Posted on 2008-07-20 14:35:00.0 by Heiko W. Rupp
[ View original post ]
Since I have created the
SNMPtrapd plugin for RHQ, I have updated it with a lot of little features and corrections:
- The listner port can be configured via gui
- A severity oid can be configured via gui: if a varbinding with this OID is received, then it is taken to compute the even severity
- It correctly binds and unbinds to its listening socket
- OID to text mapping: As I am still looking for an open source MIB that fits my needs and that where development is active, I've added the possibility to put mappings of oid to text in a properties file
- Sender address is not only for V1 traps computed
- More information about V1 traps are put extracted and put in the resulting event.
The plugin is in SVN and its description is on the
plugin wiki (which also has the link to SVN etc.).
Posted on 2008-07-17 05:26:00.0 by Heiko W. Rupp
[ View original post ]
When you want to develop a plugin for RHQ,

you can of course follow my
plugin dev series. But in most cases you probably want to know more.
Of course, as RHQ is open source, you can
just look at the source. Most of the time it is more convenient though to just browse api docs.
JavaDoc for plugin development is now available -
check it out. The docs are for RHQ version 1.0.1.
If you have questions, join us in #rhq on irc.freenode.net or post in the
RHQ forums.
Posted on 2008-07-10 00:10:00.0 by Heiko W. Rupp
[ View original post ]
RHQ and
x2svg have lately been added to the list of projects on
ohloh.net - if you are a user of said software, please consider passing at
ohloh and to click on the "I use this" button.
Direct links to the projects:
Unfortunately, Ohloh can't know that we already were working on RHQ before open sourcing it in
February 2008, so it thinks its history is still relatively short.
Posted on 2008-07-08 14:42:00.0 by Heiko W. Rupp
[ View original post ]
I have just committed an experimental SNMP trapd plugin for
RHQ
. Currently it is only able to listen for V1 traps at a fixed address, but I am sure this will change :)
Incoming traps will be forwarded as Events into the events subsystem, so you can view them in the GUI and even define alarms on them (that trigger SNMP traps :-)
The
plugin has its own page
within the
RHQ plugin community pages
. This page also shows the location in SVN. The plugin is marked as
experimental
, meaning that it is not linked in the parent pom. To build it, you need to go into the plugin base directory and build from there.
Events processing
This plugin is also an example for processing of Events. In addition to the three components that you already know from my
plugin development series
, you need an
EventPoller
- that is a class with a method that gets called at regular intervals and which pulls the event data in. Lets have a look at the Component class, the plugin descriptor and the Poller. As the discovery component more or less follows what you have seen in
part 3 of the series
, I am not going to show this again.
Plugin Descriptor
The plugin descriptor is mostly as we know it. There is now one new element:
<event name="SnmpTrap" description="One single incoming trap"/>
The important part here is the
name
attribute, as we will need its content later again. The
name
is the key into the
EventDefinition
object.
Plugin Component
In the plugin component, we are using start() and stop() to start and stop polling for events:
public void start(ResourceContext context) throws
InvalidPluginConfigurationException, Exception {
eventContext = context.getEventContext();
snmpTrapEventPoller = new SnmpTrapEventPoller();
eventContext.registerEventPoller(snmpTrapEventPoller, 60);
So first we are getting an
EventContext
from the passed
ResourceContext
, Instantiate an
EventPoller
and register this Poller with the EventContext (60 is the number of seconds between polls).
The plugin container will start its timer when this registration is done.
In stop() we just unregister the poller again:
eventContext.unregisterEventPoller(TRAP_TYPE);
TRAP_TYPE is the
ResourceType
name as String - we will see this again in a second.
The remainder of this class is nothing special and if you have read the plugin development series, it should actually be no news at all.
Event Poller
This class is the only real new piece in the game.
public class SnmpTrapEventPoller implements EventPoller {
Implementing
EventPoller
means to implement two methods:
public String getEventType() {
return SnmpTrapdComponent.TRAP_TYPE;
}
Here we return the content of the name attribute from the <event> tag of the plugin descriptor. The plugin will not start if they don't match.
The other method to implement is poll():
public Set<Event> poll() {
Set<Event> eventSet = new HashSet<Event>();
...
return eventSet;
}
To create one
Event
object you just instantiate it. The needed type can just be obtained by a call to
getEventType()
.
That's all
Well, that's all. Source is in the RHQ subversion repository - go and check out the sources yourself.
Feedback is always appreciated.
Technorati Tags:
Java
,
JBoss
,
RHQ
Posted on 2008-07-04 05:46:00.0 by Heiko W. Rupp
[ View original post ]
We were finally able to provide binaries of RHQ 1.0.1 next to the source which has been
available since February.
You can find the download instructions in the
RHQ wikiRemember: you can reach us in #rhq on irc.freenode.net or via the forums.
Posted on 2008-07-04 05:33:00.0 by Heiko W. Rupp
[ View original post ]
Yesterday I was at 11th Java Forum Stuttgart (JFS), a regional Java conference with 1100 attendees(!). The JFS featured 42 sessions in 6 parallel tracks in one day. This conference is very popular and attendees came from all over Germany. As last year, the conference took place in the
Liederhalle, which offers much more space than the place the JFS has been in the years before.
I also had a talk about "Profiler, the better debugger?". The talk went well - I had around 250-300 attendees, that stayed in the room :-) I was going through some slides and then showing live examples about how to dig into unknown software with the help of the profiler.

Of course I took
RHQ as example, even if it was not that unknown for me :-) After the session I got some feedback that people liked the talk and one ex-colleague told me that he is currently having the problem to dig into more or less unknown software, so that this exactly fits his needs.
There have been two talks about JBoss products / projects:
- Advanced JBoss Cache (Carsten Mjartan): I was briefly in this session to take some pictures, but left early again, as I already know a lot about JBoss Cache, so this was no big news for me.
- Geschäftsprozese und -regeln mit jBPM und Drools - ein unschlagbares Team (Bernd Rücker): I also know a little about this, but as I was the moderator, I had to stay :-) Seriously: Bernd gave a good talk in front of ~300 attendees about what is BPM and BRM and how you can combine jBPM and Drools.
One of the highlights shurely was the talk by Erich Gamma (about Jazz)- my talk was unfortunately at the same time, so I was not able to attend it :-(
Red Hat also had a booth at JFS:

Later in the evening there have been some BOF sessions - I have a BOF about RHQ - basically the same thing as in the
SIG-JBoss meeting a week ago.
You will find the slides of my talk at the
JFS pages. The slides of the BOF can be found
After the talks, there was food and free beer sponsored by IBM - and
Gee Hye Lee was nicely playing piano for us.

The JFS featured good content and good food as usual, so mark the date in your calendar for next years conference:-)
Posted on 2008-06-30 15:25:00.0 by Heiko W. Rupp
[ View original post ]
We just released
RHQ
Version 1.0.1 and
JBossOn 2.0.1
in the wild.
Both are bugfix releases and don't add much of new functionality (read: "as in new subsystems") - if you want you can have a look at the
closed JIRAs
. You will also find a few new features in there :)
You can find the
RHQ 1.0.1.GA tag
in RHQ svn.
JBoss customers can of course download JBossON 2.0.1 from the customer support portal as usual.
As usual, it is cool to get a release out of the door :-)
Posted on 2008-06-27 05:01:00.0 by Heiko W. Rupp
[ View original post ]
Ok, I have to admit, that yesterday wasn't the best day to run a
SIG-JBoss meeting 
of the
Stuttgart Java User Group, as the second semi final of the
European Soccer Championship was also yesterday. But then we have seen all three goals on the big screen in a nearby Italian restaurant after the meeting anyway.
In the meeting I went a bit through what
RHQ is, how it relates to JBossON, showed the components and then just did a live demo of the whole system.
After that we went through what it takes to develop plugins and showed some code (Yeah man, show me the code :-)
Conclusion was that
RHQ, even if still lacking things is already very powerful and that the agent and server infrastructure does a lot for you for free.
My slides can be
downloaded here (PDF, German).
If you are interested in RHQ, you can also pass by at the
Red Hat booth at Java Forum Stuttgart, where I may be able to demonstrate that (or one of my colleagues).
Posted on 2008-06-25 10:53:00.0 by Heiko W. Rupp
[ View original post ]
RHQ has a powerful grouping feature: you can generate groups of resources (of compatible and mixed type).
When you go to the Browse Resources page, you can get a list of compatible and mixed groups and from the inventory of a group see all members of said group. Setting up a lot of groups is even easier with the cool
DynaGroups feature.
But what if you want to know all groups that contain a certain resource? Of course, you can look into each group and check if it is there. But this can get boring with lots of groups.
There is an easier solution to that: go to the inventory page of the resource and scroll down. You will find a section "Groups Containing this Resource":

This section shows the names and types of groups where the resource is in, as well as member count and availability of the group.
Technorati Tags:
JBoss, RHQ
Posted on 2008-06-23 03:50:00.0 by Heiko W. Rupp
[ View original post ]
RHQ
and
JBossON 2
, that is built on top of RHQ are distributed systems. The agents managing resources can (and will) live on a different system than the server. So sometimes the question arises when a resource is marked as unavailable if the resource itself is down - or the connection between agent and server.
There is a heartbeat going on between the RHQ agents and the server: the agents are periodically reporting the availability of their managed resources to the server. Now if the server doesn't get those reports for some time, it will report the managed resource as being down. This might have three causes
- The resource is really down
- The agent is down
- The network between agent and server is down
- Combination of the above
So if a resource is down and you are not sure, go to its inventory tab and scroll to the bottom. There is a section "Agent Managing this Resource":
This shows the availability of the agent and when the last availability report for this resource was received.
If this one shows red, you really should have a look at the machine hosting the agent and the resource.
Technorati Tags:
JBoss
, RHQ