This is a fork from appdynamics-cookbooks reduced to the Appdynamics machine and java agent with some fixes and configuration extends. It is fully productive used in a well known insurance company in Switzerland for Tomcat nodes.
Learn more about AppDynamics at:
- http://www.appdynamics.com/ (and check out the handsome devil next to the "Act" bubble in the photo)
- https://docs.appdynamics.com/display/PRO41/Getting+Started
- https://docs.appdynamics.com/display/PRO41/Install+and+Administer+Agents
- Chef >= 0.10.0
- unzip
These node attributes must be set to use the _agent
recipes:
node['appdynamics']['app_name']
- The name to register your application under with the AppDynamics controller.node['appdynamics']['tier_name']
- The name to register this tier of your application under with the AppDynamics controller.node['appdynamics']['node_name']
- The name to register this node of your application under with the AppDynamics controller. Default is thehost name
node['appdynamics']['unique_host_id_name']
- The name to register the unique host id name of your application under with the AppDynamics controller. Default is thehost name
node['appdynamics']['version']
- The version of AppDynamics to use. Agent version overrides this. The package URI will be composed with the versionnode['appdynamics']['controller']['host']
- The host your AppDynamics controller is running on (a domain name or IP address).node['appdynamics']['controller']['port']
- The port your AppDynamics controller is running on.node['appdynamics']['controller']['user']
- The account name to use with your AppDynamics controller.node['appdynamics']['controller']['accesskey']
- The access key for your account for accessing your AppDynamics controller.
Optional attributes:
node['appdynamics']['packages_site']
- The base URL of the AppDynamics packages site (defaults tohttps://packages.appdynamics.com
).node['appdynamics']['controller']['ssl']
- Flag indicating if SSL should be used to speak to the controller (true
) or not (false
). Defaults totrue
. SaaS controllers do not support the valuefalse
for this flag.
If your agents must use an HTTP proxy to communicate with the controller, set these attributes:
node['appdynamics']['http_proxy']['host']
- The hostname/IP of your HTTP proxy.node['appdynamics']['http_proxy']['port']
- The port of your HTTP proxy.node['appdynamics']['http_proxy']['user']
- If you must authenticate with your HTTP proxy, the user name to authenticate as.node['appdynamics']['http_proxy']['password_file']
- If you must authenticate with your HTTP proxy, the complete path to a file you will create on a machine using an AppDynamics agent that contains the password used for authenticating with your HTTP proxy.
The machine_agent
recipe has some additional attributes you may set:
node['appdynamics']['machine_agent']['version']
- The version of the AppDynamics package for the machine agentnode['appdynamics']['machine_agent']['source']
- Set complete URI of zip package to download from. Defaultnil
because it is composed by package_site, version, (machineagent-bundle-, arch, OS) AgentName and .zip suffix.node['appdynamics']['machine_agent']['use_bundled_package']
- Include machineagent-bundle-, arch and OS into source URInode['appdynamics']['machine_agent']['checksum']
- The sha256 checksum of the source packagenode['appdynamics']['machine_agent']['install_dir']
- Installation directory of the machine agent. Default/opt/appdynamics/machineagent
node['appdynamics']['machine_agent']['owner']
- User of the machine agent. Defaultroot
node['appdynamics']['machine_agent']['group']
- Group of the machine agent. Defaultroot
node['appdynamics']['machine_agent']['init_script']
- Path and name of the init script. Default/etc/init.d/appdynamics_machine_agent
node['appdynamics']['machine_agent']['pid_file']
- Path and name of the pid file. Default/var/run/appdynamics_machine_agent.pid
node['appdynamics']['machine_agent']['template']['cookbook']
- Name of the cookbook template folder for the controller-info-xml. Defaultappdynamics
node['appdynamics']['machine_agent']['template']['source']
- Location of the template file for the controller-info.xml . Defaultmachine/controller-info.xml.erb
node['appdynamics']['machine_agent']['init']['cookbook']
- Name of the cookbook template folder for the init script. Defaultappdynamics
node['appdynamics']['machine_agent']['init']['source']
- Location of the template file for the init script. Defaultmachine/init.d.erb
node['appdynamics']['machine_agent']['run_sh']['cookbook']
- Name of the cookbook template folder for the run.sh script. Defaultappdynamics
node['appdynamics']['machine_agent']['run_sh']['source']
- Location of the template file for the run.sh script. Defaultmachine/run.sh.erb
node['appdynamics']['machine_agent']['java']
- Path of the java binary. Default/usr/bin/java
node['appdynamics']['machine_agent']['java_params']
- System properties to pass to the JVM of the machine agent (space separated). DefaultXmx32m
-
node['appdynamics']['java_agent']['version']
- The version of the AppDynamics package for the java agent -
node['appdynamics']['java_agent']['source']
- Set complete URI of zip package to download from. Defaultnil
becaus e it is composed by package_site, /java/, version, AppServerAgent-, (ibm-), version and .zip suffix. -
node['appdynamics']['java_agent']['ibm_jvm']
- Include "ibm-" between AppServerAgent- and version.zip in the composed package URI. Defaultfalse
-
node['appdynamics']['java_agent']['checksum']
- The sha256 checksum of the source package -
node['appdynamics']['java_agent']['install_dir']
- Installation directory of the java agent. The package contains the root folder "javaagent". Default/opt/appdynamics
-
node['appdynamics']['java_agent']['owner']
- User of the java agent. To avoid permission problem, set the same user as your JVM is running (tomcat, jboss, etc) . Defaultroot
-
node['appdynamics']['java_agent']['group']
- Group of the java agent. Defaultroot
-
node['appdynamics']['java_agent']['template']['cookbook']
- Name of the cookbook template folder for the controller-info-xml. This is normally not needed as you pass java agent settings through system properties of your JVM. Defaultappdynamics
-
node['appdynamics']['java_agent']['template']['source']
- Location of the template file for the controller-info.xml. his is normally not needed as you pass java agent settings through system properties of your JVM. Defaultmachine/controller-info.xml.erb
-
node['appdynamics']['java_agent']['zip']
- The file name of the package to be saved on the file system. Default#{Chef::Config[:file_cache_path]}/AppDynamicsJavaAgent.zip
Step 1. Define attributes.
default_attributes (
'appdynamics' => {
'machine_agent' => {
'version: => '4.5.7.1975'
},
'java_agent' => {
'version' => '4.5.6.24621',
'owner' => 'tomcat',
'group' => 'tomcat'
},
'app_name' => 'my app',
'tier_name' => 'frontend',
'node_name' => node.name,
'unique_host_id_name' => node.name,
'controller' => {
'host' => 'my-controller',
'port' => '8081',
'ssl' => false,
'user' => 'someuser',
'accesskey' => 'supersecret',
}
}
)
Step 2. Add recipe[appdynamics::machine_agent]
and/or recipe[appdynamics:java_agent]
to your run list.
- chef - Chef Software, Inc
Please read CONTRIBUTING for details on our code of conduct, and the process for submitting pull requests to us.
We use SemVer for versioning. For the versions available, see the tags on this repository.
- Roland Hansmann - Initial work - Roland Hansmann
See also the list of contributors who participated in this project.
This project is licensed under the GNU Affero General Public License v3.0 License - see the LICENSE file for details