This page describes how to configure an API monitoring job.
You can configure these details for an API monitoring job:
- Schedule when, where, and how often a job runs
- Set timeouts
- Set performance thresholds to trigger warning and critical events
- On the Controller UI, click User Experience > API Monitoring.
- Click Add Collection and specify a collection name.
- Click Add.
- Select the newly created collection and add a job.
A new job configuration page appears; proceed with the following steps:
Specify a name for the API job, and then create a JavaScript for your job and enter it in the Script Editor.
For sample JavaScripts for API Monitoring, see JavaScript.
You can select one or more locations in which the job runs. You can configure the job to test all of the locations every time or one location each time the job runs. For a complete list of Synthetic Agent locations, see Synthetic Agent Locations.
Use the hosted agents to monitor public API endpoints. You can use hosted agents to monitor the API jobs from locations where the real API traffic or request is generated.
Use the private agents to monitor the private APIs. For example, APIs used within a customer network.
The Hosted Agent Locations are where AppDynamics hosts public synthetic agents. AppDynamics has hosted agents in 17 locations (AWS locations only). You can execute the API monitoring jobs from these 17 hosted agent locations.
- If you have deployed an API Monitoring Private Synthetic Agent, you can choose from Hosted Agent Locations or Private Agent Locations.
The Private Agent Locations are where you host your private synthetic agents. You can set up private synthetic agents in any of these environments.
You can define the job schedule when you create or edit your job. You can configure API jobs to execute periodically from the configured locations. The minimum supported frequency is one minute.
You can configure jobs to execute in any timezone, on any day of the week, and between any dates. The job will run within the specified timezone. When you choose a timezone, the job schedule will not be affected by time changes in any other timezone, such as daylight saving time. The default timezone is GMT.
You can configure timeout to make the jobs fail if the time taken to execute the jobs exceeds a certain duration. By default, the API jobs timeout if the job execution does not complete within 5 minutes.
A job that fails because of timeout is considered an availability issue.
This is an optional step. You can configure performance thresholds that will trigger warning or critical synthetic events when the thresholds are exceeded.
API jobs failure irrespective of the reason, namely, invalid status code, response content validation, response size validation, and so on, are configured to be reported as an availability event by default. To avoid false positives, you can configure to re-test the jobs a specific number of times before triggering the events.
You can configure API jobs to trigger warning or critical error events based on the response time of the API jobs. To avoid false positives, you can configure to re-test the jobs a specific number of times before triggering the events.