AppDynamics Monitoring Extension for use with F5

F5 Monitoring Extension

Use Case

The F5 load balancer from F5 Networks, Inc. directs traffic away from servers that are overloaded or down to other servers that can handle the load. The F5 load balancer extension collects key performance metrics from an F5 load balancer and presents them in the AppDynamics Metric Browser.


  1. Before the extension is installed, the prerequisites mentioned here need to be met. Please do not proceed with the extension installation if the specified prerequisites are not met.
  2. The extension collects the data from the REST API. Please make sure that the API is available and accessible. To access F5 REST API, user account must have admin level access. Try this URL from the Browser https://f5-host:f5-port/mgmt/tm/ltm/pool/stats
  3. Start the Machine Agent without the extension and make sure that it is reporting the data fine.


  1. Download and Unzip the attachment into MachineAgent/monitors directory
  2. Edit the file MachineAgent/monitors/F5Monitor/config.yml and update the following. Yaml is very strict with the syntax, please make sure that you validate your YML here
    1. The metricPrefix of the extension has to be configured as specified here. Please make sure that the right metricPrefix is chosen based on your machine agent deployment, otherwise this could lead to metrics not being visible in the controller.
    2. Server Details
        - uri: "https://server1:8443"
          name: "Server1"
          username: "user"
          password: "password"
        - uri: "https://server2:443"
          name: "server2"
          username: "user"
          passwordEncrypted: "y444543gt3="

      If passwordEncrypted is used, make sure to update the encryptionKey in config.yml

    3. Filters

      By default, everything is included as shown in the filters with the .* regex. This will report a lot of data. Set the correct filters to make sure that you only collect the data you will need

          includes: [".*"]
          includes: [".*"]
          includes: [".*"]
      Please refer to the config.yml for the complete configuration.

Token Based Authentication (BIG IP 12+)

Token-based authentication can be used in BIG IP v12+. Please refer to F5 documentation for more details. To enabled token based auth, please modify the config.yml as shown

  - uri: "https://server1:8443"
    name: "Server1"
    username: "user"
    password: "password"
    authType: "TOKEN"
    loginReference: ""
  1. If you are using an external authentication provider, get the loginReference from your system administrator. It looks something like https://localhost/mgmt/cm/system/authn/providers/ldap/-id-/login
  2. If you are using local authentication (that is, there is no external authentication provider), then leave the loginReference blank

Using a Non Admin account (BI IP 11.6+)

This is applicable only for BIG IP versions 11.6+. To use a non-admin, you have to explicitly grant access to the rest interface. Please follow the steps.
  1. Create a user with guest role from the F5 Admin UI.
  2. Run the following command and get the selfLink of the guest user(created in step #1) from the response JSON
  3. curl -i -k -u <adminuser>:<pwd> https://f5-ip/mgmt/shared/authz/users
  4. Replace the link in the --data argument json with the value of selfLink from the response of step #2
  5. curl -i -k -u <adminuser>:<pwd> --request PATCH \
        --data '{"userReferences":[{"link":"https://localhost/mgmt/shared/authz/users/guestuser"}]}' \

This should give access to the user created in step #1 to invoke the rest api to invoke GET. If the guest role doesn't work, try "manager" role in step#1

Password Encryption Support

To avoid setting the clear text password in the config.yml, please follow the process to encrypt the password and set the encrypted password and the key in the config.yml

  1. Download the util jar to encrypt the password from here
  2. Encrypt password from the commandline
    java -cp "appd-exts-commons-1.1.2.jar" com.appdynamics.extensions.crypto.Encryptor myKey myPassword
  3. These values should be used in the passwordEncrypted and encryptionKey fields in config.yml


  1. Please look at the troubleshooting document and make sure that everything is followed correctly.
  2. config.yml: Validate the file here
  3. F5 REST API: Please make sure that the F5 REST API is available and accessible. Try this URL from the Browser https://f5-host:f5-port/mgmt/tm/ltm/pool/stats
  4. Metric Limit: Please start the machine agent with the argument -Dappdynamics.agent.maxMetrics=5000 if there is a metric limit reached error in the logs. If you dont see the expected metrics, this could be the cause.
  5. Check Logs: There could be some obvious errors in the machine agent logs. Please take a look.
  6. Collect Debug Logs: Edit the file, <MachineAgent>/conf/logging/log4j.xml and update the level of the appender com.appdynamics to debug Let it run for 5-10 minutes and attach the logs to a support ticket


Workbench is a feature by which you can preview the metrics before registering it with the controller. This is useful if you want to fine tune the configurations. Workbench is embedded into the extension jar.

To use the workbench
  1. Follow all the installation steps
  2. Start the workbench with the command
    java -jar /path/to/MachineAgent/monitors/F5Monitor/f5-monitoring-extension.jar
    This starts an http server at http://host:9090/. This can be accessed from the browser.
  3. If the server is not accessible from outside/browser, you can use the following end points to see the list of registered metrics and errors.
    #Get the stats
    curl http://localhost:9090/api/stats
    #Get the registered metrics
    curl http://localhost:9090/api/metric-paths
  4. You can make the changes to config.yml and validate it from the browser or the API
  5. Once the configuration is complete, you can kill the workbench and start the Machine Agent


The metrics will be reported under the tree Application Infrastructure Performance|$TIER|Custom Metrics|F5 Monitor|

Please refer to this screenshot to view the complete list of metrics reported by the F5 extension. These metrics can be filtered, please refer to the installation section for details.


Always feel free to fork and contribute any changes directly via GitHub.


For any questions or feature request, please contact AppDynamics Help.


Machine Agent Compatibility4.0+
Tested With F5 Version12.x
Last Update3/9/18


  • 2.0.0: Re-write with added metrics and configurations for monitoring inclusions and metric exclusions
  • 2.1.0: Added total pool member count and availability metrics
  • 2.2.1: Added capability to get metrics from all available partitions. Fixed issues with class loading which is causing CPU spike
  • 2.4.3: Using the REST API and advanced Filtering and Metric Support
  • 2.4.5: Preemptive Authentication Support
  • 2.4.7: Support for Token Authentication
  • 2.4.8: Updated Licenses