AppDynamics Static Monitoring Extension
This extension works only with the standalone machine agent.
##Use Case
Once per minute, this monitoring extension reads metrics from the metrics.xml file and reports them to the AppDynamics Controller.
For example, you can create a metric named "maintenance mode" and put a value of 0 if the node (where the corresponding Machine Agent is installed) is not in maintenance mode, and a value of 1 if it is in maintenance mode.
At any time you can make manual (or automated) updates -- such as changes in the value or name of a metric -- to the metrics.xml file. It will take up to one minute for the Static Monitoring Extension to report these updates to the Controller.
This extension also gives you the opportunity to create policy alerting based on AND or OR clauses.
For example, if the traffic of a node falls below a certain threshold AND this node is not in maintenance mode, you can have an AppDynamics policy trigger an action.
##Installation
- Run 'ant package' from the static-monitoring-extension directory
- Deploy the file StaticMonitor.zip located in the 'dist' directory into <machineagent install dir>/monitors/
- Unzip the deployed file
- In <machineagent install dir>/monitors/StaticMonitor/ open metrics.xml and enter data for at least one metric.
- Optional but recommended. Open monitor.xml and configure a custom metric path (see monitor.xml for instructions)
- Restart the Machine Agent.
Look for the metrics in the AppDynamics Metric Browser at: Application Infrastructure
Performance | <Tier> | Custom Metrics | Static Monitor | <Metric
name> or at: Application Infrastructure Performance | <Tier> | <your configured name (optional)>
##Directory Structure
Directory/File |
Description |
conf |
Contains the monitor.xml and metrics.xml files |
lib |
Contains third-party project references |
src |
Contains source code to the Static monitoring extension |
dist |
Only obtained when using ant. Run 'ant build' to get binaries. Run 'ant package' to get the distributable .zip file |
build.xml |
Ant build script to package the project (required only if changing Java code) |
XML files:
- monitor.xml: This is used to execute the Java code which will start
the monitoring extension. You might need to configure the path to metrics.xml
(explained in Installation Steps)
- metrics.xml: Define your own custom metrics here, and update this
file at any time. The metrics will be reported to the Controller
once per minute.
Note: Main Java File: src/main/java/com/appdynamics/monitors/staticmonitor/StaticMonitor.java -> This file contains the metric parsing and printing.
##XML Example
###metrics.xml
Parameter |
Description |
<metric-name> |
The name of the metric |
<metric-value> |
An integer value of the metric. This metric is reported to the Controller once per minute. |
<static-monitor>
<!-- You can have more than one metric if you wish -->
<metric>
<!-- Enter the name of your metric -->
<metric-name>Machine ABC Maintenance Mode</metric-name>
<!-- Enter an integer. This value is reported to the controller once
per minute (default is 0) -->
<metric-value>1</metric-value>
</metric>
<metric>
<!-- Enter the name of your metric -->
<metric-name>Machine XYZ Maintenance Mode</metric-name>
<!-- Enter an integer. This value is reported to the controller once
per minute (default is 0) -->
<metric-value>0</metric-value>
</metric>
</static-monitor>
##Contributing
Always feel free to fork and contribute any changes directly via GitHub.
##Community
Find out more in the AppSphere community.
##Support
For any questions or feature request, please contact AppDynamics Center of Excellence.