Users who have installed an AppDynamics monitoring extension and are not able to see metrics in the controller should use the following guide to troubleshoot.
Note: The extension needs to be placed in the "monitors" directory of your Machine Agent installation directory. Please do not place the extension in the "extensions"directory of your Machine Agent installation directory.
Where to look for custom metrics from extensions?
Once you have everything configured correctly, start the Machine Agent and go to your controller.
If you have SIM Enabled, then you would have to select the Servers tab on the Top Menu Bar. Go to the metric browser there and follow the steps 3 to 7 from the aforementioned list.
If you are unable to see any metrics there or think you did not configure your extension correctly, please use the following steps to troubleshoot your issue.
1. Is the machine agent’s "availability" metric being reported?
The machine agent’s “availability” metric confirms that the machine agent is correctly configured with Controller. If the metric is not being reported, then it is a machine agent and Controller association problem and that should be rectified first. See below to further troubleshoot this issue.
2. Is SIM enabled?
If yes, the metrics would show up in the metric browser under the Servers tab.
If not, you are running the Machine Agent in a Standalone Mode.
3. Is there an AppDynamics Java Application Agent running on the same host?
Application Name”, “
Tier Name”, and “
Node Name” are not required if there is an
App Agent with a matching unique host. For more details about a unique host, see Unique Host ID.
In Standalone Mode, it is imperative to provide “
Application Name”, “
Tier Name”, and “
Node Name” to the Machine Agent. These can be provided as JVM arguments to the machine agent or can be specified in the “
controller-info.xml” file in the “conf” folder of the Machine Agent. For more info: Independent Standalone Machine Agent Install Scenario
In standalone mode, the custom metrics are reported in the metric browser under the specified application.
Even if the application-name, tier-name, and node-name are set and there is an app agent running with the same unique host ID but with a different tier information, the machine agent will report only to that same tier to which the app agent is associated to. So, in this case, the application-name, tier-name, and node-name set in machine agent will be ignored.
4. Is the correct component/tier information provided in the extension's config.yaml file?
Every extension is shipped with a field called
metricPrefix in the config.yaml. There are two possible formats for this. For example, in case of Cassandra Monitoring Extension, the
metricPrefix could be:
A. For Controller versions 4.1.x and above
metricPrefix: "Server|Component:<Component_id>|Custom Metrics|Cassandra"
B. For all other Controller versions:
metricPrefix: "Custom Metrics|Cassandra"
If you have SIM enabled, you should set the metric prefix as specified in
Option B. If machine agent is running in standalone mode, we should set it as specified in
5. Is the Correct Component_id or Component_name provided in the “Metric Prefix”?
The Component_id or Component_name that you have to add in the “
Metric Prefix” is the same as the “
Tier ID”. To go this information, follow these steps:
Tiercorresponding to your Machine Agent.
URLand find the word “
component” and the value corresponding to it.
Component_IDthat you need to update as your Component_ID value in your
Note: The component_id or component_name here is the same as the tier_id or tier_name. To get the component_id information, please check the URL as specified here:
IMPORTANT: The component id or component name specified in the "metricPrefix" of the extension should match the corresponding tier of the machine agent. The extension cannot report to a tier different than its machine agent's tier.
6. Is your config.yml file valid?
Please copy all the contents of the config.yml file and go to http://www.yamllint.com/ .
On reaching the website, paste the contents and press the “Go” button on the bottom left.
If you get an output similar to the following image, that means your formatting is correct and you may move on to the next step.
If not, please recheck your formatting in the config.yml file. Please note that yaml files do not use tabs and use only spaces. Please make sure your contents of the yaml file are valid as that is a key step for the extension to work.
7. Is the metric limit being exceeded in the machine agent?
The number of metrics sent by the machine agent is limited by the
-Dappdynamics.agent.maxMetrics JVM argument. Try increasing the limit and restarting the machine agent. More information on this here: Metrics Limits. Please note that you should not just set this number to an arbitrarily large number. It is a factor of how many metrics are produced by your installed extensions, heap memory provided to the machine agent etc. Please check the hardware and sizing requirements for machine agent and extensions here.
For example, to start your machine agent with an increased limit of metrics, please use the following command:
java -Dappdynamics.agent.maxMetrics=2500 -jar machineagent.jar
8. Is the extension working in Workbench mode?
Please note that some of our extensions ship with workbench mode. The purpose of workbench mode is to view metrics before they get registered in the controller. Using this mode you can filter the unwanted metrics and report only what is intended. Please check the corresponding extension documentation from here to see if workbench mode is supported.
9. Contact Support Team
If you still face issues with the custom metrics in the controller, please open a ticket with the Support Team and provide machine agent debug logs. Do mention whether you were able to see the metrics in Workbench Mode.
Machine Agent Debug logs:
<MachineAgent>/conf/logging/log4j.xml. Change the “level” value of the following <logger> elements to “
Start the machine agent and please let it run for 10 mins. Then zip and upload the all the logs in the directory