[Hawkular-dev] Metric id and url restrictions

John Mazzitelli mazz at redhat.com
Fri Sep 18 11:32:18 EDT 2015


Metric IDs from our Wildfly Agent contain "/" because those are characters that are valid for Wildfly resources and we use the Wildfly resource names as part of the metric ID to uniquely identify them.

So for IDs of metrics coming from things like "/deployment=the-app.war/subsystem=ejb3" will have "/" in them. The only alternative would be for us to replace "/" with a character that is valid for URLs but invalid for Wildfly resource names. Say "$deployment=the-app.war$subsystem=ejb3" or something like that.


----- Original Message -----
> Currently we are storing metric id as any string. There are no
> restrictions on how we name the metrics, and when you access a single
> metric via a url you just need to make sure its url encoded properly here.
> 
> This works fine when dealing with a client and the Hawkular Metrics
> directly, but can cause problems when dealing with proxies or other
> intermediary servers which are not exactly url compliant.
> 
> The big issue is with slashes in the metric id. Even when properly
> encoded this can cause problems with things like proxies not accepting
> them (and even certain web container don't like them).
> 
> Since we need to be able to integrate over networks with these types of
> servers, we need to find a solution to resolve this in hawkular.
> 
> Possible solutions
> 
> - enforce naming of anything which can show up in a the URL to make sure
> it cannot include a '/' . This would include things like metric Id. This
> should probably be enabled by default, but we could have an option to
> disable this if a user needs it.
> 
> - create a new endpoint which can be used to perform a POST instead of
> doing a GET on the metric endpoint. This would mean sending things like
> the metric id and query string as part of the message body in the POST
> instead of in the URL.
> 
> Any thoughts?
> _______________________________________________
> hawkular-dev mailing list
> hawkular-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/hawkular-dev
> 


More information about the hawkular-dev mailing list