---
title: PostgreSQL Database Configuration – Remote Setup and Monitoring with Nodinite
description: Configure PostgreSQL database monitoring in Nodinite with connection strings, custom SQL statements, and remote configuration for proactive database health tracking.
---

# :fa-database: Configuring PostgreSQL Database Monitoring

## Understanding PostgreSQL Monitoring Configuration

Before configuring PostgreSQL monitoring, understand how :Nodinite: connects to and monitors your PostgreSQL databases. The [Database Monitoring Agent][] uses the Npgsql driver to establish secure connections and execute custom SQL statements for business data validation.

>[!TIP]
>For general remote configuration guidance, setup steps, and initial agent configuration, see the main [Configuration][Configuration] guide.

### :fa-network-wired: PostgreSQL Monitoring Architecture

The [Database Monitoring Agent][] actively monitors your configured **PostgreSQL Databases**. Each configured database connection is represented in :Nodinite: as one or more [Resources][], providing real-time state evaluation.

<div class="mermaid">
graph LR
    A["fa:fa-server: PostgreSQL Server"] --> | Npgsql Connection | B["fa:fa-cogs: Database Monitoring Agent"]  
    B --> | SSL/TLS Encrypted | C["fa:fa-shield-halved: Monitoring Service"]  
    C --> | State Evaluation | D["fa:fa-display: Web Client"]  
    C --> | Alerts | E["fa:fa-bell: Alarm Plugins"]  
    style B fill:#2678BD
    style C fill:#2678BD
    style D fill:#93d16d
    style E fill:#FFD525
</div>

*Diagram: PostgreSQL monitoring architecture showing secure connection flow from database server to Nodinite [Web Client][] with alert capabilities.*

PostgreSQL database configurations are grouped by the [Category][Categories] **PostgreSQL - [SQL Statements][]**:  
![Category - PostgreSQL Statement Configuration][1]  
*Example of a :Nodinite: [Monitor View][Monitor Views] showing PostgreSQL [Resources][].*

**Key points:**

* Your **PostgreSQL Databases** are listed in :Nodinite: as [Resources][], where the name of the **Configuration** becomes the [Resource][Resources] name prefix
* Each configuration can include multiple SQL statements for business data monitoring
* Monitor database status using [Monitor Views][] and trigger external alerts through any installed [Alarm Plugins][]

## :fa-key: What are the key features for PostgreSQL Configuration?

* **Remote Configuration** – Configure PostgreSQL connections directly from the :Nodinite: [Web Client][]  
* **Secure [Connection Strings][SQL Connection Strings]** – Encrypted storage of database credentials
* **Custom SQL Statements** – Execute your own PostgreSQL queries for business data monitoring

## :fa-edit: How do I configure a PostgreSQL Database?

PostgreSQL database monitoring is configured through the [Remote Configuration][] dialogue for the [Database Monitoring Agent][]. For general setup and initial configuration steps, see:

:fa-edit: [Remote Configuration][Configuration Remote]

There are different configuration areas for PostgreSQL databases:

* :fa-square-plus: [Add PostgreSQL Database](#fa-square-plus-add-postgresql-database)
* :fa-wrench: [Settings](#fa-wrench-settings)

### :fa-square-plus: Add PostgreSQL Database

Click the **:fa-plus: Add** button to add a new PostgreSQL Database to monitor. Provide one entry per Database. Each entry appears as at least one [Resource][Resources] in [Monitor Views][].  
![Add PostgreSQL Database][png_PostgreSQLAdd]  
*Add a new PostgreSQL Database configuration*  

#### Configure the PostgreSQL Database Entry

![PostgreSQL Configuration][png_PostgreSQLAccordion]  
*Configure the PostgreSQL Database connection*  

Click the Accordion to expand the configuration section.

* :fa-toggle-on: **Enabled** – Enable monitoring for this configuration
* :fa-tag: **Configuration name** – User-friendly name for this configuration (becomes the Resource name prefix)
* :fa-align-left: **Description** – Optional description of this configuration
* :fa-plug: **Connection String** – The [Database Monitoring Agent][] uses this to connect to PostgreSQL
* :fa-window-maximize: **Application ID** – Any user-defined ApplicationId from the [Applications][] tab

##### Connection String Format

The PostgreSQL connection string uses Npgsql format. Here's an example:

```ini
Server=db.example.com;Port=5432;Database=nodinite_monitor;User Id=monitor_user;Password=***;SslMode=Require;TrustServerCertificate=false;
```

Example: PostgreSQL with SSL/TLS encryption and certificate validation

##### Connection String Parameters

|Parameter|Description|Example Values|  
|---|---|---|  
|:fa-server: **Server**|PostgreSQL server hostname or IP address|`localhost`, `db.example.com`|  
|:fa-network-wired: **Port**|PostgreSQL server port|`5432` (default), `31902`|  
|:fa-database: **Database**|Name of the PostgreSQL database to connect to|`nodinite_monitor`, `production_db`|  
|:fa-user: **User Id**|PostgreSQL username for authentication|`postgres`, `monitor_user`|  
|:fa-key: **Password**|PostgreSQL password for authentication|Encrypted credential|  
|:fa-lock: **SslMode**|SSL/TLS connection mode|`Disable`, `Prefer`, `Require`, `VerifyFull`|  
|:fa-shield-halved: **TrustServerCertificate**|Whether to trust self-signed certificates|`true`, `false`|  

>[!TIP]
>For production environments, use `SslMode=Require` or `SslMode=VerifyFull` and set `TrustServerCertificate=false` to enforce certificate validation.

>[!IMPORTANT]
>**Passwords with special characters:** If your password contains `;` (semicolon), `=` (equals), or other special characters, enclose it in single quotes:
>
>```ini
>Password='My;Complex=Pass';
>```
>
>For complete connection string troubleshooting including special characters, see the [SQL Server Connection Strings][SQL Connection Strings] guide (password escaping applies to both Microsoft.Data.SqlClient and Npgsql).

>[!NOTE]
>The Connection String is encrypted in the Settings.json file for security.

#### :fa-folder: PostgreSQL Categories

You can configure different monitoring aspects for each PostgreSQL database. The following [Categories][] are available:  

|:fa-folder: Category|:fa-quote-right: Description|:fa-wrench: Configuration|  
|---|---|---|  
|:fa-code: [PostgreSQL - SQL Statements][]|Run custom SQL statements to monitor business data|[Configuration][PostgreSQL SQL Statements - Configuration]|  

### :fa-wrench: Settings

The Settings tab configures operational parameters for the [Database Monitoring Agent][]. For detailed configuration of all settings including Environment and Debug mode, see the main configuration guide:

:fa-wrench: [Settings Configuration][Configuration Settings]

Key settings relevant to PostgreSQL monitoring:

* :fa-leaf: **Environment** – Set environment name (DEV, TEST, PROD)
* :fa-bug: **Debug** – Enable detailed logging for troubleshooting connection issues

## :fa-bolt: Actions

The [Database Monitoring Agent][] PostgreSQL configurations support the following [Remote Actions][]:

* :fa-edit: **Edit Configuration** – Modify connection settings and SQL statements
* :fa-plug: **Test Connection** – Verify database connectivity

## :fa-save: Save

For details on saving your configuration changes and synchronization behavior, see:

:fa-save: [Save Configuration][Configuration Save]

## :fa-hand-point-right: Next Steps

:fa-database: [PostgreSQL - SQL Statements][]  
:fa-display: [Add or manage Monitor View][]  

## :fa-link-horizontal: Related Topics

:fa-shield-halved: [Secure Custom Database Scripts and Actions][]  
:fa-rocket: [Install Database Monitoring Agent][Install]  
:fa-edit: [Configure Database Monitoring Agent][Configuration]  
:fa-monitor-waveform: [Monitoring Agents][]  
:fa-box-open: [Applications][]  
:fa-database: [Database Monitoring Agent][]  

[1]:{ndm}/Documentation%20Pictures/MonitorAgent/SQL/CategoryPSQLStatements.png

[Add or manage Monitor View]:{ndr}/Administration/2.%20Monitor%20Management/1.%20Monitor%20Views/Features/Add%20or%20manage%20Monitor%20View.md
[Alarm Plugins]:{ndr}/Administration/5.%20Settings/1.%20Alarm%20Plugins/Features/What%20is%20an%20Alarm%20Plugin.md
[Applications]:{ndr}/Administration/2.%20Monitor%20Management/5.%20Applications/Features/What%20is%20an%20Application.md
[Categories]:{ndr}/Administration/2.%20Monitor%20Management/4.%20Categories/Features/What%20is%20a%20Category.md
[Configuration]:{ndr}/Logging%20and%20Monitoring/Database/Getting%20started/3.%20Configuration.md
[Configuration Remote]:{ndr}/Logging%20and%20Monitoring/Database/Getting%20started/3.%20Configuration.md#fa-edit-remote-configuration
[Configuration Save]:{ndr}/Logging%20and%20Monitoring/Database/Getting%20started/3.%20Configuration.md#fa-save-save
[Configuration Settings]:{ndr}/Logging%20and%20Monitoring/Database/Getting%20started/3.%20Configuration.md#fa-wrench-settings-tab
[Database Monitoring Agent]:{ndr}/Logging%20and%20Monitoring/Database/Overview.md
[Install]:{ndr}/Logging%20and%20Monitoring/Database/Getting%20started/2.%20Install.md
[Monitor Views]:{ndr}/Administration/2.%20Monitor%20Management/1.%20Monitor%20Views/Features/What%20is%20a%20Monitor%20View.md
[Monitoring Agents]:{ndr}/Administration/2.%20Monitor%20Management/2.%20Monitor%20Agents/Features/What%20is%20a%20Monitor%20Agent.md  
[png_PostgreSQLAccordion]:{ndm}/Documentation%20Pictures/MonitorAgent/SQL/PostgreSQLAccordion.png
[png_PostgreSQLAdd]:{ndm}/Documentation%20Pictures/MonitorAgent/SQL/PostgreSQLAdd.png
[PostgreSQL - SQL Statements]:{ndr}/Logging%20and%20Monitoring/Database/Features/SQL%20Statements/PostgreSQL%20-%20SQL%20Statements.md
[PostgreSQL SQL Statements - Configuration]:{ndr}/Logging%20and%20Monitoring/Database/Features/SQL%20Statements/PostgreSQL%20-%20SQL%20Statements.md#fa-file-how-do-i-add-my-own-sql-statements
[Remote Actions]:{ndr}/Getting%20Started/3.%20Monitor/Remote%20Actions.md
[Remote Configuration]:{ndr}/Administration/2.%20Monitor%20Management/2.%20Monitor%20Agents/Features/How%20do%20I%20configure%20a%20Monitor%20Agent.md
[Resources]:{ndr}/Administration/2.%20Monitor%20Management/3.%20Resources/Features/What%20is%20a%20Resource.md
[Secure Custom Database Scripts and Actions]:{ndr}/Logging%20and%20Monitoring/Database/Troubleshooting/Secure%20Custom%20Database%20Scripts%20and%20Actions.md
[SQL Connection Strings]:{ndr}/Install%20and%20Update/Troubleshooting/SQL%20Server/Connection%20Strings.md
[SQL Statements]:{ndr}/Logging%20and%20Monitoring/Database/Features/SQL%20Statements/SQL%20Server%20-%20Statements.md
[Web Client]:{ndr}/Core%20Services/Web%20Client/Overview.md