[Hawkular-dev] Metric id and url restrictions

Matt Wringe mwringe at redhat.com
Fri Sep 18 11:21:08 EDT 2015


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?


More information about the hawkular-dev mailing list