[Hawkular-dev] Hawkular agent for Karaf?

John Mazzitelli mazz at redhat.com
Thu Aug 11 17:10:49 EDT 2016


> I think our agent has three kinds of code:
> 1) boiler plate to get it to run inside of WildFly and be configured via
> standalone.xml
> 2) code to fetch values via DMR, JMX, ...
> 3) code to interact with the Hawkular server
> 
> 3) would be stuff that Tom could re-use
> Parts of 2) - the JMX one - as well, even if in his case it may be
> a local JMX connection instead of remote. Or he could set up one
> Karaf container as agent, remote monitoring the other containers.
> 
> Mazz: can we identify the code for 2) and 3) and help Tom?
> 
> +1, this will become important after we have wildfly under our belts.

2) Code to fetch values via DMR, JMX, ...

* Common code for all our protocols (our protocols are: DMR (via WildFly management API), JMX (via Jolokia), Platform (via Oshi)):

https://github.com/hawkular/hawkular-agent/tree/master/hawkular-wildfly-agent/src/main/java/org/hawkular/agent/monitor/protocol

** Code to fetch DMR data:

https://github.com/hawkular/hawkular-agent/tree/master/hawkular-wildfly-agent/src/main/java/org/hawkular/agent/monitor/protocol/dmr

** Code to fetch JMX data:

https://github.com/hawkular/hawkular-agent/tree/master/hawkular-wildfly-agent/src/main/java/org/hawkular/agent/monitor/protocol/jmx

3) code to interact with the Hawkular server

Code to interact with the Hawkular Server is in several spots throughout. Some of the more important places:

* MonitorService.registerFeed (this creates the feed ID in Hawkular Inventory):

https://github.com/hawkular/hawkular-agent/blob/master/hawkular-wildfly-agent/src/main/java/org/hawkular/agent/monitor/service/MonitorService.java#L939

* Storing inventory (resources, metric types, resource types, etc) in Hawkular-Inventory (this is currently undergoing a big refactoring):

https://github.com/hawkular/hawkular-agent/blob/master/hawkular-wildfly-agent/src/main/java/org/hawkular/agent/monitor/storage/AsyncInventoryStorage.java

* Storing metrics in Hawkular-Metrics:

https://github.com/hawkular/hawkular-agent/blob/master/hawkular-wildfly-agent/src/main/java/org/hawkular/agent/monitor/storage/HawkularStorageAdapter.java



More information about the hawkular-dev mailing list