# Configure storage monitoring and alerts

You can configure alerts to notify you when the available disk space in your Datalore On-Premises instance is low.

Procedure: Configure monitoring and alerts

To enable monitoring and alerts, take the following steps:

Docker deployment:

1.

In `docker-compose.yaml`, add `MONITORING_ENABLED: true` in the `environment` block:

```YAML
services:
  datalore:
    ...
    environment:
      ...
      MONITORING_ENABLED: true
```

2.

(Optional) To override the default monitoring and alerting values, set the following parameters:

```YAML
services:
  datalore:
    ...
    environment:
      ...
      MONITORING_ENABLED: true
      MONITORING_INTERVAL_MILLIS:  <CHECK_INTERVAL>          # Intervals between consecutive checks in milliseconds Default is 60000
      MONITORING_THRESHOLD_PERCENTAGE_INFO: <INFO_THRESHOLD> # Disk usage threshold for INFO notifications in percent. Default is 80
      MONITORING_THRESHOLD_PERCENTAGE_WARN: <WARN_THRESHOLD> # Disk usage threshold for WARN notifications in percent. Default is 90
      MONITORING_VOLUMES_DATA: <DATA_VOLUMES>                # Volumes to monitor in non-default configurations
```

> **Note:**
> `MONITORING_VOLUMES_DATA` allows you to specify the volumes to monitor in non-default configurations, for example when an external database is used. Its value accepts comma-separated parts of `container:/path/to/volume` strings.
>
>
>
> The default value is `docker-compose-datalore-1:/opt/data,docker-compose-postgresql-1:/var/lib/postgresql/data"`.
>
>
>
> The `docker-compose-*` prefix is inherited from the name of the directory where the `docker-compose.yaml` file is located. For example if your file is in the `datalore-docker` directory, set the `MONITORING_VOLUMES_DATA` value as follows:
>
>
>
>
> ```YAML
> MONITORING_VOLUMES_DATA: "datalore-docker-datalore-1:/opt/data,datalore-docker-postgresql-1:/var/lib/postgresql/data"
> ```

Kubernetes deployment:

Add the following parameters to `datalore.values.yaml`:

1.

In `datalore.values.yaml`, add `MONITORING_ENABLED: true` in the `environment` block:

```YAML
dataloreEnv:
  ...
  MONITORING_ENABLED: true
```

2.

(Optional) To override the default monitoring and alerting values, set the following parameters:

```YAML
dataloreEnv:
  ...
  MONITORING_ENABLED: true
  MONITORING_INTERVAL_MILLIS:  <CHECK_INTERVAL>          # Intervals between consecutive checks in milliseconds Default is 60000
  MONITORING_THRESHOLD_PERCENTAGE_INFO: <INFO_THRESHOLD> # Disk usage threshold for INFO notifications in percent. Default is 80
  MONITORING_THRESHOLD_PERCENTAGE_WARN: <WARN_THRESHOLD> # Disk usage threshold for WARN notifications in percent. Default is 90
  MONITORING_VOLUMES_DATA: <DATA_VOLUMES>                # Volumes to monitor in non-default configurations
```

> **Note:**
> `MONITORING_VOLUMES_DATA` allows you to specify the volumes to monitor in non-default configurations, for example when an external database is used or the release name is different from `datalore`. Its value accepts comma-separated parts of `container:/path/to/volume` strings.
>
>
>
> The default value is `datalore:/opt/data,postgres:/var/lib/postgresql/data`.

