AppDynamics Extension for URL Monitoring

An AppDynamics Machine Agent extension to visit a set of URLs and report whether they are up or down (and optionally whether certain text patterns appear on those pages).


  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.


1. Download and unzip UrlMonitor-<version>.zip into $MACHINE_AGENT_HOME/monitors. This will create a new directory called UrlMonitor.
2. Copy UrlMonitor directory where you installed the machine agent, under $AGENT_HOME/monitors.
3. In $AGENT_HOME/monitors/UrlMonitor, edit the configuration files (monitor.xml and config.yml) to configure the plugin.


Every AppDynamics extension has amonitor.xmlfile that configures the extension. In this case, themonitor.xmlfor this extension just has a single option: the path where the extension can find the mainconfig.ymlfile. Note that the path is relative to$AGENT_HOME.

      <argument name="config-file" is-required="true" default-value="monitors/UrlMonitor/config.yml" />


The main configuration for this extension then lives in a file called config.yml. It uses a simple syntax that anyone can edit with a simple text editor. Note: Please avoid using tab (\t) when editing yaml files. You may want to validate the yaml file using a yaml validator. 

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.

Here's a sample:

    maxConnTotal:             1000
    maxConnPerRoute:       1000
    maxRedirects:               10
    ignoreSslErrors:          true
    userAgent:                Mozilla/5.0 AppDynamics-UrlMonitor/2.0.0

    method:                   GET
    socketTimeout:            30000
    connectTimeout:           30000
    numAttempts:              3
    treatAuthFailedAsError:   true

#Sites that need to be monitored

     #No authentication, with a pattern to match
   - name:     Google
     followRedirects: false
     groupName: MySites
     # Patterns to be matched, multiple patterns(to be matched) can be configured for a given site
     - name: LuckyButton
       type: caseInsensitiveSubstring
       pattern: Google

   - name:     AppDynamics
     authType: BASIC

   - name:     File Download

    # Basic Authentication with password encryption
   - name:       My Controller
     username:   demouser@customer1
     password:   welcome
     encryptedPassword: "IGVtC9eudmgG8RDjmRjGPQ=="
     authType: BASIC

     #NTLM Auth Sample Configuration
   - name:     My Controller
     url:      http://localhost:8090/controller
     username: user@DOMAIN
     password: password
     authType: NTLM
     connectTimeout: 60000

     # Client Cert Auth Sample Configuration
   - name:         LocalHost
     url:          https://localhost:8443
     password:     password
     authType:     SSL
     keyStoreType: SUNX509
     keyStorePath: /Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/bin/client.jks
     keyStorePassword: password
     trustStorePath: /Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/bin/client.jks
     trustStorePassword: password

     #POST request sample configuration
   - name:     My POST site
     url:      http://localhost:8293/api/v1/metrics
     connectTimeout: 60000
     method:   POST
           Content-Type: application/json
     requestPayloadFile: src/test/resources/conf/postrequestPayloadFile.json
       - name:       Error
         type:       substring
         pattern:    Error 400

     #Proxy Configuration
   - name:     Google
     groupName: MySites
       host: ""
       port: ""
       username: ""
       password: ""

#prefix used to show up metrics in AppDynamics. This will create it in specific Tier. Replace
metricPrefix: Server|Component:|Custom Metrics|URLMonitor|
#This will create this metric in all the tiers, under this path
#metricPrefix: Custom Metrics|URLMonitor|

Restart the Machine Agent after configuring config.yml as mentioned above.


Increase the timeout threshold for a site that is often slow:

- name:             My Slow Site
  connectTimeout:   60000

Supply a username and password for HTTP Basic authentication:

- name:            My Login Page
  url:             http://localhost:8090/controller/rest/applications
  authtype:        BASIC
  username:        demouser@customer1
  password:        welcome

Retrieve the Google home page and make sure the "I'm Feeling Lucky" button is visible:

- name:           Google
    - name:       LuckyButton
      type:       substring
      pattern:    I'm Feeling Lucky

Retrieve the Google home page and count how many times the word "Mail" appears:

- name:           Google
    - name:       MailCount
      type:       word
      pattern:    Mail

POST xml or json payload to any url and search for the patterns in the response

 - name:     My POST site
    url:      http://myposturl
    method:   POST
          Content-Type: application/json
    requestPayloadFile: path/to/postrequestPayloadFile.json
        - name:       Error
          type:       substring
          pattern:    Error 400

Configuration Reference

Client Section

The clientConfig section sets options for the HTTP client library, including:

