# Postgres Database Monitor Configuration Guide on the Elven Platform

The **Postgres Monitor** from the **Elven Platform** allows for checks based on **key queries** in **PostgreSQL**. This feature helps configure **continuous checks**, set **alerts**, and define **thresholds** for **automatic incident creation**, ensuring you are quickly informed of any **irregularities** in **connectivity** or **service performance**.

**PostgreSQL**, commonly known as **Postgres**, is a highly reliable and flexible **open-source relational database management system**. It offers full **SQL capabilities** along with advanced features such as support for **complex data types**, **extensibility**, **scalability**, and **high availability**. **Postgres** is widely used across a variety of applications, from small projects to large **enterprise environments**, where its **reliability**, **performance**, and **advanced features** are highly valued.

## **Accessing Postgres Monitoring**&#x20;

* Navigate to the **main menu** and click on **Services Hub**.
* In **Database**, select the **Postgres** item.

<figure><img src="https://content.gitbook.com/content/NbD6tAAcbxaY8pw1cchL/blobs/RMStO8OMXOQ796kI5iDy/monpostgre01.png" alt=""><figcaption></figcaption></figure>

## **Monitoring Configuration**&#x20;

**Monitoring the availability** of your **services** has never been easier. Start by giving a clear name to the resource you want to track (**Resource Name**) to make identification easier. Then, adjust the **interval between checks** (**Interval**) and the **response timeout** (**Timeout**).

Select where the **monitoring agent** is located (**Checkpoint Cloud**) by choosing the appropriate **Environment**. If it doesn’t exist, you can create one using **+ Checkpoint**. After this configuration, under **Form Type**, you can choose between **User and Password** or **Healthcheck URL**.

In **User and Password**, you must provide the **Username** and **Password**, which are the **database access credentials**. Then, enter the **server address** in the **Host** field and the **Port**, which by default is **5432**, but can be adjusted if the database is configured on a different port.

In the **Database** field, specify the name of the **database** to be monitored. Additionally, the **SSL Mode** field allows you to configure the **security level** of the connection, ensuring additional protection through **encryption**, if needed. With all this information properly filled in, the connection will be established to perform **continuous and reliable checks**.

In **Healthcheck URL**, you can simply enter the **URL** of the resource to be monitored.

Remember that the **Host** and **Healthcheck URL** fields only accept **URLs**; if you need to use an **IP address**, it must be stored in a **Secret** to ensure the **security** and **organization** of the information.

<figure><img src="https://content.gitbook.com/content/NbD6tAAcbxaY8pw1cchL/blobs/MR54ov8gQw886yqQ98TF/monpostgre02.png" alt=""><figcaption></figcaption></figure>

## **Automatic Incident Opening**

You can configure **automatic incident opening** to ensure a quick response to critical issues. To begin, define the **incident severity**, allowing you to prioritize according to urgency. Next, adjust the **Check Interval**, specifying the check frequency in seconds to continuously monitor the resource. This helps ensure you're always one step ahead, detecting problems as soon as they arise.

Additionally, select the **team to be notified** whenever an incident occurs and enable the **"Enable to set up automatic incidents opening"** option to ensure the configuration is active. With this setup, the platform automates **incident management**, making the response process faster and more efficient, without the need for manual intervention. This ensures your team is always ready to resolve any issue with speed and precision.

<figure><img src="https://content.gitbook.com/content/NbD6tAAcbxaY8pw1cchL/blobs/Jwn8ZhH2dhfVKCQORjgu/monpostgre03.png" alt=""><figcaption></figcaption></figure>

## **Maintenance Window**&#x20;

We also have the **Maintenance Window**, an essential feature for managing **planned maintenance periods** in your application. During this time, **checks are temporarily paused**, preventing **monitoring**, **alerts**, and **notifications** from being triggered while you perform **adjustments** or **updates**. This allows maintenance to proceed smoothly, without generating unnecessary **notifications** or **false alarms**, ensuring your operations continue in an orderly manner without unexpected interruptions in **performance reports**.

For example, imagine you need to update the **payment system** of an **e-commerce** platform, making backend adjustments such as installing new **security certificates**. To do this, you can configure the **Maintenance Window** for a specific time, such as **12/13/2024, from 2:00 PM to 2:30 PM**. During this period, the **Elven Platform** suspends checks, preventing the monitoring system from logging **temporary failures** or triggering **false alerts**. This way, you can make the necessary changes calmly, knowing that the **monitoring system** will not be affected during maintenance. This approach ensures the update is carried out in an **organized** manner, without affecting the **user experience** or generating unwanted **notifications**.

<figure><img src="https://content.gitbook.com/content/NbD6tAAcbxaY8pw1cchL/blobs/7PRV0fgBNHGEE7H5T9uZ/monpostgre04.png" alt=""><figcaption></figcaption></figure>

## **Application Opening Hours**&#x20;

You can also rely on the **Application Opening Hours** feature, which allows you to configure your application's **operating hours**. This functionality is essential for customizing **monitoring** based on the periods when your application is actually active, avoiding **alerts** and **notifications** outside of business hours. This way, monitoring becomes more aligned with your business’s real needs, ensuring more accurate **reports** and efficient **management**.

For example, imagine your application only runs from **Monday to Friday**, from **9:00 AM to 6:00 PM**. You can configure **Application Opening Hours** to reflect this schedule by specifying the **working days and hours**. With this setup, the **Elven Platform** automatically disables **checks** outside of these hours, preventing the logging of **failures** that don’t affect end users and avoiding unnecessary **alerts**. This approach optimizes **performance analysis**, focusing only on relevant periods and providing a clearer view of your application’s **health** during its **operating hours**.&#x20;

<figure><img src="https://content.gitbook.com/content/NbD6tAAcbxaY8pw1cchL/blobs/LwQEC9JE4s13UxGX8F2d/monpostgre05.png" alt=""><figcaption></figcaption></figure>

## **Glossary of Technical Terms**

**PostgreSQL**: An **open-source relational database management system** known for its **reliability**, **extensibility**, and support for **complex data types**. Widely used in **enterprise applications** and projects of all sizes.

**Interval**: The **time interval** between automatic checks performed during **monitoring**.

**Timeout**: The **maximum time** allowed for the monitoring system to receive a response from the monitored resource before registering a **failure**.

**Checkpoint Cloud**: The **location** where the **monitoring agent** is deployed, which can be a preexisting **environment** or one created by the user.**Host**: The **URL address** of the monitored resource. If an **IP address** is needed, it must be stored in a **Secret** for enhanced **security**.

**Secret**: A resource used to store **sensitive information**, such as **IP addresses** or **credentials**, ensuring **security** and **organization**.

**Enable to set up automatic incidents opening**: An **option** that, when enabled, activates **automatic incident creation** upon detection of **critical issues**.

**Severity**: The **level of criticality** assigned to an **incident**, allowing it to be prioritized based on **urgency**.

**Check Interval**: The **time interval**, in seconds, for performing **continuous checks** on the monitored resource.

**Maintenance Window**: A **feature** that temporarily **pauses monitoring**, **alerts**, and **notifications** during **planned maintenance periods**.

**Application Opening Hours**: A **configuration** that defines the **operating hours** of the application, aligning **monitoring** with **active periods** and avoiding **alerts** outside those times.
