The goal of this project was to lay out a concise framework for developing Machine Agent extensions. This process should be reasonably simple and require minimal configuration.
- Maven required to build package
- MachineAgent.jar you are targeting
- Can be found on http://download.appdynamics.com/
When configuring a Machine Agent Extension, there are only 2 variables to worry about.
- Metric Path we would like our metric to be written to.
- The integer values we would like to push.
To achieve this, we will define a config.json file of the following format.
[
{
"metricPath" : String,
"aggregatorClass" : String,
"args": : Array.of(Object)
},
...
]
Where aggregatorClass is the fully qualified class name of a class which implements IMetricAggregator and args are the optional arguments to said class.
Each individual metric we push to the controller will have a corresponding JSONObject in the config.json file.
IMetricAggregator is simple to implement. Its only method is as follows.
public int computeMetric(List<String> args);
The return value of this method will automatically be picked up and pushed to the controller according to the metricPath specified in config.json.
The Controller has various qualifiers for how it processes metrics with regard to aggregation, time rollup, and tier rollup. These configurations can be specified in the config.json in the JsonObjewct metricProcessingQualifiers.
- Clone repository
git clone https://github.com/Appdynamics/MAExtensionFramework
- Package with Maven
mvn package
- Grab the following files:
- MAExtensionFramework.jar from target/
- config.json from src/main/resources/conf/
- monitor.xml from src/main/resources/conf/
- Create a MAExtensionFramework folder in monitors/ folder on deployed Machine Agent and place all 3 above files inside
- Restart Machine Agent
For support please email: bradley.hjelmar@appdynamics.com