Option NameDefault ValueOption Description
maxConnTotal1000Maximum number of simultaneous HTTP connections
maxConnPerRoute1000Maximum number of simultaneous HTTP connections to a single host
threadCount10Maximum number of Threads spawned to cater HTTP request
ignoreSSlErrorsfalseWhether to ignore errors in SSL certificate validation or host validation
userAgentMozilla/5.0 (compatible; AppDynamics UrlMonitor; User-Agent header to send with requests (can be used to mimic desktop or mobile browsers)
followRedirectstrueWhether the client should follow Redirect responses
maxRedirects10Maximum redirects
Default Params Section

The defaultParams section sets the default options for all sites. These options can then be overriden at the individual site level.

Option NameDefault ValueOption Description
methodGETHTTP method to use (e.g. GET, POST, HEAD, OPTIONS, etc.).
socketTimeout30000Maximum time to wait for a socket connection to open, in milliseconds
connectTimeout30000Maximum time to wait for the HTTP handshake, in milliseconds
numAttempts1Number of times the site will be retrieved. The metrics then reported will be an average over all attempts.
treatAuthFailedAsErrortrueIf false, the extension will report the site status as "SUCCESS" even if authentication fails.
Site Section
Option NameDefault ValueMandatoryOption Description
namenoneyesName of the url with which metric folder that will be created in Metric Browser
urlnoneyesThe url to monitor
groupNamenonenoThe group under which site needs to be categorised
authTypenonenotype of authentication, supported auth are Basic, NTLM, Client Cert
matchPatternsnonenoMatches the specified patterns in the URL response , and reports the total number of matches count as metric
proxyConfignullnoSpecify the host and port of the proxy
headersnonenoComponent of request header section, e.g.: Content-Type
requestPayloadFilenonenoPayload file(XML or JSON) to upload to URL
ProxyConfig section
Option NameDefault ValueMandatoryOption Description
hostnoneYes(if proxy config specified)proxy host
portnoneYes(if proxy config specified)proxy port
usernamenoneYes(if proxy config specified)proxy username
passwordnoneYes(if proxy config specified)proxy password
Auth Type
Option NameDefault ValueMandatoryOption Description
authTypenoneYes(if authType is specified))Name of the authentication type: BASIC, NTLM, ClientCert
usernamenullYes(if authType is specified))username
passwordnullYes(if authType is specified))password
encryptedPasswordnonenoencrypted password if using password encryption
encryptionKeynonenothe key used to encrypt the password
keyStoreTypenonenokeyStoreType, used only in Client Cert Auth
keyStorePathnonenopath to keyStore file, used only in Client Cert Auth
keyStorePasswordnonenokeyStorePassword, used only in Client Cert Auth
trustStorePathnonenopath to trustStore file, used only in Client Cert Auth
trustStorePasswordnonenotrustStorePassword, used only in Client Cert Auth
usePreemptiveAuthfalsenotrue if preemptive authentication is required
Match Pattern Section
Option NameDefault ValueMandatoryOption Description
namenoneYes(if MatchPattern specified)Name of the metric folder that will be created in Metric Browser
patternnoneYes(if MatchPattern specified)The string to search for
typesubstringYes(if MatchPattern specified)Can be one of: substring, caseInsensitiveSubstring, regex, or word (see below)


The options for the pattern type are:

substringExact match on the given string
caseInsensitiveSubstringCase-insensitive match on the given string
regexRegular expression match
wordCase-insensitive, but the target string must be surrounded by non-word characters

Metrics for match pattern appears under the following path:
Site->Pattern Matches -> Name of MatchPattern(As specified in config.yml) -> Count

Metrics Provided

In the AppDynamics Metric Browser, URL Monitor's metrics can be seen at: Application Infrastructure Performance | Tier-ID | Custom Metrics | URL Monitor   Following metrics are reported for each site:

  • Average Response time (ms) -> The time after the request is sent until the first byte is received back.
  • First Byte Time (ms) -> Time taken from the time the request build has started to receive the first response byte.
  • Download Time (ms) -> Total time taken to receive the entire response from the URL.
  • Response Bytes -> It represents the length of the response returned from the URL.
  • Response Code -> It represents the HTTP status code returned from the URL.
  • Status -> It represents whether the URL is FAILED(2), ERROR(3) or SUCCESS(4). Possible values are: UNKNOWN(0), FAILED(2), ERROR(3), SUCCESS(4)
  • Responsive Count(Available at GroupName Level) -> Number of sites in a given group, that responded successfully.
  • Monitored Sites Count -> Number of URLs being monitored.

Credentials Encryption

Please visit this page to get detailed instructions on password encryption. The steps in this document will guide you through the whole process.

Extensions Workbench

Workbench is an inbuilt feature provided with each extension in order to assist you to fine tune the extension setup before you actually deploy it on the controller. Please review the following document on How to use the Extensions WorkBench


  1. Please look at the troubleshooting document and make sure that everything is followed correctly.
  2. The Yml file argument is null error.
  3. This usually happens when on a windows machine in monitor.xml you give config.yml file path with linux file path separator /. Use Windows file path separator \ e.g. monitors\URLMonitor\config.yml. For Windows, please specify the complete path.
Support Tickets

If after going through the Troubleshooting Document you have not been able to get your extension working, please file a ticket and add the following information in order so that we can assist you better and faster.

Please provide the following in order for us to assist you better.

  1. Stop the running machine agent .
  2. Delete all existing logs under <MachineAgent>/logs.
  3. Please enable debug logging by editing the file <MachineAgent>/conf/logging/log4j.xml. Change the level value of the following <logger> elements to debug.
    • <logger name="com.singularity">
    • <logger name="com.appdynamics">
  4. Start the machine agent and please let it run for 10 mins. Then zip and upload all the logs in the directory <MachineAgent>/logs/*.
  5. Attach the zipped <MachineAgent>/conf/* directory here.
  6. Attach the zipped <MachineAgent>/monitors/ExtensionFolderYouAreHavingIssuesWith directory here .

For any support related questions, you can also contact


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


Find out more in the Community




Controller Compatibility:

4.5 or later

Machine Agent Compatibility:


Last Update:


List of changes to this extension can be found here

Release Notes

v2.1.0 - Updated to work with MachineAgent 21.x