---
title: "How to Monitor Files in Retrace"
slug: "file-monitors-configure"
description: "Create and configure file monitors in Retrace for efficient monitoring of files. Easily set up alerts based on file content or regex patterns."
updated: 2019-07-24T15:12:29Z
published: 2019-07-24T15:12:29Z
---

> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stackify.com/llms.txt
> Use this file to discover all available pages before exploring further.

# How to Monitor Files

A file monitor can only be created for a single file. However, in Retrace, you can have as many file monitors as needed.

> Directory and multiple file monitoring are not currently supported.

## Adding a File Check Monitor

Click on the **Monitoring** tab and select **Monitoring Templates** under **Settings**.

![Monitoring Templates](https://cdn.document360.io/3fcaf473-a1ef-4778-aa2c-fd28411c2b01/Images/Documentation/Monitoring%20Templates.png)

Set up a File Check Monitor as an [App Monitor](https://docs.stackify.com/docs/app-monitors-configure) or as part of [Server Monitoring Template](https://docs.stackify.com/docs/server-monitoring-templates). In here, we will use Server Monitoring Template. Select your chosen server name and proceed to the File Check Option.

The File Check option is in the **Server Monitors** tab. To add a new file to be monitored click Add New > File .

![Server Monitors](https://cdn.document360.io/3fcaf473-a1ef-4778-aa2c-fd28411c2b01/Images/Documentation/Server%20Monitors.png)

Enter the File Name, in here we enter ‘Test’, to monitor and click the Add button.

![Add File Name](https://cdn.document360.io/3fcaf473-a1ef-4778-aa2c-fd28411c2b01/Images/Documentation/Add%20File%20Name.png)

## Configuring a File Check

Configure the alert threshold in the same manner with any other type of monitor.

![File Contains](https://cdn.document360.io/3fcaf473-a1ef-4778-aa2c-fd28411c2b01/Images/Documentation/File%20Contains.png)

## String Literals

Enter the expected text or regex to monitor and use the drop-down menu to select the severity threshold of the monitor. Below shows an example wherein the alert is configured if the file contains the string literal ‘System.TimeoutException’.

![Outage](https://cdn.document360.io/3fcaf473-a1ef-4778-aa2c-fd28411c2b01/Images/Documentation/Outage.png)

![File Test](https://cdn.document360.io/3fcaf473-a1ef-4778-aa2c-fd28411c2b01/Images/Documentation/File%20Test.png)

## Regular Expressions

Another example shows wherein the alert is configured if the file contains regex “Null|Reference|Exception”.

![Regex(2)](https://cdn.document360.io/3fcaf473-a1ef-4778-aa2c-fd28411c2b01/Images/Documentation/Regex%282%29.png)

![File Test Regex](https://cdn.document360.io/3fcaf473-a1ef-4778-aa2c-fd28411c2b01/Images/Documentation/File%20Test%20Regex.png)

Monitor types are the same in both Server Monitoring Templates and App Dashboard configuration. Those file monitors under Server Monitoring Templates are configured on a server and will only be applied to servers that have the appropriate template applied. In the App Dashboard configuration, the file monitor will be applied to every device that the application is installed.
