yeah I meant type "resource". Thanks very helpful!
John Mazzitelli <mazz@redhat.com>於 2016年8月7日 週日,02:21寫道:
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@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/hawkular-dev
>
_______________________________________________
hawkular-dev mailing list
hawkular-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hawkular-dev