With the Uptime Monitor, a request is sent to the enpoint at certain intervals during the start and end period given to see if it is up.

Actions can be defined if it resulted in an error when sending a request to the endpoint, or an error such as not fulfilling the expected validation criteria. Actions enable us to be aware of the process by using the data we receive in case of error.

In this content, the running time of the /findByStatus enpoint of the Petstore API Proxy existing in the same project will be monitored. Respectively; The processes of selecting the existing API Proxy, testing the enpoint, defining an action, creating a job scheduler and examining the details/logs of the job are explained.

Creating General Description of Working Time

 In the first step, the descriptive information of the job is entered. The most important field here is the ENABLED option. When this option is turned off, the job is suspended from running.

Identification of the Request

There are many ways to create the request;

  • You can choose from the requests registered in the registration Test Console via the Select From Collection link.
  • Can create request information manually.
  • By clicking the request creation button, you can choose from API Proxy or API Proxy Group registered on the platform. Or, a request can be created by choosing one of the API Definition Document types and parsing a definition file.

Confirming the Request

If the request timeout, status code, response body, response body can be validated via XPath/JSONPath for a certain value. To manage these properties, go to the Assertions tab of the request.

If the verification process in these confirmations is met, the result of the transaction is considered as a failure.

Since the status code of the response is expected to be 200 on this example, the following validation criteria are applied to the request.

If there is a certificate to be sent in the request or if a timeout is to be added, go to the Settings tab.

Testing the Request

The request can be tested by pressing the Send button. The result of the test is displayed in the Response section.

Optionally, in the Retry section, settings are made for a retry request and the delay time between two requests when a failed response is received.

Action Description

When an error is received in this content, relevant action settings are made for sending e-mail.

The image below describes the action of sending an email with the result of the job regarding the time the error was received, the request address, and the error message.

Click to get information about the action types, the use of the action and the variables in the task.

Result of Action

When the action works incorrectly, e-mail recipients encounter the content in the image below.

Creating a Job Scheduler

The defined job can be run manually or triggered via the cron definition.

Since the job description in this content is set to run at 1-hour intervals, the following information is visible.

A log record is created every time a job runs. According to the retention value, these log records continue to be kept in the database.

Examining the Details of the Job

If an error is received, it may be necessary to find the reason for it, or if it is desired to examine the general log records of the process and make filtering on them, the detail page of the monitor record should be visited.

Detailed information can be obtained by clicking the detail icon in the relevant log record.