[Hawkular-dev] agent can now link prometheus metrics in inventory

Joel Takvorian jtakvori at redhat.com
Mon Oct 30 05:06:36 EDT 2017


BTW, +1 for dedicated fields in Metric model.
That will avoid mixing labels and properties, which would be error-prone on
client side for rebuilding the full ID.
I've created a JIRA for that: https://issues.jboss.org/browse/HAWKULAR-1311

On Mon, Oct 30, 2017 at 8:43 AM, Joel Takvorian <jtakvori at redhat.com> wrote:

> Nice!
>
> It looks like from these example, fields "name" and "type" could be merged
> into one, are they always identical?
>
> On Sun, Oct 29, 2017 at 1:30 PM, John Mazzitelli <mazz at redhat.com> wrote:
>
>> The agent in branch hawkular-1275 can now link Prometheus metric family
>> names/labels into hawkular inventory (at least, it looks like its working
>> :-)
>>
>> 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 "hawkular.metric.family" 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 "String metricFamily"
>> and "Map<String, String> metricLabels". But for now, we are using general
>> properties.
>>
>> So for example, to query the "Pool Create Count" metric data from
>> Prometheus for the Stateless Session EJB resource called
>> "InventoryServiceIspn" 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:
>>
>>    wildfly_ejb_pool_create_count{deployment=hawkular-inventory-service.war,
>> name=InventoryServiceIspn, feed-id=mazzlap}
>>
>> 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.
>> 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.
>>
>>    {
>>       "name": "Pool Create Count",
>>       "type": "Pool Create Count",
>>       "unit": "NONE",
>>       "properties": {
>>         "feed-id": "mazzlap",
>>         "name": "InventoryServiceIspn",
>>         "type": "stateless-session",
>>         "hawkular.metric.family": "wildfly_ejb_pool_create_count",
>>         "deployment": "hawkular-inventory-service.war"
>>    }
>>
>> Here's other examples you will see in inventory:
>>
>>    {
>>       "name": "Max Active Sessions",
>>       "type": "Max Active Sessions",
>>       "unit": "NONE",
>>       "properties": {
>>         "feed-id": "mazzlap",
>>         "hawkular.metric.family": "wildfly_deployment_max_active
>> _sessions",
>>         "deployment": "hawkular-inventory-service.war"
>>    }
>>
>>    {
>>       "name": "Heap Used",
>>       "type": "Heap Used",
>>       "unit": "BYTES",
>>       "properties": {
>>         "area": "heap",
>>         "feed-id": "mazzlap",
>>         "hawkular.metric.family": "jvm_memory_bytes_used"
>>    }
>> _______________________________________________
>> hawkular-dev mailing list
>> hawkular-dev at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/hawkular-dev
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/hawkular-dev/attachments/20171030/f9eebba4/attachment.html 


More information about the hawkular-dev mailing list