Showing posts with label fedora. Show all posts
Showing posts with label fedora. Show all posts

Friday, December 05, 2014

RHQ 4.13 released

I am very pleased to announce the release of RHQ 4.13 as an
early gift from St. Nicholas :)


Screenshot of the RHQ UI showing some charts

This release contains a lot of bug fixes and smaller improvements, as well as some new features:

  • Alerts have a new status 'recovered', that can be filtered upon
  • The UI allows to hide elements that are not needed on a per user basis
  • The as7/WildFly plugin now supports runtime queues and topic subscribers
  • Further improvements in the Storage Nodes

As always RHQ is available for download in form of a zip archive. If you want to try out RHQ without too much setup, you can also use a pre-created Docker image
from https://registry.hub.docker.com/u/rhqproject/rhq-nodb/ (the link contains setup information).

Please consult the release notes for further details and a download link.

Maven artifacts will soon be available on Maven Central.

Special thanks goes to

  • Alan Santos
  • Andreas Veithen
  • Elias Ross
  • Jérémie Lagarde

for their code contributions for this release.

Wednesday, May 07, 2014

RHQ 4.11 released


I am proud to announce the immediate availability of RHQ 4.11.

As always this release contains new features and bug fixes.

Notable changes are:

  • Plugins can now define plugin specific DynaGroup expressions, which can even be auto-activated
  • Further agent footprint reduction for jmx-clients (especially if the agent runs on jdk 1.6)
  • Much improved agent install via ssh from the RHQ UI.
  • Support for Oracle 12 as backend database
  • New login screen that follows patternfly.org

As always RHQ is available for download in form of a zip archive. If you want to try out RHQ without too much setup, you can also use a pre-created Docker image
from https://index.docker.io/u/gkhachik/rhq-fedora.20/ (the link contains setup information).

Please consult the release notes for further details and a download link.

If you only want to have a quick look, you can also consult a
running RHQ 4.11 instance that we have set up. User/Pass are guest / rhqguest

Special thanks goes to

  • Elias Ross
  • Michael Burman

for their code contributions for this release.

Wednesday, September 11, 2013

RHQ 4.9 released

It is a pleasure for me to announce on behalf of the RHQ development team the immediate availability of RHQ 4.9

Features

Some of the new features since RHQ 4.8 are:

Be sure to read the release notes and the installation documents.

Note

For security reasons we have made changes to the installation in the sense that there is no more default password for the rhqadmin super user. Also the default bind address of 0.0.0.0 has been removed. You need to set them before starting the installation.

If you are upgrading from RHQ 4.8 you need to run a script to remove the native components from Cassandrabefore the upgrade. Otherwise RHQ 4.9 will fail to start.

Thanks

Special thanks goes to

  • Elias Ross

  • Jérémie Lagarde

  • Michael Burman

for their code contributions for this release and to Stian Lund for his repeated testing of the new graphs implementation.

Downloads

As usual you can download the release from the RHQ-project downloads on SourceForge




Tuesday, June 25, 2013

RHQ 4.8 released



RHQ 4.8 has been released with another batch of new features and bug fixes.
Major changes since RHQ 4.7 are
  • New storage backend for metrics based on Cassandra:

    Numerical metric data is now stored in a Cassandra cluster to improve scalability for larger deployments with many metrics.
    Architecture overview cassandra color

    The intention is to move more mass data into Cassandra into the future (events, calltime data etc). We just had to start somewhere. If you are upgrading from an earlier version of RHQ, a utility to migrate metrics gathered is provided.
  • More improvements to the new charts
    Bildschirmfoto 2013 06 25 um 10 57 07

    The selection of the time period has been changed:
    • There is now a button bar at the top to quickly select the timeframe to display
    • If you hover with the mouse between two "bars" you will see a little crosshair, that starts the
      selection mode - drag it over a series of bars to zoom in. Mike Thompson has created a YouTube video that explains this.
  • New installation process:

    With the above change of the backend storage, we have changed the installation process again to reduce the complexity to install RHQ. The new process basically goes:
    • unzip rhq-server-4.8.0.zip
    • cd rhq-server-4.8.0
    • edit bin/rhq-server.properties
    • bin/rhqctl install (--storage-data-root-dir=<some directory>

    For upgrades the process is very similar: you run unzip the new binaries and then run bin/rhqctl upgrade --from-server-dir=<old server>
    Please consult the installation and upgrade guides before starting.
  • REST-api is now (mostly) stable and supports paging on (some) resources. The documentation is also up on SourceForge and the rhq-samples project has a special section on examples for the REST-api.


As always there have been many more smaller improvements and bug fixes - many thanks to everyone who has contributed via bug report, comments, discussions on #rhq and/or via code contributions.

Please check the full release notes for details. They also contain a list of commits.

RHQ is an extensible tool to monitory your infrastructure of machines and applications, alert operators on user defined conditions, configure resources and run operations on them from a central web-based UI. Other ways of communicating with RHQ include a command line interface and a REST-api.

You can download the release from source forge.


As mentioned above, the old installer is gone, so make sure to read
the wiki document describing how to use the new installer.

Maven artifacts are available from the JBoss Nexus repository and should also be available from Central.


Please give us feedback, be it in Bugzilla, Mailing lists or the forum. Or just join us on IRC at irc.freenode.net/#rhq.

And as I have been asked recently: yes we are happy to accept code contributions -- be it for the RHQ core, as well as plugins or for the samples project. Also if you e.g. have written a plugin, share a pointer to it, which we can then share on the wiki etc.

Wednesday, March 13, 2013

Awesome new graphs in RHQ - based on d3.js



Mike Thompson has yesterday presented the latest and greatest version of the new graphs for RHQ in a video on YouTube. Shortly after he has committed the results of his huge work into RHQ master branch.


While this work is not yet finished, it is the result of the work started by Denis Krusko in last years Google Summer of Code. At the moment both the old and new graphs are can be looked at in the UI, so that you can compare them and potentially report non-matches.


Here are some screenshots to foster your appetite:


Popup chart for a single metric
Popup chart for a single metric

Individual metric
Individual metric on the monitoring tab


As the subject already says are those graphs made with the help of the awesome D3.js framework - I let Mike chime in to describe in more details what he and Denis had to do to get this to work inside GWT+SmartGWT.

I've uploaded a snapshot from master as of this morning (my time) of this from our CI server onto SourceForge for you to try. THIS IS NOT FOR PRODUCTION.


There is a known issue where the red bar shows "..global exception.." this is harmless and we will fix that anyway. Also the graph portlets in the dashboard don't honor the column width yet.


Please do not forget to report bugs (if there are any :-)

Tuesday, February 26, 2013

RHQ 4.6 released


As I've mentioned before, the RHQ team has been very busy since RHQ 4.5.1 (and actually already before that) and has switched the application server it uses to JBoss AS 7.1. Directly after the switchover we have posted a first alpha version.


Now after more work and fixes, we are happy to provide the release 4.6 of RHQ, that has all the issues resolved that arose from the switch. Features of this release are:

  • The internal app server is now JBossAS 7.1.1
  • GWT has been upgraded to version 2.5
  • There is a new installer (this has also changed since the 4.6 alpha release)
  • The REST-Api has been enhanced
  • Korean translations have been added (contributed by SungUk Jeon)
  • Webservices have been removed
  • Building RHQ now requires Java7, but it will still run on Java6
.

See the full release notes for details. They also contain a list of commits.

You can download the release from source forge.


As mentioned above, the old installer is gone, so make sure to read
the wiki document describing how to use the new installer.

Maven artifacts are available from the JBoss Nexus repository and should soon also be available from Central.

We also like to say thank you to our contributors for this release:

  • Jürgen Hoffmann
  • Richard Hensman
  • SungUk Jeon


Please give us feedback, be it in Bugzilla, Mailing lists or the forum. Or just join us on IRC at irc.freenode.net/#rhq.

Wednesday, January 16, 2013

RHQ 4.6 beta released


The RHQ team has been very busy since RHQ 4.5.1 (and actually already before that) and has switched the application server it uses to JBoss AS 7.1. Directly after the switchover we have posted a first alpha version.


Now after more work and fixes, we are happy to provide a beta version of RHQ 4.6, that has all the issues resolved that arose from the switch. Features of this release are

  • The internal app server is now JBossAS 7.1
  • GWT has been upgraded to version 2.5
  • There is a new installer (this has also changed since the 4.6 alpha release)
  • The REST-Api has been enhanced
  • Korean translations have been added (contributed by SungUk Jeon)


You can download the release from source forge.


This wiki document describes how to use the new installer.

The first version of the download did unfortunately not contain the Korean locale -- that is now fixed. If you already have downloaded the zip and do not need the Korean locale, then you don't need to re-download.

Please try the release and give us feedback, be it in Bugzilla, Mailing lists or the forum.

Thursday, October 04, 2012

RHQ 4.5.1 released



I am pleased to announce the immediate availability of RHQ 4.5.1.
RHQ is a system for management and monitoring of resources like application servers
or databases and can be extended by writing plugins.

Actually I wanted to announce 4.5.0 a week ago, but a first user report showed an
error in the upgrade path from a previous version, so we have pulled that release
and fixed the bug along with another one and have now created a fresh 4.5.1 release.

Notable changes are:

  • Python support in the Command Line Interface (CLI)
  • Support for importing of scripts in the CLI
  • Enhancements in the JBossAS7 plugin
  • Enhancements in the REST API
  • Events tab allows to filter by date range
  • Postgres 9.2 is now supported as backend database
  • The Sigar library has been updated.


Special thanks goes to Elias Ross and Richard Hensman for their contributions.

Maven artifacts have been uploaded to the JBoss Nexus repo and should show up on maven central soon.

You can find the full release notes, that also contain a download link on the RHQ wiki.

This time we have included the full output from git shortlog for the commits of the release. Please tell us if this is useful for you.

Heiko on behalf of the RHQ team

Wednesday, May 09, 2012

RHQ 4.4 released

I am proud to announce the immediate availability of RHQ 4.4

As before a lot of work has gone into this release:
  • Availability now knows a type of "disabled". This allows you to mark resources while maintenance or non-connected network interfaces so that they do not show up as down and also don't create false alerts. This also includes the possibility that plugins request to mark a resource as enabled or disabled
  • Faster availability reporting
  • Faster availability checking in the agent, that is also less bursty than in the past
  • Plugins can now request an availability check for a resource
  • Alerting has been improved: It is now possible to react on availability being in a certain state for some period of time (see the release notes for a long explanation
  • The JBoss AS 7 plugin has been massively improved
  • Denis Krusko has provided some initial Russian translations of the UI
  • Reports like Suspect Metrics, Recent Operations or Recent Drift can now be exported in CSV format to e.g. post-process them in Open/LibreOffice.


Of course we have fixed many small bugs too and made tweaks to the UI etc.

One very cool feature of this release is that the maven artifacts are already uploaded to the JBoss Nexus repository ;-)

Please check out the release notes, where you also find the download link. Also check out the RHQ 4.3 release notes, as 4.3 was more a slient release, which nevertheless brought enhancements in the UI (update of GWT/SmartGWT) and many bug fixes.

If you want to get a quick overview on the ways to interact with RHQ, have a look at this whitepaper (PDF)

As always: give use feedback, join us on Irc on #rhq and spread the word.

And last but not least I want to thank all our contributors for their valuable contributions.

Heiko on behalf of the RHQ team

Monday, April 23, 2012

RHQ participates in this years Google Summer of Code™

Gsoc 2012 logo colorRHQ is happy to be able to participate in this years Google Summer of Code™

We have as part of the JBoss.org organization seen many very good proposals and the whole JBoss.org has seen many more so that even with the generosity of Google, we have obviously obtained a lot less slots than the number of good proposals received.

So I am extremely happy that for RHQ those two proposals have been accepted:

  • Replace old graphs by GWT ones - Denis Krusko: The main graphs in RHQ are still from the pre RHQ era and implemented as Servlets embedded in JSP and struts pages. The current UI is mostly written in GWT. While we were able to embed the old graphs, they still don't feel 'right'.


    Denis will investigate options for replacement and then implement new GWT-compatible graphing. Denis will also look at how the grahps can become more interactive by e.g. applying formulas on the data.

  • Implement an RHQ agent in Python - Krzysztof Kwaśniewski: The classical RHQ agent is written in Java and probably not best suited for every purpose. With the addition of the REST api, it now became easier to implement agents in other languages.


    Krzysiek will implement an agent in Python, that on one side talks REST with the RHQ server and on the other side interfaces with Matahari to take metrics from Fedora and RHEL hosts.



I am together with the other RHQ contributors very much looking forward to see Krzysztof and Denis in action.

Heiko

*) GSoC Logo is taken from http://code.google.com/p/google-summer-of-code/wiki/GsocLogos and has a CC-3.0-attrib-non-commercial-no-deratie license

