Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Path semantics for pattern READ request should be changed #106

Closed
rhuss opened this issue May 17, 2013 · 5 comments
Closed

Path semantics for pattern READ request should be changed #106

rhuss opened this issue May 17, 2013 · 5 comments
Milestone

Comments

@rhuss
Copy link
Member

rhuss commented May 17, 2013

When doing a pattern read request which results in multiple matches, then providing a path doesnt make much sense currently, since it applies on the whole map returned with the MBean names as keys in the first level (see the reference manual for details).

For homogenous reads on similar MBean it would make much more sense to apply the path only on the final value parts (for each MBean matched).

Since pathes are currently not usable with this sort of request, changing the behaviour shouldn't harm much so that it can be done within a minor release.

@michaello1
Copy link

It would be nice if described behaviour could be implemented in some of next releases. I am preparing monitoring tool for couple of environments on WebSphere 7.0 and I found out that I can not use pattern read request.

For example:
I need to read statistics for web container. It looks like this:

Request:

http://localhost:9080/jolokia/read/*:name=WebContainer,*/stats

Response:

jolokia1

I do not want the whole structure of the response, so what I want to do is:

http://localhost:9080/jolokia/read/*:name=WebContainer,*/stats/statistics

But it fails with:

java.lang.IllegalArgumentException : Map key 'statistics' is unknown for map {WebSphere:cell=win2k8-pabklosNode01Cell,mbeanIdentifier=cells\/win2k8-pabklosNode01Cell\/nodes\/win2k8-pabklosNode01\/servers\/server1\/server.xml#ThreadPool_1183121908657,name=WebContainer,node=win2k8-pabklosNode01,platform=dynamicproxy,process=server1,spec=1.0,type=ThreadPool,version=7.0.0.27={stats=\nStats name=WebContainer, type=threadPoolModule\n{\nname=ActiveCount, ID=3, description=The number of co ...

On the other hand following request with full mbean name works fine:

http://localhost:9080/jolokia/read/WebSphere%3Acell%3Dwin2k8-pabklosNode01Cell,mbeanIdentifier%3Dcells!%2Fwin2k8-pabklosNode01Cell!%2Fnodes!%2Fwin2k8-pabklosNode01!%2Fservers!%2Fserver1!%2Fserver.xml%23ThreadPool_1183121908657,name%3DWebContainer,node%3Dwin2k8-pabklosNode01,platform%3Ddynamicproxy,process%3Dserver1,spec%3D1.0,type%3DThreadPool,version%3D7.0.0.27/stats/statistics

I would like to use pattern requests instead of requests with full mbean names because it is easier to transfer to other environments and it is more readable too.

@rhuss
Copy link
Member Author

rhuss commented Oct 22, 2013

Ok, let's see what I can do. I will try to get this into 1.1.5, however no promises when it will be ready, though ;-) (I will try to have a look this evening, but it can take some time until the next release, since I'm filled up with work quite heavily 😓

@rhuss rhuss added this to the 1.2.1 milestone Mar 24, 2014
@rhuss
Copy link
Member Author

rhuss commented Apr 24, 2014

Seems to be more complicated to implement than expected so it won't make it to 1.2.1 either. Sorry.

@rhuss rhuss removed this from the 1.2.1 milestone Apr 24, 2014
@rhuss rhuss added this to the 1.2.2 milestone May 12, 2014
@rhuss
Copy link
Member Author

rhuss commented Jun 2, 2014

It will make it into 1.2.2, just have implememted 'wildcard' path parts and going to update the documentation accordingly. More on this later.

rhuss added a commit that referenced this issue Jun 3, 2014
rhuss added a commit that referenced this issue Jun 4, 2014
rhuss added a commit that referenced this issue Jun 5, 2014
@rhuss
Copy link
Member Author

rhuss commented Jun 5, 2014

So, it's finished so far. Quite complex beast, but I think it was worth because of the gained flexibility.

In you case you can use

http://localhost:9080/jolokia/read/*:name=WebContainer,*/stats/*/*/statistics 

to get to the statistics entries only. Also I recommend to have an eye on https://github.com/rhuss/jolokia-extra which makes access to Websphere (or JSR-77 metrics in genenral) statistic informations much easier.

The feature will be available in 1.2.2 to be released quite soon.

@rhuss rhuss closed this as completed Jun 5, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants