# Monitoring\_Test\_Script

### Monitoring created Test Scripts:

After saving your Monitored API on the form page, you can commence the monitoring process for your API.

***

### Contents

* [Start Monitoring.](#start-monitoring)
* [Metrics.](#metrics)
* [Stop Monitoring.](#stop-monitoring)

***

#### Start Monitoring:

Initiating monitoring for your API can be done by clicking the **Play** button. Once monitoring is active, the **Play** button transforms into a **Stop** button, and the **offline** icon is replaced with either a thumbs-up or a thumbs-down symbol, depending on whether the returned status code matches the expected status code. Additionally, a message will appear to inform the user that monitoring is in progress.

![Start Monitoring](/files/yGY27ensGpUKqvS3JocO)

***

#### Metrics:

The status icon will display either a thumbs-up or thumbs-down to indicate whether the monitored API is returning the expected status code.

![Thumbs Up](/files/K1kYphyw5zPX7L2KdyZc)

![Thumbs Down](/files/mmvKWonVJknjZPiYrXJh)

The status column will show an **Offline Cloud** Icon if the API is not under monitoring.

![Offine](/files/cLcF8nyZ4UgQJYaDuiXO)

To access metrics regarding your monitored API, simply click on the **Bar Graph** icon.

![Metric](/files/13K7eILEx5yAbk3ZnvYW)

You will be listed with all matrics related to respective Script. As listed below:

* [Status Codes.](#status-codes)
* [Performance Index.](#performance-index)
* [Response Time Metrics.](#response-time-metrics)
* [Graph.](#graph)
* [Violations.](#violations)

#### Status Codes:

A status code in an API is a three-digit numerical code returned by the server to indicate the outcome of a client's request, such as success, error, or redirection.

![Status Code](/files/gTLZU9pb4z0HBuHscPyU)

* **Current Status Code:** Represents the status code of your API during the most recent call.
* **Previous Status Code:** Reflects the status code of your API before the last call.

Adjacent to each status code, a thumbs-up or thumbs-down symbol indicates whether the monitored API is returning the expected status code when it's under monitoring. Otherwise, an offline cloud icon signifies that it is not being monitored.

#### Performance Index:

The Performance Index in API monitoring is a metric that assesses the overall performance and reliability of an API by considering various factors such as response times, error rates, and availability.

![Performance Index](/files/WAdn0bJXHNuAesZhBOBv)

* **Success Count:** The count of instances where the monitored API delivered the anticipated status code.
* **Fail Count:** The count of instances where the monitored API did not produce the expected status code.
* **Total Number of Runs:** The overall count of times the monitored API was invoked.
* **Apdex:** The ratio of successful runs to the total number of runs (Success Count/Total Number of Runs).

#### Response Time Metrics:

Response Time Metrics in API monitoring refer to measurements that track the time it takes for an API to respond to a request, providing insights into its performance and efficiency.

![Response Time Matrix](/files/X6UCU6MZ6vT31MO3ACzz)

* **Rolling Average Response Time (ms):** The mean response time across API calls
* **Last Response Time (ms):** Response time for the most recent API call
* **Shortest Response Time (ms):** Fastest completion time observed in monitored API requests
* **Longest Response Time (ms):** Longest completion time observed in monitored API requests"

#### Graph:

The graph displays both the Single and Average Response Time Thresholds, along with the Response Times of the ten most recent API calls.

![Graph](/files/8wKodx556iAkJ98fK2Ma)

#### Violations:

Violations in API monitoring refer to instances when the monitored API fails to meet specified performance or behavior criteria, such as response time or status code.

![Violations](/files/mYAo02JqOKUWxg7sITkO)

* **Violations for Average Response Time:** Indicates how frequently the rolling average response time surpasses the defined threshold for average response time.
* **Violations for Response Time:** Indicates the frequency of instances when the response time of an API call exceeds the specified threshold for a single response time.

***

#### Stop Monitoring:

To conclude monitoring for the API, simply click the **Stop** button. You will receive a message confirming the cessation of API monitoring. The **Stop** button will revert to **Play**, and the thumbs-up or thumbs-down icon will transition back to the **offline** status.

![Stop Monitoring](/files/7lhxYPe3UEiWvQlGnzc6)

### [Overview](/api-monitoring/readme.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.qyrus.com/api-monitoring/monitoring/monitoring_test_script.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