Sunday, February 12, 2012

Small Fosdem 2012 review



On the weekend of Feb 4th, 2012 the European (and not only) Free and Open source community met in Brussels, Belgium for FOSDEM (Free and Open Source Developers Meeting).



The following video gives an impression on what FOSDEM is like - and I was only able to capture a tiny part of it.

(original size is 960x540)

I only arrived on Saturday at around noon via train. Stuttgart to Cologne was via ICE and from Cologne on I took the Thalys where I had the luck to get a a first class ticket for the price of a regular 2nd class one; the ticket included free WiFi and free breakfast with croissants, sandwiches and beverages.


I gave a talk on RHQ "Recent and future developments". In the presentation I talked about what we have achieved recently and where we may perhaps go in the future.


(original size is 960x540, here are slides as pdf)

As I had the camera with me, I also recorded a few other talks


I was lucky to meet with some of the JBoss colleagues, but was not able to make it to the virt sessions and to meet more of the various Red Hat people that were there. Fortunately some of the talks were recorded by the FOSDEM crew and will hopefully be online soon.

FOSDEM is for sure a conference to go to -- and not only because entrance is free and there is beer sold all over the place :)

Monday, January 23, 2012

JBoss, Fedora and more from Red Hat at FOSDEM 2012

A lot of folks from Red Hat are visiting FOSDEM 2012 this year.


