{"action":"created","issue":{"url":"https://api.github.com/repos/cloudfoundry/java-buildpack/issues/223","labels_url":"https://api.github.com/repos/cloudfoundry/java-buildpack/issues/223/labels{/name}","comments_url":"https://api.github.com/repos/cloudfoundry/java-buildpack/issues/223/comments","events_url":"https://api.github.com/repos/cloudfoundry/java-buildpack/issues/223/events","html_url":"https://github.com/cloudfoundry/java-buildpack/issues/223","id":103811948,"number":223,"title":"AppDynamics - Request to change default tiername","user":{"login":"nkatre","id":6249847,"avatar_url":"https://avatars.githubusercontent.com/u/6249847?v=3","gravatar_id":"","url":"https://api.github.com/users/nkatre","html_url":"https://github.com/nkatre","followers_url":"https://api.github.com/users/nkatre/followers","following_url":"https://api.github.com/users/nkatre/following{/other_user}","gists_url":"https://api.github.com/users/nkatre/gists{/gist_id}","starred_url":"https://api.github.com/users/nkatre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nkatre/subscriptions","organizations_url":"https://api.github.com/users/nkatre/orgs","repos_url":"https://api.github.com/users/nkatre/repos","events_url":"https://api.github.com/users/nkatre/events{/privacy}","received_events_url":"https://api.github.com/users/nkatre/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-08-28T23:28:45Z","updated_at":"2015-09-01T21:19:23Z","closed_at":null,"body":"Hello,\r\n\r\nThe following are the changes, if incorporated would be helpful to effectively understand AppDynamics configuration wrt PCF\r\n\r\n**Change in default tier name**\r\n The default tier name currently specified [here](https://github.com/cloudfoundry/java-buildpack/blob/master/config/app_dynamics_agent.yml) is  **CloudFoundry**, which should be changed to\r\n\r\n> default_tier_name: ! '$(expr \"$VCAP_APPLICATION\" : ''.\\*application_name[\": ]\\*\\([[:digit:]]\\*\\).\\*'')'\r\n\r\nThus, the application name in the PCF world would map to tier_name in the AppDynamics world, which should ideally be the case.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/cloudfoundry/java-buildpack/issues/comments/136864111","html_url":"https://github.com/cloudfoundry/java-buildpack/issues/223#issuecomment-136864111","issue_url":"https://api.github.com/repos/cloudfoundry/java-buildpack/issues/223","id":136864111,"user":{"login":"nkatre","id":6249847,"avatar_url":"https://avatars.githubusercontent.com/u/6249847?v=3","gravatar_id":"","url":"https://api.github.com/users/nkatre","html_url":"https://github.com/nkatre","followers_url":"https://api.github.com/users/nkatre/followers","following_url":"https://api.github.com/users/nkatre/following{/other_user}","gists_url":"https://api.github.com/users/nkatre/gists{/gist_id}","starred_url":"https://api.github.com/users/nkatre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nkatre/subscriptions","organizations_url":"https://api.github.com/users/nkatre/orgs","repos_url":"https://api.github.com/users/nkatre/repos","events_url":"https://api.github.com/users/nkatre/events{/privacy}","received_events_url":"https://api.github.com/users/nkatre/received_events","type":"User","site_admin":false},"created_at":"2015-09-01T21:19:22Z","updated_at":"2015-09-01T21:19:22Z","body":"Hi Ben,\r\n\r\nI apologize for the long description, but some details had to be mentioned.\r\n\r\nThe below are the details that we at AppDynamics are proposing. These changes are proposed keeping in mind, customers who use AppDynamics service on PCF through CUPS as well as through Service Broker Tile.\r\n\r\n> **Background on Service Broker AppDynamics Tile:**\r\n>  We have the AppDynamics service broker tile ready which provides configuration for the following parameters\r\n>  ![Config Parameters](http://postimg.org/image/hlmuolnad/)\r\n>  The configuration for `application, tier and node name` (all in context of AppDynamics) are not configured manually unlike in appdynamics cups service. Thus we propose to populate these parameters through the following changes\r\n \r\n 1. Application Name (in context of AppDynamics)\r\nFirst, we check if the value is specified in `credentials['application-name']`  [handles cups use-case]\r\nIf not, then secondly, we check if an env variable called `APPDYNAMICS_APP_NAME` is set using `cf set-env`  [handles cups as well as sb tile use case]\r\nIf not then thirdly, we simply map the application name (in context of ApppDynamics) to application name(in context of PCF) through VCAP_APPLICATION  [handles cups as well as sb tile use case]\r\n 2. Tier Name (in context of AppDynamics)\r\n First, we check if the value if specified in `credentials['tier-name']`  [handles cups use-case]\r\n If not, then we simply map the tier name (in context of ApppDynamics) to application name(in context of PCF) through VCAP_APPLICATION  [handles cups as well as sb tile use case]. This is useful in case of single-tier web applications as the tier and application (in context of AppDynamics) name will be same in the AppDynamics controller.\r\n 3. Node Name (in context of AppDynamics)\r\n First, we check if the value if specified in `credentials['node-name']`  [handles cups use-case]\r\n If not, we will map the node name (in context of ApppDynamics) to instance_index(in context of PCF) through VCAP_APPLICATION  [handles cups as well as sb tile use case]\r\n However, I am not able to capture the instance_index during the staging phase and it needs to be done dynamically.\r\n\r\nThe customized buildpack file with all the above mentioned changes is [here](https://github.com/Appdynamics/java-buildpack/blob/master/lib/java_buildpack/framework/app_dynamics_agent.rb)\r\nThe additions/changes made to the original buildpack file are indicated by `# CHANGE` tag inside the file. Please look for this tag to understand what changes have been done to the original buildpack file.\r\n\r\nI tried to populate the node_name using the default_node_name mentioned [here](https://github.com/Appdynamics/java-buildpack/blob/master/config/app_dynamics_agent.yml) but it didn't work. I reckon that there is some mistake in the syntax for evaluating the expression of default_node_name as seen in the last line of the image below.\r\n![image](http://postimg.org/image/h6h9yj7wp/)\r\n If this is not the problem, then how would I dynamically populate the node_name with instance_index.\r\n\r\nAlso, could you confirm whether the changes are relevant and would be integrated in the PCF Java buildpack ?"}}