<div dir="ltr">BTW, +1 for dedicated fields in Metric model.<div>That will avoid mixing labels and properties, which would be error-prone on client side for rebuilding the full ID.</div><div>I&#39;ve created a JIRA for that: <a href="https://issues.jboss.org/browse/HAWKULAR-1311">https://issues.jboss.org/browse/HAWKULAR-1311</a></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Oct 30, 2017 at 8:43 AM, Joel Takvorian <span dir="ltr">&lt;<a href="mailto:jtakvori@redhat.com" target="_blank">jtakvori@redhat.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Nice!<div><br></div><div>It looks like from these example, fields &quot;name&quot; and &quot;type&quot; could be merged into one, are they always identical?</div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Oct 29, 2017 at 1:30 PM, John Mazzitelli <span dir="ltr">&lt;<a href="mailto:mazz@redhat.com" target="_blank">mazz@redhat.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">The agent in branch hawkular-1275 can now link Prometheus metric family names/labels into hawkular inventory (at least, it looks like its working :-)<br>
<br>
You will see metrics in inventory that look like the below examples - notice the general props on the metrics now contain Prometheus metric labels - there is one extra property called &quot;hawkular.metric.family&quot; and that is, obviously, the Prometheus metric family name. The rest are Prometheus metric labels. We need to change this, I think. We should have first-class fields on the inventory Metric object for &quot;String metricFamily&quot; and &quot;Map&lt;String, String&gt; metricLabels&quot;. But for now, we are using general properties.<br>
<br>
So for example, to query the &quot;Pool Create Count&quot; metric data from Prometheus for the Stateless Session EJB resource called &quot;InventoryServiceIspn&quot; you look up its metric metadata in hawkular inventory, see the following metadata I show below, and then you know have to query this in Prometheus:<br>
<br>
   wildfly_ejb_pool_create_<wbr>count{deployment=hawkular-<wbr>inventory-service.war, name=InventoryServiceIspn, feed-id=mazzlap}<br>
<br>
We do not have unique metric IDs being stored yet. We should figure out if we really need them before we store more data in inventory.<br>
Also, the JMX exporter does not actually put the feed-id label on metrics - that will be the job of the Prometheus server and its scrape definition. But we know it will need to be there, so inventory will specify it.<br>
<br>
   {<br>
      &quot;name&quot;: &quot;Pool Create Count&quot;,<br>
      &quot;type&quot;: &quot;Pool Create Count&quot;,<br>
      &quot;unit&quot;: &quot;NONE&quot;,<br>
      &quot;properties&quot;: {<br>
        &quot;feed-id&quot;: &quot;mazzlap&quot;,<br>
        &quot;name&quot;: &quot;InventoryServiceIspn&quot;,<br>
        &quot;type&quot;: &quot;stateless-session&quot;,<br>
        &quot;hawkular.metric.family&quot;: &quot;wildfly_ejb_pool_create_count<wbr>&quot;,<br>
        &quot;deployment&quot;: &quot;hawkular-inventory-service.wa<wbr>r&quot;<br>
   }<br>
<br>
Here&#39;s other examples you will see in inventory:<br>
<br>
   {<br>
      &quot;name&quot;: &quot;Max Active Sessions&quot;,<br>
      &quot;type&quot;: &quot;Max Active Sessions&quot;,<br>
      &quot;unit&quot;: &quot;NONE&quot;,<br>
      &quot;properties&quot;: {<br>
        &quot;feed-id&quot;: &quot;mazzlap&quot;,<br>
        &quot;hawkular.metric.family&quot;: &quot;wildfly_deployment_max_active<wbr>_sessions&quot;,<br>
        &quot;deployment&quot;: &quot;hawkular-inventory-service.wa<wbr>r&quot;<br>
   }<br>
<br>
   {<br>
      &quot;name&quot;: &quot;Heap Used&quot;,<br>
      &quot;type&quot;: &quot;Heap Used&quot;,<br>
      &quot;unit&quot;: &quot;BYTES&quot;,<br>
      &quot;properties&quot;: {<br>
        &quot;area&quot;: &quot;heap&quot;,<br>
        &quot;feed-id&quot;: &quot;mazzlap&quot;,<br>
        &quot;hawkular.metric.family&quot;: &quot;jvm_memory_bytes_used&quot;<br>
   }<br>
______________________________<wbr>_________________<br>
hawkular-dev mailing list<br>
<a href="mailto:hawkular-dev@lists.jboss.org" target="_blank">hawkular-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/hawkular-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/mailma<wbr>n/listinfo/hawkular-dev</a><br>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>