I've listed the speakers here - I will myself talk on Saturday on RHQ.

In addition to the talks there are also stands:


You will be able to get a printed version of this list at the Fedora stand.

Saturday

WHEN

EVENT

TRACK & ROOM

SPEAKER

11:00-11:10

Welcome to the CrossDesktop Devroom

CrossDesktop  (H.1308)

Christophe Fergeau

11:00-11:05

Welcome to the Legal Issues DevRoom

Legal Issues  (AW1.125)

Richard Fontana

11:00-11:55

BoxGrinder : Grind your appliances easily

JBoss.org  (K.3.201)

Marek Goldmann

11:00-11:05

Welcome to the Free Java DevRoom

Free Java  (K.4.401)

Mark Wielaard, Andrew Haley, Andrew Hughes

12:00-12:55

Drools Planner: Planning optimization by example

JBoss.org  (K.3.201)

Geoffrey De Smet

12:30-12:55

libguestfs - tools for modifying virtual machine
disk images

Virtualization & Cloud  (Chavanne)

Richard Jones

13:00-13:25

Cloud high availability with pacemaker-cloud

Virtualization & Cloud  (Chavanne)

Pádraig Brady

13:00-13:55

Openshift

JBoss.org  (K.3.201)

Grant Shipley

14:00-14:25

The Aeolus Project

Virtualization & Cloud  (Chavanne)

Francesco Vollero

14:00-14:55

JBoss AS7 : Building JBoss AS 7 for Fedora

JBoss.org  (K.3.201)

Carlo De Wolf

15:00-15:50

Virtualization with KVM: bottom to top, past to future

Hypervisors  (Janson)

Paolo Bonzini

15:00-15:55

JBoss Forge / Arquillian: Two Missing Links in
Enterprise Java Development

JBoss.org  (K.3.201)

Koen Aers

15:00-15:25

Open Clouds with Deltacloud API

Virtualization & Cloud  (Chavanne)

Michal Fojtik

15:30-15:55

DMTF CIMI and Apache Deltacloud

Virtualization & Cloud  (Chavanne)

Marios Andreou

16:00-16:55

Infinispan: where open source, Java and in-memory
data grids converge

JBoss.org  (K.3.201)

Manik Surtani

16:15-17:00

Crossdesktop group picture

CrossDesktop  (H.1308)

Christophe Fergeau

16:30-17:00

The (possible) decline of the GPL, and what to do
about it

Legal Issues  (AW1.125)

Richard Fontana

17:00-17:55

RHQ: Recent and future developments in the RHQ
systems monitoring and management framework

JBoss.org  (K.3.201)

Heiko Rupp

17:30-18:00

Panel on Application Stores

Legal Issues  (AW1.125)

Richard Fontana

18:00-18:55

Guvernor/JBPM : Managing workflows and business
rules with Guvnor and the jBPM designer

