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. Do not place the extension in the extensions directory.
Once you have everything configured correctly, start the Machine Agent and go to your Controller.
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 an association problem and that should be rectified first. See below to further troubleshoot this issue.
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.
The 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 the 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 directory 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. So, in this case, the application name, tier name, and node name set in Machine Agent will be ignored.
Every extension is shipped with a field called
metricPrefix in the config.yaml file. There are two possible formats for this.
For example, in case of Cassandra Monitoring Extension, the metric prefix could be
metricPrefix: "Server|Component:<Component_id>|Custom Metrics|Cassandra" for Controller versions 4.1.x and above.
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 Option A.
The Component_id or Component_name that you have to add in the metric prefix is the same as the tier ID.
To navigate to this information, follow these steps:
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 metric prefix 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.
Use a linter by copying the contents of the config.yml file and paste them in http://www.yamllint.com/ .
You should see the following:
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.
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 Agents 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
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 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 and mention whether or not 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 debug.
Start the Machine Agent and let it run for 10 mins. Then zip and upload the all the logs in the directory