[Hawkular-dev] Metric under Resource Type

John Mazzitelli mazz at redhat.com
Sat Aug 6 14:20:57 EDT 2016


BTW: the subject of your thread is "Metric under Resource Type" - I just wanted to clarify.

You can't put Metrics under Resource Types - you put Metrics under Resources. See here :

https://github.com/hawkular/hawkular-agent/blob/master/hawkular-wildfly-agent/src/main/java/org/hawkular/agent/monitor/storage/AsyncInventoryStorage.java#L363

I believe Lukas K. told me once that right now you also can't put metric *types* under resource types either - all types are direct children under the root (so metric types are peers to resource types, not under them). The agent follows this rule as you see here:

https://github.com/hawkular/hawkular-agent/blob/master/hawkular-wildfly-agent/src/main/java/org/hawkular/agent/monitor/storage/AsyncInventoryStorage.java#L401

----- Original Message -----
> > I posted my feed, resources and metrics to inventory with /bulk api.
> > But the errors shows:
> > "errorMsg" : "Entity of type 'Metric' cannot be created under an entity of
> > type 'Resource'."
> > Why is this not allowed since I can do it with normal create entity api?
> > How can I create a metric under a certain resource with bulk api?
> 
> The agent does it in its /bulk requests. You can see how the agent does it
> here:
> 
> https://github.com/hawkular/hawkular-agent/blob/master/hawkular-wildfly-agent/src/main/java/org/hawkular/agent/monitor/storage/AsyncInventoryStorage.java#L194
> _______________________________________________
> 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