Friday, July 31, 2009

Experimental alerting via Twitter in Jopr (and RHQ)


Something for the weekend :-)

I have just committed support for sending alert notifications via Twitter into Jopr and RHQ.

Bild 12.png


The code currently lives in an experimental branch in the RHQ code base.

The twitter notification can be enabled in the usual place in the alert UI

Bild 11.png


while the twitter account is set in the System preferences

Bild 13.png


This code is still experimental, but works for me :-)

And then there is the Twitter plugin (and here), that allows you to watch twitter feeds from within Jopr.

Please provide feedback.

Wednesday, July 29, 2009

Jopr Twitter plugin renamed



Two days ago I have commited a Jopr plugin to monitor Twitter feeds

Due to popular demand (and also because 'twit' has some negative connotation in some slang forms of English) I have renamed the Jopr TwitStats plugin to Twitter plugin.
This also means that the location of the source has moved to
modules/plugins/twitter within the RHQ svn repository.

Monday, July 27, 2009

Jopr meets Twitter -- new plugin to monitor Twitter



As you surely know, I am also active on Twitter as pilhuhn. So I have sat down and started to write a TwitStat plugin for Jopr and RHQ just to show the possibilities of the Jopr platform, that it is not exclusively about managing JBoss products (as some people say) and to show more example code.

Currently the TwitStats plugin lets you:


  • Post your own tweets

    Bild 4.png


  • Monitor the number of tweets


    • Your friends timeline

    • Public users timelines

    • Search for stuff

    • Bild 5.png


      Interesting detail is that the Event dots (green ones) show the post date of a tweet, while the blue monitor dots (number of tweets since last poll) show that number at the time of polling.


  • Show the monitored tweets as events in the Events Subsystem:

    Bild 3.png




I have built the plugin around the Twitter4J library, which helps a lot in getting things done.

There are still some open issues:

  • OAuth support is missing

  • Calls to get tweets are synchronous and block the plugin for too long - those need to converted into async calls



You can find the source code in RHQ svn in modules/plugins/twitstats.

Please provide feedback - either in the RHQ Jira, in the Forums or on Irc

Monday, July 13, 2009

Jopr Java1 sessions available

The mini theatre sessions about Jopr are now online at YouTube. This is a four part series of videos. Greg Hinkle, lead of the Jopr, RHQ and JBoss ON projects is presenting:

Part1: http://www.youtube.com/watch?v=5X0kXk16sEw (shown below)




Part 2: http://www.youtube.com/watch?v=6VGXc7__OCg


Part 3: http://www.youtube.com/watch?v=whc5UH197qY


Part 4: http://www.youtube.com/watch?v=FqpyLWtJyBw


Tuesday, July 07, 2009

Resources for plugin development for Jopr, RHQ and the JBossAS admin-console

I have been asked a few times in the last weeks about writing plugins for Jopr, RHQ and JBoss ON. People were interested, but still were not completely sure what to do.

So the first thing to know is that a plugin written for Jopr will also run in JBossON2 and (most probably *) in the new admin-console of JBoss AS 5.1

So I've complied a short list of resources to go through for starting development of a plugin



Also Jopr Developers are online on IRC at irc://irc.freenode.net in #jopr


Contact me if you think that stuff is missing







*) You should of course always check it before delivering your plugin, but in most cases it should just work.

Infinispan presentation at JUG-Stuttgart next Thu

Manik Surtani will talk about Inifispan at the Java User Group Stuttgart.

Check out the following link for details and to register for the event.

http://jugs.org/veranstaltung-2009-07-16.html.

Dzone did a nice interview with Manik, that you can checkout here.

Friday, June 26, 2009

Small Jazoon sum-up




So, I have been at Jazoon for the last few days. I arrived on tuesday at noon - just missing the keynote by James Gosling - I have heard that it was not that good from the content, but I would have liked to see it nevertheless. Then I attended some sessions and had lunch (a "Bratwurst" - sausage, every attendee only one piece). There was a talk about "IPhone hacking for java programmers" - I was expecting to hear about e.g this x-compile effort, but the session really just presented the Apple tools and Objective C. Not that I did not find this interesting and the talk was also well presented, but it just was not what I was expecting.

In the afternoon I went with Bela for a run and then basically went with the other JBoss guys for dinner.

On Wednesday I had my own presentation, which did not that well as I wished - the 50 mins time constraint irritated me totally resulting in me being done too early. But at least I created enough interest to have people come to me later and asking about how to write plugins :)

Rickard Öberg was supposed to give a talk, but did not show up. Everyone said that he was perhaps captured by the CIA :-)

