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, 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.
Option A :
metricPrefix: "Server|Component:<Component_id>|Custom Metrics|Cassandra"
metricPrefix: "Custom Metrics|Cassandra"
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 metrics limit, 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 the Support Team
If you still face issues with custom metrics in the Controller, please open a ticket with the Support Team, 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.