[Hawkular-dev] agent error

Juraci Paixão Kröhling jpkroehling at redhat.com
Fri Jan 29 03:41:18 EST 2016


Debugging it here, it seems that the Agent is sending a Hawkular-Tenant 
header. IIRC, Metrics now blocks requests with that, as the tenant is 
defined by Accounts[1]. Perhaps metrics could be a bit forgiving at 
first, adding a WARN to the logs for a couple of weeks?

I would also recommend adding the following to 
MetricsOnlyStorageAdapter[2] to make it easier to see what's going on:

response.body().source().readUtf8();

When debugging it here, the code above returned this:
{"errorMsg":"The Hawkular-Tenant header is not allowed. The tenant is 
determined from the credentials supplied with the request"}

1 - https://git.io/vzbs8
2 - https://git.io/vzbsU

- Juca.


On 28.01.2016 22:55, John Mazzitelli wrote:
> I wanted to verify this PR fixes my problem storing metrics:
>
> https://github.com/hawkular/hawkular-metrics/pull/438
>
> So I pulled hawkular-metrics, built, and then built kettle using metrics 0.12.0-SNAPSHOT.
>
> But now it is worse - even using username/password, agent can't store any metric data. I am wondering if the REST API changed in metrics? or if this PR actually broke something. The error makes it seem like the REST calls that did work on 0.11.0 no longer do, but I don't know if its an auth issue or a REST/JSON issue:
>
> 16:42:43,703 ERROR [org.hawkular.agent.monitor.storage.MetricsOnlyStorageAdapter] (OkHttp http://127.0.0.1:8080/hawkular/metrics/metrics/data) HAWKMONITOR010010: Failed to store metric data: {"counters":[],"availabilities":[],"gauges":[{"data":[{"value":0.0,"timestamp":1454017363117}],"id":"MI~R~[6f9d3775-410f-4f9a-bd76-cc6e9f2979c2/Local~/subsystem=messaging-activemq/server=default/jms-topic=HawkularAccountsEvents]~MT~JMS Topic Metrics~Message Count"}]}: java.io.IOException: status-code=[400], reason=[Bad Request], url=[http://127.0.0.1:8080/hawkular/metrics/metrics/data]
>
> I see no errors coming from accounts or metrics - this is the only error I get (its from the agent logging the error after attempting to make a REST request to metrics to store data)
> _______________________________________________
> 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