# Setup Monitoring

Monitoring in PerfAgents is the practice of performing continuous, low-volume checks on your application's endpoints and user flows from various global locations. Unlike load testing, which is run on demand to test scalability, monitoring runs on a schedule to sustain reliability and detect issues like downtime, performance degradation, or certificate expiry in real-time.&#x20;

### Understanding Types of Monitoring&#x20;

PerfAgents supports three distinct types of synthetic monitoring, allowing you to cover everything from basic availability to complex user interactions:&#x20;

<table><thead><tr><th width="106.79510498046875">Type</th><th width="341.6666259765625">Purpose</th><th>Focus</th></tr></thead><tbody><tr><td>Website </td><td>Checks the availability and performance of a single URL. </td><td>Uptime, response time, SSL validity. </td></tr><tr><td>REST API </td><td>Checks the performance and correctness of API endpoints. </td><td>API response, data validation (assertions), multi-step chaining. </td></tr><tr><td>Sequence </td><td>Simulates multi-step user flows (e.g., login, search, checkout). </td><td>End-to-end user experience validation. </td></tr></tbody></table>

### Create Your First Monitoring (Website)&#x20;

{% embed url="<https://youtu.be/vSIUQmh53mE>" %}

This guide walks you through setting up a basic Website monitor, which is ideal for tracking the uptime and performance of a single URL.&#x20;

Navigate to: Monitoring → Create Monitoring&#x20;

The setup is a 4-step guided flow:&#x20;

#### Step 1: Type Selection&#x20;

Select Website as the monitoring type.&#x20;

#### Step 2: Configurations&#x20;

1. **Monitoring Name:** Provide a descriptive name (e.g., Homepage Uptime Monitor).&#x20;
2. **Tags (Optional):** Add metadata for filtering (e.g., production, critical).&#x20;
3. **Endpoint Configuration:**&#x20;
   1. **Method:** GET is selected by default for Website Monitoring.&#x20;
   2. **URL:** Enter the target endpoint (e.g., <https://example.com).&#x20>;
4. **SSL Certificate Monitoring (Optional):** Enable this to monitor SSL expiration and trigger alerts before the certificate expires.&#x20;
5. **Advanced Configuration:** Use the tabs for Params, Authorization (Basic Auth, Bearer Token), and Headers if required.&#x20;

#### Step 3: Frequency&#x20;

Define how often the monitor runs (e.g., Every 1 minute, Every 5 minutes). Higher frequency allows for faster issue detection.&#x20;

#### Step 4: Alerts & Notifications&#x20;

**Use Global Alert Rules:** Enable this to apply organization-level alert settings.&#x20;

**Integrations:** Configure where alerts should be sent. Available integrations include Email, AWS SNS, Jira, Linear, Microsoft Teams, PagerDuty, Slack, Splunk, and Webhook.&#x20;

#### Final Step: Create Monitor&#x20;

Click Create. Your monitor will now execute automatically at the defined intervals, log response data, and trigger alerts when thresholds are breached.&#x20;

### Create Your First Monitoring (REST API)&#x20;

{% embed url="<https://youtu.be/p96E7tfu_xs>" %}

REST API Monitoring allows you to continuously validate the availability, performance, and correctness of your APIs. It ensures endpoints respond as expected and meet defined response criteria.&#x20;

#### Step 1: Type Selection&#x20;

Select REST API - Monitor APIs as the monitoring type. This option is used to test single or multi-step API endpoints.&#x20;

#### Step 2: Configurations&#x20;

1. **Basic Details:** Provide the Monitoring Name and optional Tags.&#x20;
2. **Endpoints Configuration:** Each API monitor can include one or more endpoints.&#x20;
   1. **Endpoint Settings:** Define the HTTP Method (GET, POST, PUT, etc.), Protocol (HTTP/HTTPS), and the URL.&#x20;
   2. **Multi-Step Toggle:** Enable this to chain API calls, allowing you to pass data (e.g., tokens) between steps.&#x20;
3. **Request Configuration Tabs:** Each endpoint supports detailed configuration:&#x20;
4. **Params:** Add Query Parameters (Key–Value pairs).&#x20;
5. **Body:** Define the request payload (for POST/PUT methods).&#x20;
6. **Authorization:** Supports authentication types such as API Keys, Bearer Tokens, and Basic Auth.&#x20;
7. **Headers:** Add custom request headers.&#x20;
8. **Assertions:** Define validation rules such as Status code checks, Response body validation, JSON path assertions, and Response time thresholds.&#x20;

#### Step 3 & 4: Frequency and Alerts&#x20;

These steps are identical to the Website Monitoring setup, allowing you to define the monitoring interval and configure your Alerts & Notifications via integrations like Slack, Jira, and Email.&#x20;

### Create Your First Monitoring (Sequence)&#x20;

{% embed url="<https://youtu.be/7ZTfmODEEQk>" %}

Sequence Monitoring is designed for browser-based user journey monitoring. It simulates real user flows across multiple pages or actions, making it ideal for validating critical workflows like login, checkout, or form submissions.&#x20;

#### Step 1: Type Selection&#x20;

Select Sequence Monitor Browser Flows as the monitoring type.&#x20;

#### Step 2: Configurations&#x20;

1. **Basic Details:** Provide the Monitoring Name and optional Tags.&#x20;
2. **Select Framework:** Choose the automation framework used to execute the sequence: Playwright, Selenium, Puppeteer, or Cypress.&#x20;
3. **Script Options:** \
   Configure your script as follows:&#x20;
   1. Import Script: Upload your existing test scripts.&#x20;
   2. Generate with AI (Beta): Auto-generate script logic.&#x20;
   3. Create Script: Manually create a new test script.&#x20;
   4. You can also upload Dependencies and required supporting files.&#x20;
4. Device Configuration:  \
   Simulate the monitoring environment:&#x20;
   1. **Browser Type:** Choose between Chromium or WebKit.&#x20;
   2. **Device Resolution**: Set the resolution (e.g., 1920 × 1080) to ensure consistent UI validation.&#x20;

#### Step 3 & 4: Frequency and Alerts&#x20;

These steps are identical to the other monitoring types. Alerts can trigger Script failure, Assertion failure, Timeout, or Performance threshold breach.&#x20;