JBoss.org  (K.3.201)

Geoffrey De Smet, Marco Rietveld

18:00-18:30

Thermostat: Taking over the Java tooling world with
Open Source Software

Free Java  (K.4.401)

Jon VanAlten, Omair Majid

18:20-18:35

PMD5: What can it do for you?

Lightning Talks (Ferrer)

Romain PELISSE

18:30-19:00

Tracing, Debugging and Testing With Byteman

Free Java  (K.4.401)

Andrew Dinn

Sunday

WHEN

EVENT

TRACK & ROOM

SPEAKER

09:00-09:25

Spice "Open remote computing" introduction

Virtualization & Cloud  (Chavanne)

Hans de Goede

09:30-09:55

USB redirection over the network

Virtualization & Cloud  (Chavanne)

Hans de Goede

10:00-10:45

Systems Management with Matahari

Configuration & Systems Management  (K.3.601)

Zane Bitter

10:45-11:15

Boxes, use other systems with ease

CrossDesktop  (H.1308)

Zeeshan Ali (Khattak), Marc-André Lureau

11:00-11:15

Powerful tools for Linux C/C++ developers based on
Eclipse

Lightning Talks (Ferrer)

Andrew Overholt

11:00-11:25

Virtualization Management the oVirt way

Virtualization & Cloud  (Chavanne)

Itamar Heim

11:30-11:55

oVirt Engine Core: Internals and Infrastructure

Virtualization & Cloud  (Chavanne)

Omer Frenkel

11:30-12:00

Can I legally do that?

Free Java  (K.4.401)

Mark Wielaard

12:00-12:25

VDSM - The oVirt Node Management Agent

Virtualization & Cloud  (Chavanne)

Federico Simoncelli

12:30-13:30

OpenJDK on ARM: Quo vadis?

Free Java  (K.4.401)

Andrew Haley

15:00-15:55

Building app sandboxes on top of LXC and KVM with
libvirt

Virtualization & Cloud  (Chavanne)

Daniel Berrange

15:30-16:00

IcedTea and IcedTea-Web

Free Java  (K.4.401)

Deepak Bhole

16:30-17:00

Discussion on the Future of Free Java

Free Java  (K.4.401)

Andrew Haley

Saturday, January 14, 2012

Polyglot management of a secured AS7

JBossAS7 comes with a nice management interface that tools like the built-in admin-console or the console app are using. Next to the "more binary" DMR protocol, there is also a JSON interface available that can be accessed via http. Using this interface allows to manage AS7 from any programing language.
Luckily :-) this interface is secured by default and only accessible for a valid user via http digest authentication.

Set up admin user



The first step is to enable a user on the server to use for this management interface:


$ cd /jboss-as-7.1.0
$ bin/add-user.sh

Enter the details of the new user to add.
Realm (ManagementRealm) : <press enter>
Username : heiko
Password : <provide password>
Re-enter Password : <provide password again>
About to add user 'user' for realm 'ManagementRealm'
Is this correct yes/no? yes
Added user 'user' to file '/jboss-as-7.1.0/standalone/configuration/mgmt-users.properties'


Now we have created a user 'heiko' with password 'okieh'.

Shell with curl



The following command with shut down the server via the management interface:

$ curl --digest -u heiko http://localhost:9990/management/ -d '{"operation":"shutdown" }' -HContent-Type:application/json


Note that for option '-u' only the username is given — curl will ask for the password. One important part here is that to mark the content-type of the data sent as "application/json". Curl will, if this header is not provided, send the request as 'application/x-www-form-urlencoded' which is disallowed by AS7.

If you run curl with option '-v' you can nicely see the re-negotiation to acquire the nonce from the server in order to compute the digest:

