Red Hat

Vert.x agent inventory implementation

A blog post by Austin Kuo

agent | explorer | inventory | vertx



Hi all, This is Austin, who is responsible for the gsoc project Hawkular-agent for vert.x.

What I do is to implement the functionality to report the running vertx instances to the hawkular inventory service.

Reported Entities

Feed and Root resource

  1. A feed represents the vertx instance.

  2. A root resource which is the parent of all other subresources.

Subresources

  1. 1 eventbus resource

  2. 1 http client resource

  3. 1 net client resource

  4. 1 datagram socket resource

  5. 0…​N http server resources depends on how many http servers are running.

  6. 0…​N net server resources depends on how many net servers are running.

Hawkfx Snapshot

You now can view the inventory structure from the hawkfx client.

Hawkfx snapshot

How to use it?

The implementation is now at the brach inventory-reporter

Just follow the instruction in the repository but

Important
You have to enable inventory and provide the feed id and root resource id in VertxHawkularOptions.
VertxHawkularOptions vertxHawkularOptions = new VertxHawkularOptions();
vertxHawkularOptions.setEnabled(true); // By default Vert.x Metrics is disabled

VertxOptions vertxOptions = new VertxOptions();
vertxOptions.setMetricsOptions(vertxHawkularOptions);
vertxOptions.setInventoryEnabled(true);
vertxOptions.setFeedId("vertx-feed-id");
vertxOptions.setVertxRootResourceId("root-resource-id");




Published by Austin Kuo on 11 August 2016

redhatlogo-white

© 2016 | Hawkular is released under Apache License v2.0