This extension works only with the standalone machine agent.
An AppDynamics extension that provide metrics from linux commands or script that generates a numeric output.
Before the extension is installed, the prerequisites mentioned here need to be met. Please do not proceed with the extension installation if the specified prerequisites are not met
<your-machine-agent-dir>/monitors
.Please place the extension in the "monitors" directory of your Machine Agent installation directory. Do not place the extension in the "extensions" directory of your Machine Agent installation directory.
Note: Please make sure to not use tab (\t) while editing yaml files
Please follow section 2.1 of the Document to set up metric prefix.
#Metric prefix used when SIM is enabled for your machine agent
#metricPrefix: "Custom Metrics|Command Watcher|"
#This will publish metrics to specific tier
#Instructions on how to retrieve the Component ID can be found in the Metric Prefix section of https://community.appdynamics.com/t5/Knowledge-Base/How-do-I-troubleshoot-missing-custom-metrics-or-extensions/ta-p/28695
metricPrefix: "Server|Component:<COMPONENT OR TIER ID>|Custom Metrics|Command Watcher|"
commandToProcess section should be configured like below:
commandToProcess:
- displayName: "Home Dir File Count"
command: "ls -ltr ~ | wc -l"
isScript: false
- displayName: "Java Processes List"
command: "ps aux | grep java | wc -l"
isScript: false
- displayName: "Random Script"
command: "/path/to/random_script.sh"
isScript: true
Always include one thread per command + 1 (to run main task)
For e.g. if you have configured 4 commands, then number of threads required are 5 (4 to run commands + 1 to run main task).
numberOfThreads: 5
It represents timeout for a thread in seconds.
threadTimeout: 30
Please copy all the contents of the config.yml file and go here . On reaching the website, paste the contents and press the “Validate YAML” button.
We provide metric related to output of the linux command or the script file that generates single numeric output.
For example: ps –ef | grep java |wc –l = 3
Workbench is an inbuilt feature provided with each extension in order to assist you to fine tune the extension setup before you actually deploy it on the controller. Please review the following document on How to use the Extensions WorkBench
Please follow the steps listed in this troubleshooting-document in order to troubleshoot your issue. These are a set of common issues that customers might have faced during the installation of the extension.
Always feel free to fork and contribute any changes directly via GitHub.
Name | Version |
---|---|
Extension Version | 2.0.0 |
Last Update | 05/08/2021 |
Change List | ChangeLog |
Note: While extensions are maintained and supported by customers under the open-source licensing model, they interact with agents and Controllers that are subject to AppDynamics’ maintenance and support policy. Some extensions have been tested with AppDynamics 4.5.13+ artifacts, but you are strongly recommended against using versions that are no longer supported.
Owner
Contributors
Categories
Products
AppDynamicsProgramming Languages
JavaLicense
Code Exchange Community
Get help, share code, and collaborate with other developers in the Code Exchange community.View Community