The following is an example of AnsibleĀ® role to install Apache Agent:

---
- hosts: all
  tasks:
    - name: Include variables for the controller settings
      include_vars: vars/controller.yaml

    - include_role:
        name: appdynamics.agents.apache
      vars:
        agent_version: 22.12.1
        # possible value:
        #          - latest: Latest version
        #          - 22.12.1: Any Specific version number
        agent_type: apache
        agent_action: upgrade
        # possible value:
        #          - upgrade: upgrade currently installed agent to agent_version
        #          - install: install agent_version
        #          - rollback: rollback to previous backup if any
        #          - uninstall: uninstall and clean up everything

        # Apache specific Args
        #apache_conf_path:
        # possible value:
        #          - /etc/httpd/conf/httpd.conf #default path in case of RedHat
        #          - /etc/apache2/apache2.conf  #Default path in case of Debian
        #          - #any custom path where the conf file is located.
YML


Apache Agent Variables

The following variables are applicable to the appdynamics_agent.conf file. For more information, see Configure the Apache Agent.

VariableDescription
appdynamics_enabledSet to ON to enable web server monitoring
appdynamics_proxy_hostProxy server hostname or IP address
appdynamics_proxy_portProxy server port
appdynamics_launch_proxyWhen set to ON, the agent launches the proxy automatically when on startup. If OFF, you must launch the proxy.
appdynamics_resolve_backendsControls the way Apache module backends appear in the Controller UI.
appdynamics_trace_as_errorIf ON, tracepoints are written as errors to the Apache logs, by default error_log.
appdynamics_report_all_instrumented_modulesIf OFF, the agent reports only modules that occur during the HANDLER stage of Apache request processing.
appdynamics_backend_name_segmentsThe number of URL segments that are displayed in the backend naming.
appdynamics_proxy_comm_dirPath to the directory containing the domain control socket which the agent uses to start an AppDynamics node. The default value is <agent_install_directory>/logs/appd-sdk.
appdynamics_request_cache_cleanup_intervalTimeout in milliseconds after which the request cache is cleaned up by Java proxy.
appdynamics_mask_cookieSpecify if filtering is enabled or not. Set it ON for cookie filtering to be enabled. The default value is OFF.
appdynamics_mask_cookie_patternSpecify the pattern that when matched, filters the value of that cookie.
appdynamics_mask_sm_userSpecify if filtering is enabled or not. Set it ON for sm_user filtering to be enabled. The default value is OFF.
appdynamics_delimiterSpecify the character that you want to use as URL segment endpoints.
appdynamics_segmentSpecify a comma-separated list to indicate the segments that you want the agent to filter
appdynamics_match_filterThe type of filter to be used to match the URL amongst the following: NOT_EMPTY
appdynamics_match_patternSpecify the string that you want to be filtered with the match-filter
custom_agent_config_pathSpecify the absolute path to the agent configuration file for future upgrades. Make sure that you add the agent configuration file path to the apache.conf file.


AnsibleĀ® is a registered trademark of Red Hat, Inc. in the United States and other countries.