Skip Menu |

This queue is for tickets about the jmx4perl CPAN distribution.

Report information
The Basics
Id: 50908
Status: resolved
Priority: 0/
Queue: jmx4perl

People
Owner: roland [...] cpan.org
Requestors: Fried.Hoeben [...] Telfort.com
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: (no value)
Fixed in: (no value)



Subject: Feature request: getting multiple attributes at once
Date: Wed, 28 Oct 2009 10:46:19 +0100
To: "bug-jmx4perl [...] rt.cpan.org" <bug-jmx4perl [...] rt.cpan.org>
From: "Hoeben, Fried (NL)" <Fried.Hoeben [...] Telfort.com>
Hi, I just tried out jmx4perl and I really liked how easy it was to use. Thanks a lot. I have a feature request however and I wonder what your thoughts are. I would like to read the value of multiple attributes of a single mbean, at the moment I have to do multiple requests to get these values. I was wondering whether it would not be possible to have a get using a hash that allowed me to read multiple values in one go. Performance-wise this seems much nicer. Actually I would even prefer to go further and specify multiple mbeans (explicitly listing them or using the wildcard syntax used for search) and get (multiple) attributes for each of them. Again reducing the number of HTTP requests seems a good idea to me, since I would like to obtain quite a few values. I'm thinking along the lines of a call [mbean-pattern1->[attribute_name_array1],mbean-pattern2->[attribute_name_array2],...] to get [mbean-name1->[attribute_name1->attribute_value1,attribute_name2->attribute_value2,attribute_name3=attribute_value3],mbean-name2->[attribute_name1->attribute_value1,attribute_name2->attribute_value2,attribute_name3=attribute_value3],...] On the Java side (that I have to admit to I'm more familiar with) this seems quite simple, and since the 'list' function already gets a similar data structure I thought this might me a nice addition. Cheers Fried Op deze e-mail is een disclaimer van toepassing, ga naar www.telfort.nl/klantenservice/informatie/emaildisclaimer A disclaimer is applicable to this email, please refer to www.telfort.nl/klantenservice/informatie/emaildisclaimer
Hi Fried, it's really a nice idea to offer bulk operations as well from within the servlet. I put this on the roadmap for 0.40 (0.36 is coming out at the end of this week). No ETA, though ;-) It's a bit more involved because at the moment I use rest style GET requests with path encoded parameters. This style is not very suitable for a large amount of request parameters as we would need it to specify multiple attribute mbean names. However, the agent servlet could distinguish between GET request for single valued request and POST request for bulk operations (so even multiple JMX operations in sequence could be used and even may be chainable by putting the operation's return value/attribute value as parameter to a JMX operation. Some sort of 'JMX Scripting'. But I will start small of course, but dreaming is allowed ;-) The feature will be available in the JMX::Jmx4Perl API on the client side, maybe extending it later on the client tool jmx4perl and check_jmx4perl.
Good news, I just pushed out a first developer release 0.40_1 which enables to perform multiple JMX-Request as one. You can read more about it at http://labs.consol.de/lang/de/opensource/jmx4perl/jmx4perl-0-36-and-0-40_1-released/. In short, JMX::Jmx4Perl->request() can now take multiples JMX::Jmx4Perl::Request objects as arguments in which case it will return multiple JMX::Jmx4Perl::Response objects. The requests are encapsulated into a single HTTP POST request. Documentation is still missing, though, and it is an early release. It would be nice, if you could give it a try and check whether it works for you.
Hi Fried, I just released 0.40 which contains support for bulk request. Simply use it like in @responses = $jmx4perl->request(@resquests) which is performed within a single HTTP-Post request. I close this ticket, please feel free to open another one in case something doesnt work as expexted. Thanx again for this nice idea ... ...roland