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

Joel Takvorian jtakvori at redhat.com
Mon Oct 30 03:43:55 EDT 2017


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/730f66e1/attachment.html 


More information about the hawkular-dev mailing list