# Getting started

Monitoring is a part of Performance module that allows tracking health status of any node RPC and Indexing. If you need a support for any custom API - please, [contact us](https://chain.love/contact-us).

To setup a monitoring, you would need to:

{% stepper %}
{% step %}

### Setup project

As described in the [quickstart](https://chain-love.gitbook.io/chain.loves-performance/readme).
{% endstep %}

{% step %}

### Go to "Performance Monitoring" tab

<figure><img src="https://3120590109-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzHukEzyKtop3oVU5Uj2y%2Fuploads%2FalwU0KJYQ8hgT2tO5NT2%2Fimage.png?alt=media&#x26;token=79f8c700-ad21-4e43-a7fb-e6121340a78e" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Click "Edit" on any of the configured providers

<figure><img src="https://3120590109-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzHukEzyKtop3oVU5Uj2y%2Fuploads%2FcM4hWdW9SJc4iSbOJNE8%2Fimage.png?alt=media&#x26;token=3e51ffa2-b456-4bf1-8b46-6c1019bcfeb8" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Configure the details

You may configure the following parameters:

#### **Monitoring interval**&#x20;

defines how often we should check for uptime health status. Please, note, that verification is performed by 3 independent validators, causing 3 requests issued within the defined monitoring interval. For example, if you have monitoring interval set to 1 minute (60 seconds) - that means that 3 validators will send 1 request each every 1 minute. So, during the day the API will be probed totally&#x20;

```matlab
3 validators * 60 mins * 24 hours = 4320 times
```

This is important if you are paying for each request to your API.

#### Thresholds

There are two evaluation thresholds: **block lag** and **time lag**. Not all chains have a fixed block time, yet many use cases require that API data is not delayed beyond a specific time window. On each evaluation, the **stricter (lower) of the two thresholds** is applied.

**Example**

Assume network X has a variable block time between 15 and 30 seconds.\
Business Y defines the following limits:

* maximum lag of **3 blocks**
* maximum lag of **1 minute**

During evaluation, our validators detect that the API is **3 blocks behind** the current chain head (determined by comparison with multiple other providers). However, the latest block served by this API was produced **1 minute 21 seconds ago**.\
The validator reports downtime: although the block lag is within limits, the **time threshold is exceeded**.

The reverse case applies as well. If **4 blocks** are produced within **exactly 1 minute**, the time threshold is not breached, but the validator still reports downtime because the **block threshold (4 > 3)** is exceeded.
{% endstep %}

{% step %}

### Pay for the performance monitoring activation

Proceed to Stripe to finalize the subscribtion
{% endstep %}

{% step %}

### Setup [notifications](https://chain-love.gitbook.io/chain.loves-performance/monitoring/notifications) and/or [embed widget](https://chain-love.gitbook.io/chain.loves-performance/monitoring/embed-a-widget)

This will allow you to retrieve latest up to date information about health status of the monitored API.
{% endstep %}
{% endstepper %}