The last session of the day was the final of the "rookies competition" - rookies were asked to submit a talk and the program committee selected three talks that got presented and jury selected the final winner. The talks were of mixed quality and I had the feeling that the 3rd guy was pushed by Sun to the last 3. Luckily at least Bela Ban gave the guys an honest feedback - otherwise the jury process would just have been a big joke.
On wednesday evening was the party with burgers for dinner (lunch was pizza). I had some nice talks with some nice guys.

Thursday was the last day for me. Again some sessions, then lunch (sausage again), more sessions and then some talking with Alexander Neumann from iX magazine. Ed Burns was giving a talk (as a backup for a cancelled one) about his new book (I later got a copy of it that he signed) - for me one of the better sessions in the conference.

On all of the three days, the conference network had issues - either it was impossible to get an IP address or some other issue occurred.

So Jazoon leaves a very mixed feeling for me - on one side I had very good face to face talks and fun with people I met and on the other hand I was not happy with many of the talks I attended, the food and the network.

For food and network I could imagine that just raising the conference price slightly and then getting better food for that would work (and buy some more (private) IP addresses too. But for the sessions it is very subjective, so that someone else who was in the exact same sessions than I was, may have found it super.

Tuesday, June 23, 2009

Üetliberg

Today, while being at Jazoon in Zürich, I took a run together with Bela from the Saalsporthalle (close to the conference venue) to the top of the Üetliberg.

Things went a bit strange, as at some point we switched on the most direct track to the hilltop. So in summary we did more than 400m of altitude. This included 'crawling' over tree roots on a very wet soil.

You can have a look at the track at GPSies.com.

Here is a snapshot from Trailrunner about my performance (grey shows the heigth):

Bild 6.png


In both cases start height and end height do not match, as my Forerunner took a long time to discover the satellites and only did so while we were already running. This also means the distance has probably slightly longer.

A very nice thing is that at the Saalsporthalle, it is possible to just go into a public cloak room with showers, to change to sporting clothes and to shower later. Outside is even a possibility to clean the running shoes.

Update

A nice fellow at the top of the Üetliberg took photos of Bela and me and sent them via email to me:

103MSDCF 465.jpg

At the right you can see a bit of the Zürichsee.


103MSDCF 466.jpg

Monday, June 22, 2009

Stuttgart-Lauf

Yesterday was Stuttgart-Lauf again. Unlike the other years (see here for last year) I did participate in the Half-marathon (21 km).

When practicing, I was able to run the distance in 2:08h, but on a very flat course, so I was thinking that 2:15h would be realistic for this more demanding course.

But then at km 17 it looked like I would be able to run the track within 2h, so I tried to and here is the result:

Bild 4.png


My first half-marathon in 1:59:04h - wow, I am happy.

While running I also crossed the 800km border since I started running last year (see e.g. here).

Monday, May 11, 2009

Announcing the Jopr podcast


It is a pleasure to announce the Jopr podcast, a source for news, interviews and technical content around Jopr.

The first two episodes are online:

0 - A short intro

1 - A walk through the Jopr source modules

You can follow the Podcast on its home page and also directly subscribe to it on iTunes.

If you like it, please rate it up on ITunes or provide Feedback via email to me.

Also if you are German, you may also want to have a look at the video from my presentation at rheinjug earlier this year.

Friday, May 08, 2009

Video from my rheinjug presentation about Jopr online

The nice folks from rheinjug finally made the video of my presentation available together with the slides in an integrated player.

Bild 2.png


You can directly view this at rheinjug.tv. At the top of the page is also a possibility to download the video.

Video and slides are in German.
Minutes from the talk are available too.

Thanks again, Georg and Michael.

Thursday, April 30, 2009

Jopr 2.2 released



You may have seen yesterday and the day before that JBoss Operations Network 2.2 has been released. And you probably also know that Jopr is the upstream project for JBoss ON.

So we are pleased to announce the availability of Jopr 2.2.






You can download Jopr 2.2 from Sourceforge.

Note that the distro does not have a separate agent download, but the agent is included in the server. Set up the server, log in and then in the top menu you will find Admin->Agents->Download

Otherwise have a look at the install docs in our wiki.

Joe Marques has a longer list of new features in his respective blog post.

Wednesday, April 29, 2009

JBoss ON 2.2 has been released

Greg Hinkle already wrote it: JBossON 2.2 has been released.
This has been a big release for us - with arounds six month of work.

Some of you may already had a peek at the Jopr 2.2 beta and my know about some of the new stuff.



Changes were (in addition to hundreds of small enhancements and bugfixes):

* UI - Completely updated (and mostly rewritten from Struts to JSF), AJAX based UI with tree views, search and common menu system
* Clusters - Cluster oriented tree views with group-wise configuration management and monitoring
* Security - Improved DynaGroups queries and new support for recursive compatible groups simplifies access control
* Monitoring - Configuration change detection, auditing and historical review
* Agent auto upgrade - Agents automatically update themselves when new servers are installed
* Subsystem views - Pages that e.g. show alert info over all existing resources
* Much better IE support
* Speed improvements
* Automatic recalculatin of DynaGroups
* Plugin skeleton generator


More information about JBossON 2.2 can be found at http://www.jboss.com/products/jbosson

Wednesday, April 22, 2009

I love the Standalone container in Jopr (updated)


I am just working on a plugin when I have some spare cycles (I will tell you which one in a few days :-)

To test the plugin I am using the Standalone Container where I have deployed my plugin, the JMX and the platform plugin.
So when I have compiled a new version of the plugin I just copy it over and start the standalone container:

snert:rhq-agent hrupp$ bin/standalone.sh

Listening for transport dt_socket at address: 8788



Starting the plugin container.

Loading plugins

...Loaded plugin: Platforms

...Loaded plugin: JMX

...Loaded plugin: MyNewOne



Ready.

[0]:0 >


This takes 3 seconds and then I am ready to discover resources:

[0]:0 > disc s

Discovery took: 2269ms

[Resource[id=-3, type=Secret, key=service:jmx:rmi://127.0.0.1/jndi/rmi://127.0.0.1:1090/jmxconnector, name=Secret, parent=snert]]

[1]:0 >


Now I can test if my invokeOperation() method from the OperationFacet works:

[2]:-0 > set res -3

[3]:-3 > invoke getProperty name=test

[PropertySimple[id=0, name=result, value=null, override=null]]


So set the resource id to the resource I want to work with and then invoke the getProperty operation with parameter name and value test. The Operation then returned null, as the underlying resource does not know this specific value.

This all took around 10 seconds now for a round trip - you can't really do faster testing :-)

When I want to repeat those steps with an updated version of the plugin, I can save my work:

[4]:-3 > !w /tmp/foo

This creates a file and saves the commands given in it. The name of the file can later be given on the command line to just run the action as a script without any need to manually type in the commands.

There is currently one caveat: Resource ids will change in each startup so the "set" command in step 2 above will not work exactly like this.

[UPDATE]


I will work on adding variables to the find command in the standalone container which can then be passed to set -- if you want to help out contact me.


What you can do is to use $r as 2nd parameter to set after finding a single resource:

[5]:0 > find r *myFooBar*

-12: MyFooBar ( Resource[id=-3, ... )

[6]:0 > set r $r

[7]:-12 >



With this trick it is now possible to just run the container with the saved file as input again and again

$snert bin/standalone.sh /tmp/foo

Monday, April 20, 2009

RHQ and Jopr plugins: What about <T> ?

When writing a Plugin for RHQ, JBoss ON and Jopr (or for completeness: Embedded Jopr, you will run into Generic types for ResourceComponent and ResourceDiscoveryComponent. And I am sure you have often wondered what the T in ResourceComponent<T> should be.

The following diagram tries to help here. We have two ResourceTypes that from a Parent-Child relationship e.g. a Database and a DatabaseTable.

If you don't know what parent you will run in, you can just leave the generic bit away, as in ParentDiscovery and Parent in the diagram. This is usually the case for ResourceTypes of the Server category that live in their own plugin. One could also use the platform component as parent if its clear that the plugin will only run as a child of the platform, but never e.g. within another resource like a JBossAS.



InheritanceDiagram.png


Children of this server Parent will set the T to the parent component. This allows them to e.g. access the parent ResourceContext.

For examples of all this, check the Jopr source code, which contains many examples.

Friday, April 17, 2009

♫ I'm running in the rain ... ♫

Today it was raining, but I had the urge to go out for a run, so I went out nevertheless. Normally I am more a like a sissy in that area though.

But after around 1km I felt warm enough so that it did not feel uncomfortable anymore and later on it did not even feel bad being splashed by a car driving through a puddle. And this is how I looked when I was coming home:

DSC00039.JPG


But hey, it felt great !

And the best: my Adidas (Supernova) shoes stayed dry inside. No wet feet - I just love those.

( The very best was actually that my ankle did not hurt )

Jopr/RHQ plugin generator updated

The plugin generator has been updated for the plugin lifecycle listener. I have uploaded a new version to the description page on the RHQ wiki.
So you can grab the standalone jar file from there without the need to download the RHQ source and compile it from scratch -- which would not be hard actually:


$ cd $RHQ/modules/helpers/pluginGen

$ mvn install


You can find the resulting rhq-pluginGen*-jar-with-dependencies.jar in target/ then.

Sunday, April 05, 2009

List of Jopr / RHQ resources


Just as a FYI:

Mazz has, while answering a forums post made a nice list of resources
related to Jopr and RHQ.

Check out the post at the Jopr user forum.