> For the complete documentation index, see [llms.txt](https://docs.vega365.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.vega365.com/nidhi/management-client/failure-alerts.md).

# Failure Alerts

When something goes wrong on a recording server, Nidhi tells XProtect's **Event Server**. XProtect can then:

* Raise an **alarm in the Smart Client**.
* Run a **rule** that sends an e-mail or an SNMP trap.

Each alert is sent once when the problem starts. If you choose, it is sent once more when the problem is over.

To open it, click **⚙ Settings > Failure alerts...** on the [Recording Server Page](https://docs.vega365.com/nidhi/management-client/recording-server-page.md). Set it up on each recording server.

<figure><img src="https://1044727958-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOkTZH1L3AaRU2hwQk4Ve%2Fuploads%2Fgit-blob-da3ddf12dbc199c782f8fb6d42b9067328f8ce6d%2Fmc-alerts-kinds.png?alt=media" alt=""><figcaption></figcaption></figure>

## The Alerts

| Alert                                 | Sent when                                                                                                                                                                        |
| ------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Cloud down**                        | The cloud drive is not mounted, the cloud does not answer, or XProtect took its cloud archive offline.                                                                           |
| **Recording Server stopped**          | XProtect's Recording Server service on this machine is not running, so nothing is recorded.                                                                                      |
| **Disk almost full**                  | A disk with XProtect's storage, or the cloud drive's cache, is almost full (less than 10 GB or 3 % free).                                                                        |
| **Uploads stuck or failing**          | Nothing has uploaded for 30 minutes, or files keep failing for an hour.                                                                                                          |
| **Archive runs failing**              | The last 3 archive runs to the cloud failed, so footage stays on the recorder.                                                                                                   |
| **Expired footage left in the cloud** | 1 GB or more of footage stays in the cloud past its retention. See [Cloud Cleanup](https://docs.vega365.com/nidhi/management-client/recording-server-settings.md#cloud-cleanup). |
| **Nidhi service stopping**            | The Nidhi Recorder Service stops. This also happens on every restart or update.                                                                                                  |
| **Certificate ending**                | The certificate for encrypted connections to this recording server ends within 30 days, and no renewal is ready.                                                                 |
| **Failed jobs**                       | A size check failed, or the cloud drive could not start.                                                                                                                         |

Every alert except **Failed jobs** can also send **Back to normal** when it is over.

## Setting It Up

The wizard skips steps you don't need. For example, if you choose alarms and Nidhi can set XProtect up itself, it goes straight from **Event Server** to **Test**.

{% stepper %}
{% step %}

### XProtect

**How should XProtect tell people?** Choose one:

* **Alarms in the Smart Client.** Nidhi makes one alarm for each kind of alert, named for example *REC-04 — Nidhi: Cloud down*.
* **Rules — e-mail, SNMP and more.** You make your own rules on the events Nidhi creates. XProtect doesn't let Nidhi make rules, so the wizard shows you how.

<figure><img src="https://1044727958-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOkTZH1L3AaRU2hwQk4Ve%2Fuploads%2Fgit-blob-136a1f876e6b281ef100373f4b71f560834d7520%2Fmc-alerts-xprotect.png?alt=media" alt="Choosing alarms or rules"><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Alerts

Tick the alerts to send. For each, choose whether to also send **Back to normal**.
{% endstep %}

{% step %}

### Event Server

**Where XProtect's Event Server runs.** Enter its **Host name or IP address**. Then choose the generic event **data source** that receives Nidhi's alerts:

* **A data source XProtect already has**, for example *Compatible*. Nidhi allows this recording server to send to it.
* **A new data source.** Nidhi makes it on the port you enter.

<figure><img src="https://1044727958-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOkTZH1L3AaRU2hwQk4Ve%2Fuploads%2Fgit-blob-655e0a220f4fd8c0bc9733ed6b85d70b8a69322c%2Fmc-alerts-event-server.png?alt=media" alt="Where the Event Server runs"><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Set up

Nidhi sets XProtect up and then shows *XProtect is set up for* *recorder*.

If XProtect doesn't let Nidhi do it (for example, your Management Client role can't change these settings), the step lists what to do by hand:

1. **Tools > Options > Generic Events.** Add a data source. Enable it, with TCP, a port, separator bytes 13,10 and UTF-8, and allow the recording server.
2. **Rules and Events > Generic Events.** Add an event on that data source for each alert.
3. **Alarms > Alarm Definitions.** Add an alarm for each event. Set **Triggering event** to *External Events* and the event, and **Time profile** to *Always*.
   {% endstep %}

{% step %}

### Rules

Only if you chose rules.

1. In **Rules and Events > Rules > Add Rule**, choose *Perform an action on* *event*.
2. Choose the action, for example *Send notification* or *Send SNMP trap*.
3. Click **Done in XProtect — next**.
   {% endstep %}

{% step %}

### Test

Click **Send a test alert**. Check that it reaches the Smart Client's alarm list, or your e-mail.
{% endstep %}
{% endstepper %}

## The Alert Text

Each alert arrives as text, for example:

```
Nidhi emergency on REC-04: Cloud down — ...
Nidhi back to normal on REC-04 — Cloud down is over: ...
```

{% hint style="info" %}
Alerts reach XProtect over the network on the data source's port (TCP 1238 by default). Open this port on the Event Server for the recording servers. See [Ports](https://docs.vega365.com/nidhi/getting-started/ports.md#to-the-xprotect-event-server).
{% endhint %}