$ curl -v --digest -u heiko http://localhost:9990/management/ -d '{"operation":"shutdown" }' -HContent-Type:application/json
Enter host password for user 'heiko': <okieh>
* About to connect() to localhost port 9990 (#0)
* Trying 127.0.0.1... connected
* Connected to localhost (127.0.0.1) port 9990 (#0)
* Server auth using Digest with user 'heiko'
> POST /management/ HTTP/1.1
> User-Agent: curl/7.21.7 (x86_64-apple-darwin10.8.0) libcurl/7.21.7 OpenSSL/1.0.0e zlib/1.2.5 libidn/1.22
> Host: localhost:9990
> Accept: */*
> Content-Type:application/json
> Content-Length: 0
>
< HTTP/1.1 401 Unauthorized
< Content-length: 0
< Www-authenticate: Digest realm="ManagementRealm",nonce="6089edca29aa27b064aa1db42d9651eb"
< Date: Fri, 13 Jan 2012 09:54:39 GMT
<


First request has been sent and the server replied with a 401 unauthorized and the nonce to use. Now curl continues:


* Connection #0 to host localhost left intact
* Issue another request to this URL: 'http://localhost:9990/management/'
* Re-using existing connection! (#0) with host localhost
* Connected to localhost (127.0.0.1) port 9990 (#0)
* Server auth using Digest with user 'heiko'
> POST /management/ HTTP/1.1
> Authorization: Digest username="heiko", realm="ManagementRealm", nonce="6089edca29aa27b064aa1db42d9651eb", uri="/management/", response="78b9546e7485b661121e34a72d2979f1"
> User-Agent: curl/7.21.7 (x86_64-apple-darwin10.8.0) libcurl/7.21.7 OpenSSL/1.0.0e zlib/1.2.5 libidn/1.22
> Host: localhost:9990
> Accept: */*
> Content-Type:application/json
> Content-Length: 25
>
< HTTP/1.1 200 OK
< Transfer-encoding: chunked
< Content-type: application/json
< Date: Fri, 13 Jan 2012 09:54:39 GMT
<
* Connection #0 to host localhost left intact
* Closing connection #0
{"outcome" : "success"}
$


So we've issued the equest and the server has shutdown. Using the same technique you can also e.g. query the port, the http-connector is listening on (which has the symbolic name of 'http'):

curl --digest -u heiko http://localhost:9990/management/ -HContent-Type:application/json  --data @-<< -EOF-
{
"operation":"read-attribute",
"address":[
{"socket-binding-group":"standard-sockets"},
{"socket-binding":"http"}
],
"name":"port"
}
-EOF-


In this example you also see how to pass the address of the node to inspect and the name of the attribute to the server.

Beware that if you make a typo in the json-encoding (e.g. separating key and value by comma instead of colon), the server may just respond with a 401 without telling you what went wrong

Perl



It's a long time since I did serious perl coding, so that next example may not be the most elegant. The example shows again, how to retrieve the http port via a 'read-attribute' operation. As I don't want to obsfuscate the code even more, I did just provide the password in the script.


#!/usr/bin/perl

use JSON qw(objToJson jsonToObj from_json to_json decode_json);
use LWP;

$host = "localhost";
$port = "9990";

$realm = "ManagementRealm";
$user = "heiko";
$password = "okieh";

# Construct url of management api
$url = "http://$host:$port/management";


# the command to send to the server in JSON encoding
$json_data = '
{
"operation":"read-attribute",
"address":[
{"socket-binding-group":"standard-sockets"},
{"socket-binding":"http"}
],
"name":"port"
}
';
# set up a User agent
my $browser = LWP::UserAgent->new();

# Create the request
my $req = HTTP::Request->new(POST => $url);
$browser->credentials("$host:$port",$realm,$user,$password);
$req->content_type( 'application/json');
$req->content($json_data);

# send the request to the server
$res = $browser->request($req);

# If we don't get a 200 back, we finish here
die "No success ", $res->status_line unless $res->is_success;

# Get the content from the response
my $seite_code = $res->content;
print "Received : $seite_code \n";

# decode the json retieved
my $json = JSON->new->utf8;
$obj = $json->decode($seite_code);
%pairs = %{$obj}; # json->decode returns a hash ref
# get the result
$httpPort = $pairs{"result"};
print "Http port is $httpPort \n";


The basic part to handle the digest authentication is $browser->credentials("$host:$port",$realm,$user,$password);, which makes LWP transparently handle the creation of the digest and re-sending of the request.

Ruby



Unlike perl, which I was using a lot in the past, I am not yet familiar with Ruby, so there may be a much better solution -- please provide some feedback. Especially I have not found a good way to automatically handle the digest authentication, so this is done explicitly


#!/opt/local/bin/ruby1.9

require 'json'
require 'net/http'
require 'net/http/digest_auth'

url = URI.parse('http://localhost:9990/management/')
url.user = 'heiko'
url.password = 'okieh'

# data to send to retrieve the server name
data = { "operation" => "read-attribute",
"address" => [],
"name" => "name"}

h = Net::HTTP.new url.host, url.port

# send first request to get nonce
req = Net::HTTP::Post.new url.request_uri
res = h.request req


So far we have sent a first request to obtain the 'nonce' from the server, so we can compute the digest in the 2n step.


# compute the digest
digest_auth = Net::HTTP::DigestAuth.new
auth = digest_auth.auth_header url, res['www-authenticate'], 'POST'

# Now send the real request with the nonce
body = JSON.generate(data)

puts "Sending " + body
req = Net::HTTP::Post.new url.request_uri
req.add_field 'Content-Type', 'application/json'
req.add_field 'Authorization', auth
req.body = body

res = h.request req

print "Result " + res.body

# parse the JSON and obtain the 'result' object
data = JSON.parse(res.body)
server_name = data["result"]
print "Server name is " + server_name

Thanks


I want to thank Darran Lofthouse for helping me to get going with why apparently correct requests fail with a 403 (because of the wrong content type).

Monday, December 12, 2011

Announcing the RHQ samples project

I am proud to announce the inception of a the samples project for RHQ.
This is meant to collect samples and extensions around RHQ that could be used in RHQ and also JBoss ON. Users can go there and copy and paste the solutions to get a quicker start themselves.

While this project is started by the RHQ project team, everyone is encouraged to come and use the samples, fork the project and enhance it. To make this process easier, the project is hosted on GitHub at

https://github.com/rhq-project/samples

The initial content centers around the new REST api of RHQ, and shows how to use this API from Ruby or Python and how to build reports from JasperReports.

Wanja Pernath has also submitted his group control scripts using the CLI in RHQ and JBoss ON.

Wednesday, November 23, 2011

Join me and RHQ in London next monday

global_31838371.jpeg

As written before, I will talk at the London JBoss User Group next monday about RHQ and JBoss ON.

You may register on the meetup page, which also lists the venue and the directions to get there.

JBUG+November.jpg

Monday, October 31, 2011

RHQ 4.2 released

The RHQ team is proud to have released version 4.2 of the systems management and monitoring framework.

 

 

This release focuses on:

  • UI enhancements / bug fixing
  • Completion of drift management (this allows you to e.g. detect changes to files on your managed platform and to alert on such drift)
  • Improvements in server config sync (you can basically take (parts of) the configuration of one RHQ server and apply it to a different RHQ server).

In addition to that, the release is the very first to have a (limited) REST interface. Another change is the added support for PostgreSQL 9.1.

We want to thank

  • Ted Won for contributing Korean installer messages
  • Rafael Torres for improvements to the Twitter plugins (OAuth support)
  • All community members that provided input and bug reports

As always check the release notes for a more complete list of changes. You can get the downloads from sourceforge. And please provide us feedback; for the REST interface we are also looking for usage examples.

 

Heiko Rupp will showcase RHQ 4.2 at the November meeting of the London JBUG.

Monday, October 24, 2011

RHQ and JBoss ON at JBug London (updated)

global_31838371.jpeg

I will talk on monday, Nov 28th at the London (UK) JBoss User Group about RHQ and JBoss ON. The talk will give an overview over RHQ and JBoss ON, showcase the new features in RHQ 4.2 and also talk a little bit about the new REST api.

The talk venue is the Skills matter eXchange, where the meetup page has the link to the location and also a link to the registration.

The guys from C2B2 also created a cool poster:

JBUG+November.jpg

 

Wednesday, September 28, 2011

REST coming to RHQ (updated)

In the past few weeks I was also working on implementing a sample REST interface for RHQ (see also here and here). At our team meeting I've showcased the work I've done in the heiko-rest branch of our git repository and we have decided to merge that into the RHQ master branch sooner or later.

UPDATE: this has been merged today (2011/10/09); if you build from source, you need to build the container again.

To stimulate your appetite I will show some samples what you could do with the REST api:

Returning resources in html representation

 

Bildschirmfoto 2011 09 28 um 11 31 55
and as JSON
Bildschirmfoto 2011 09 28 um 12 06 55
Render metric graphs in Javascript with the help of D3.js
Bildschirmfoto 2011 09 28 um 11 32 45
Or an alternative resource tree in Javascript with the help of D3.js
Bildschirmfoto 2011 09 28 um 11 33 16
Providing data to an Android client application (this is not very sophisticated yet, but should illustrate the idea):
List / add / delete favorite resources:
$ curl localhost:7080/rest/1/user/favorites/resource -u rhqadmin:rhqadmin
[{"resourceWithType":{"@resourceId":"10160","pluginName":"RHQServer"
,"resourceName":"Measurement Subsystem","typeId":10235
,"typeName":"RHQ Server Measurement Subsystem"}}
,{"resourceWithType":{"@resourceId":"10361","pluginName":"jboss-as-7"
,"resourceName":"\/devel\/jbas7\/jboss-as\/build\/target\/jboss-as-7.1.0.Alpha2-SNAPSHOT","typeId":10055
,"typeName":"JBossAS7-Standalone"}}]

Add resource with id 10013 to favorites:

$ curl localhost:7080/rest/1/user/favorites/resource/10013 -X PUT -u rhqadmin:rhqadmin
$ curl localhost:7080/rest/1/user/favorites/resource -u rhqadmin:rhqadmin
[{"resourceWithType":{"@resourceId":"10013","pluginName":"Platforms"
,"resourceName":"en0","typeId":10024
,"typeName":"Network Adapter"}}
,{"resourceWithType":{"@resourceId":"10160","pluginName":"RHQServer"
,"resourceName":"Measurement Subsystem","typeId":10235
,"typeName":"RHQ Server Measurement Subsystem"}}
,{"resourceWithType":{"@resourceId":"10361","pluginName":"jboss-as-7"
,"resourceName":"\/devel\/jbas7\/jboss-as\/build\/target\/jboss-as-7.1.0.Alpha2-SNAPSHOT","typeId":10055
,"typeName":"JBossAS7-Standalone"}}]

And remove it again from favorites:

$ curl localhost:7080/rest/1/user/favorites/resource/10013 -X DELETE -u rhqadmin:rhqadmin

 

Of course those are only some examples and should illustrate that:

  • the api will be usable from different clients
  • from different programming languages
  • it will allow write / update access
  • it will allow users to write extensions to RHQ like e.g. Über-consoles that we do not even think of

We were also thinking of the possibility for agents in other languages being able to push events and metrics over this interface.

The code is currently in the heiko-rest branch in RHQ-git (at fedorahosted), but we plan to merge it into master as soon as possible. If you want to try the code, check out the branch and either build RHQ from scratch. Or try running /etc/dev-utils/setup-rest/setup.sh to populate the server with the needed libraries (edit that file first), then build server/jar and gui/rest-war in dev-mode so that the artifacts are copied to the server. Then edit rhq.ear/META-INF/application.xml to include the rest war.  Of course all this will not be needed after we have merged the code in the master, as the normal build will then have all the artifacts.

The code for the Android app is available from my repository on GitHub

An important part of this whole effort is your input:

  • Provide us with your requirements e.g. on the Design - REST page of the RHQ-Wiki
  • Contribute to the code
  • Show us your examples you have built on top of the API (and perhaps even contribute them)

 

Please help us making this great so that you can create great stuff with the interface.

Thursday, August 11, 2011

RHQ 4.1.0 BETA released

The RHQ team has just released version 4.1.0.beta of the RHQ systems management and monitoring suite. This release serves as a preview of the upcoming version 4.1.0 and has a wealth of new features.

Some of the new features are work in progress and will only be finished after 4.1, which means that you can still influence the features with your ideas and feedback.

Release notes are on the RHQ wiki and also contain the link to the download at the bottom.

We want to especially thank Elias Ross, Fusayuki Minamoto, Jijun Liu, Zhongqianglee
and Rafael Torres Coelho Soares for their contributions (even if some are not in this build)

 

Monday, May 23, 2011

RHQ 4.0.1 released

RHQ logo wallpaper

 

 

The RHQ team has just released version 4.0.1 of its server management and monitoring software.

This release is a bugfix release over RHQ 4 which was released earlier this month. The biggest change is the addition of support for IE 7 and 8, as well as the fix for a memory leak that came from how JBossAS internally has set up the pools for MDBs and SLSBs.

You can browse the full release notes, which also contain a link to the download.

Jay Shaughnessy has written a blog post on what was necessary with SmartGWT to get it to work on IE7 and 8.