cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Erin
AppDynamics Team (Retired)

Users can get a report of license usage by applications for each Controller.

  

Note: Disabled agents will not be returned by the query but will still consume licenses. However, this query will be in the ballpark of actual consumption. If you want to track historical usage by application, you need to restrict one application to one license rule under Controller Settings (gear icon ) > License > Rules -> Application Scope.

 

On-premises instructions

On-premises customers can extract application usage from their database by using the following steps:

  1. Login to the controller MySQL database located in <controller_home>/bin/controller.sh login-db.

  2. Execute the following query to get a list of all types of agents that have been reporting for the last five minutes.
SELECT a.name AccountName, agj.type AgentType,agj.agent_version AgentVersion, agj.app_and_tier ApplicationAndTier,agj.node_name NodeName FROM
(SELECT DISTINCT(node_id) AS node_id FROM metricdata_min WHERE ts_min > ((SELECT max(ts_min) FROM metricdata_min) - 5) ) mdm,
(SELECT ag.type type, ag.agent_version agent_version, acn.name node_name,acn.last_known_tier_app_config AS app_and_tier, acnam.application_component_node_id node_id, ag.account_id account_id
FROM agent ag, application_component_node_agent_mapping acnam,application_component_node acn
WHERE acnam.agent_id = ag.id
AND acn.id=acnam.application_component_node_id
UNION DISTINCT
SELECT ag.type type, ag.agent_version agent_version,acn.name node_name,acn.last_known_tier_app_config AS app_and_tier, acn.id, ag.account_id
FROM agent ag, application_component_node acn, machine_instance_agent_mapping miam, machine_instance mi
WHERE
miam.machine_instance_id = mi.id AND miam.agent_id = ag.id AND acn.machine_instance_id = mi.id) agj,
account a
WHERE
mdm.node_id = agj.node_id AND a.id = agj.account_id
ORDER BY AccountName,AgentType,ApplicationAndTier,NodeName
  1. Change the (SELECT max(ts_min) FROM metricdata_min) - 5) clause to determine the time range.

 

SaaS instructions 

For SaaS customers, application usage is not available currently. Account-level usage information can be found by clicking on the "gear" menu in the top right side of the controller UI, then clicking on License in the drop-down menu. Below is the account usage.

 

usage-by-app

 

REST API for both SAAS and On-Premises customers:

  1. Create your own scripts using agent availability metric data API for last 5 min at node level. 

- 1 = license consumed

- 0 = no license consumed

  1. Reference the API document

 

Note: It is not currently possible to check the historical license consumption.

 

Related Links:

Comments
Jon.Faldmo
Maker

That query will give us the number of nodes per application. For .NET applications the number of nodes does not always equal the number of licenses used, correct?

Rugved.Sarode
AppDynamics Team
Version history
Last update:
‎10-11-2019 10:56 PM
Updated by: