---
title: Configure Nodinite Pickup Service Logging Agent for PostgreSQL Integration
description: Configure the Nodinite Pickup Service Logging Agent to collect custom Log Events from PostgreSQL. This guide provides step-by-step setup, best practices, and integration tips for secure, scalable, and reliable log event collection, including table structure and validation.
---

<a class="nodinite-release-notes" href="https://portal.nodinite.com/marketplace/14" data-url="https://portal.nodinite.com/marketplace/14"><i class="fal fa-fw fa-file-alt" aria-hidden="true"></i> Release Notes</a>

# <i class="fal fa-edit" aria-hidden="true"></i> PostgreSQL Configuration Example

Effortlessly integrate your enterprise systems by configuring the <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span> [Pickup Logging Service][Pickup Service] to fetch [JSON Log Events][JSON Log Event] directly from your PostgreSQL database. This guide empowers you to set up secure, scalable, and reliable log event collection for your organization, with robust validation and table design for compliance and analytics.  

✅ Seamless integration with PostgreSQL for real-time log event collection  
✅ Secure and compliant long-term storage of log data  
✅ Scalable configuration for enterprise environments  
✅ Automated validation and error handling for reliable operations  

<div class="mermaid">
graph LR
  subgraph "PostgreSQL"
    roS("fa<i class="fal fa-database" aria-hidden="true"></i> Database Table")
  end
  subgraph "Nodinite instance"
    roPS("fa<i class="fal fa-truck-pickup" aria-hidden="true"></i> Pickup Service")
    roS --> roPS
    roPS --> | Long term storage | roDB("fa<i class="fal fa-database" aria-hidden="true"></i> Log Database")
  end
</div>

*The diagram above illustrates how the Pickup Service interacts with PostgreSQL tables, processes messages, and stores them in the <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span> [Log Database][Log Databases].*  

## <i class="fal fa-list" aria-hidden="true"></i> PostgreSQLs

The **PostgreSQLs** section lets you manage all PostgreSQL database sources for your log events.

In the [Remote Configuration][] GUI, navigate to the **PostgreSQLs** tab. Here, you can add, edit, or remove PostgreSQL database configurations. Each configuration defines how the <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span> [Pickup Log Events Logging Service][Pickup Service] connects to and processes messages from a specific PostgreSQL database table.

![PostgreSQLs Configuration Tab][1]  
*Example of the PostgreSQLs configuration tab in the [Remote Configuration][] GUI.*

Click the **Add** button to create a new PostgreSQL configuration. Fill in the required fields, such as connection string, database name, and row limit settings. You can also configure Replace Rules for advanced message processing.

![PostgreSQL Configuration Accordion][2]  
*Example of a PostgreSQL configuration accordion in the [Remote Configuration][] GUI.*

Expand the accordion for each PostgreSQL configuration to access advanced settings, including [Replace Rules][ReplaceRules] for message processing. These rules allow you to modify message content before it's stored in <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span>, ensuring consistency and compliance with your logging standards.

<aside aria-label="Important" class="nodinite-note nodinite-note--important">
<p class="nodinite-note__label" aria-hidden="true"><i class="far fa-fw fa-message-exclamation"></i> Important</p>
<div class="nodinite-note__content"><p>Ensure that your PostgreSQL database user has read access to the LogEvents table and update permissions to set the ValidationFailed flag. Test connectivity before enabling a configuration.</p></div>
</aside>

### General tab

The **General tab** provides the fundamental settings for your PostgreSQL configuration within the [Remote Configuration][] GUI.  
  ![General Tab][3]  
  *The General tab allows you to enable/disable the configuration and provide a display name and description.*

The following key fields are required:

|Field|Description|Required|Notes|  
|---|---|---|---|  
|<i class="fal fa-toggle-on" aria-hidden="true"></i> **Enabled**|Checkbox to activate or deactivate this PostgreSQL configuration|No|When unchecked, the Pickup Service will skip this configuration|  
|<i class="fal fa-tag" aria-hidden="true"></i> **Display Name**|User-friendly name for this PostgreSQL source configuration|✅ Yes|Used in the GUI and logs for easy identification|  
|<i class="fal fa-align-left" aria-hidden="true"></i> **Description**|Optional detailed description of the PostgreSQL configuration|No|Helps document the purpose and details of this specific database setup|  

Follow these guidelines when configuring the General tab:

* Use descriptive names that clearly indicate the database and purpose (e.g., "Production DB - Order Events")
* In the Description field, note important details such as the database's business purpose, owner contact, or any special processing notes
* The Display Name appears throughout the <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span> interface, so keep it concise yet meaningful
* Leave the configuration disabled during initial setup if you're not ready to start collecting log events

### Source tab

The **Source tab** contains the database connection configuration and query settings.  
  ![Source Tab][4]  
  *The Source tab contains settings for connecting to the PostgreSQL database.*

The following key fields must be configured for database connectivity:

|Field|Description|Required|Notes|  
|---|---|---|---|  
|<i class="fal fa-plug" aria-hidden="true"></i> [Connection String][Connection Strings]|PostgreSQL connection string with authentication|✅ Yes|Example: `Server=host;Port=5432;Database=dbname;User Id=user;Password=pass;SSLMode=Prefer`|  
|<i class="fal fa-hashtag" aria-hidden="true"></i> **Max Rows Limit**|Maximum number of rows to fetch per query execution|No|Default: 500; higher values may impact memory usage; adjust based on your environment|  

Follow these guidelines when setting up the Source tab:

* Ensure your database user has SELECT permissions on the LogEvents table and UPDATE permissions to flag invalid records
* Use connection strings with SSL/TLS encryption for production environments
* Test the connection before enabling to verify credentials and network connectivity
* Set Max Rows Limit based on available server memory and network bandwidth
* For large datasets, start with 500 rows and adjust upward after testing
* Include proper timeout and retry settings in your connection string
* Use strong, unique passwords and store them securely
* Never embed credentials directly in documentation or version control

### Destination tab

The **Destination tab** settings are shared across all source configurations. See [Destination Tab][] in the shared configuration guide.

### Replace Rules

Read about [Replace Rules][ReplaceRules] in the shared configuration section. Replace Rules allow you to modify message content before it's stored in <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span>, ensuring consistency and compliance with your logging standards.
  ![Replace Rules Tab][6]  
  *The Replace Rules tab allows you to configure rules for modifying message content.*

## <i class="fal fa-file" aria-hidden="true"></i> Configuration file  

<aside aria-label="Note" class="nodinite-note nodinite-note--note">
<p class="nodinite-note__label" aria-hidden="true"><i class="far fa-fw fa-note"></i> Note</p>
<div class="nodinite-note__content"><p>This section applies for <strong>older</strong> versions (&lt;7.1.x) of the <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span> <a href="https://docs.nodinite.com/logging-and-monitoring/pickup-logevents-service/overview/">Pickup Log Events Logging Service</a>.</p></div>
</aside>

```cmd
C:\Program Files\Nodinite\Logging Agent - Pickup Service\Settings.json
```

```json
{
  ...
  "PostgreSQLs": [
    {
      "Enabled": true,
      "LogApi": "https://nodinite.contoso.com:40002/LogAPI/",
      "UseConfigurationDatabase": false,
      "ConfigurationDatabaseConnectionString": null,
      "ConnectionString": "Server=name.databases.appdomain.cloud;Port=31902;Database=ibmclouddb;User Id=ibm_cloud_user;Password=yoursecretpassword;SSLMode=Prefer;Trust Server Certificate=true",
      "MaxRowsLimit": 500,
      "ReplaceRules": [
        {
          "Name": "Fix Endpoint real customer id to {customerId}",
          "ReplaceName": false,
          "ReplaceUri": true,
          "Pattern": "/([0-9]{4,})$",
          "Group1Value": "{customerId}"
        }
      ]
    }
  ]
  ...                      
}
```

**PostgreSQLs** is an **array** of PostgreSQL configurations. Each entry defines how the [Log Agent][Log Agents] connects to and processes messages from a specific PostgreSQL database. This setup ensures your <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span> [JSON Log Events][JSON Log Event] are reliably collected and managed.  

|Property|Description|Value Example|Comment|  
|---|---|---|---|  
|<i class="fal fa-plug" aria-hidden="true"></i> **ConnectionString**|PostgreSQL Connection string|`Server=replaceme.databases.appdomain.cloud;Port=31902;Database=ibmclouddb;User Id=ibm_cloud_id;Password=yoursecretpassword;SSLMode=Prefer;Trust Server Certificate=true`||  
|<i class="fal fa-hashtag" aria-hidden="true"></i> **MaxRowsLimit**|Maximum number of rows to fetch on each loop|500 (default)|Larger values may impact memory usage|  
|<i class="fal fa-toggle-on" aria-hidden="true"></i> **Enabled**|See the [Shared Configuration][] section for more info|||  
|<i class="fal fa-link" aria-hidden="true"></i> [LogAPI][Log API]|See the [Shared Configuration][] section for more info|||  
|<i class="fal fa-database" aria-hidden="true"></i> **UseConfigurationDatabase**|See the [Shared Configuration][] section for more info|||  
|<i class="fal fa-plug" aria-hidden="true"></i> **ConfigurationDatabaseConnectionString**|See the [Shared Configuration][] section for more info|||  
|<i class="fal fa-exchange-alt" aria-hidden="true"></i> **ReplaceRules**|See the shared [Replace Rules][ReplaceRules] section for more info|||  

<aside aria-label="Important" class="nodinite-note nodinite-note--important">
<p class="nodinite-note__label" aria-hidden="true"><i class="far fa-fw fa-message-exclamation"></i> Important</p>
<div class="nodinite-note__content"><p>When you are done editing the configuration, you must restart the <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span> <a href="https://docs.nodinite.com/logging-and-monitoring/pickup-logevents-service/overview/">Pickup Logging Service</a> for configuration changes to take effect.</p></div>
</aside>

## <i class="fal fa-table" aria-hidden="true"></i> PostgreSQL table

If you use a [PostgreSQL][] database to store [Log Events][Log Event], your custom logging solution must define the following **LogEvents** table:  

|Column|Datatype|Purpose|  
|---|---|---|  
|<i class="fal fa-file-lines" aria-hidden="true"></i> **LogEvent**|json|Your [JSON encoded Log Event][JSON Log Event] goes here|  
|<i class="fal fa-fingerprint" aria-hidden="true"></i> **Id**|bigint|Automatically created identity; the PickupService must know which row to flag as invalid if the value in **LogEvent** is not valid|  
|<i class="fal fa-circle-exclamation" aria-hidden="true"></i> **ValidationFailed**|boolean|Automatically set to **false** when inserted; may be set to **true** during processing if errors are detected|  
|<i class="fal fa-align-left" aria-hidden="true"></i> **ValidationFailedText**|text|Updated if errors occur validating the LogEvent during processing|  
|<i class="fal fa-calendar-day" aria-hidden="true"></i> **Created**|timestamp|Automatically created during insert; useful for troubleshooting|  

<aside aria-label="Info" class="nodinite-note nodinite-note--info">
<p class="nodinite-note__label" aria-hidden="true"><i class="far fa-fw fa-square-info"></i> Info</p>
<div class="nodinite-note__content"><p>Invalid <a href="https://docs.nodinite.com/core-services/log-event/features/json-log-event/">Log Events</a> will have <strong>ValidationFailed</strong> set to <strong>True</strong>. You must remove these entries <strong>manually</strong>.</p></div>
</aside>

```sql
-- Table: public."LogEvents"

-- DROP TABLE public."LogEvents";

CREATE TABLE public."LogEvents"
(
    "LogEvent" json NOT NULL,
    "Id" bigint NOT NULL GENERATED BY DEFAULT AS IDENTITY ( INCREMENT 1 START 1 MINVALUE 1 MAXVALUE 9223372036854775807 CACHE 1 ),
    "ValidationFailed" boolean NOT NULL DEFAULT false,
    "ValidationFailedText" text NULL,   
    "Created" timestamp with time zone NOT NULL DEFAULT now(),
    CONSTRAINT "LogEvents_pkey" PRIMARY KEY ("Id")
)
WITH (
    OIDS = FALSE
)
TABLESPACE pg_default;

ALTER TABLE public."LogEvents"
    OWNER to admin;

GRANT ALL ON TABLE public."LogEvents" TO usergoeshere;

-- Repeat the grants as needed
```

<aside aria-label="Info" class="nodinite-note nodinite-note--info">
<p class="nodinite-note__label" aria-hidden="true"><i class="far fa-fw fa-square-info"></i> Info</p>
<div class="nodinite-note__content"><p>Change the value for '<code>usergoeshere</code>' to your actual user.</p></div>
</aside>

## <i class="fal fa-hand-point-right" aria-hidden="true"></i> Next Steps

* <i class="fal fa-cog" aria-hidden="true"></i> [Configure][Configuration] - Set up your PostgreSQL integration  
* <i class="fal fa-book" aria-hidden="true"></i> [Remote Configuration Guide][Remote Configuration] - Learn the GUI setup process  

## <i class="fal fa-link-horizontal" aria-hidden="true"></i> Related Topics

* <i class="fal fa-file-code" aria-hidden="true"></i> [JSON Log Event][] - Message format specification  
* <i class="fal fa-exchange-alt" aria-hidden="true"></i> [Replace Rules][ReplaceRules] - Transform message content  
* <i class="fal fa-database" aria-hidden="true"></i> [Log Databases][] - Where log events are stored  
* <i class="fal fa-plug" aria-hidden="true"></i> [Log API][] - REST endpoint for log events  
* <i class="fal fa-info-circle" aria-hidden="true"></i> [Pickup Service Overview][Pickup Service] - Feature overview  
* <i class="fal fa-puzzle-piece" aria-hidden="true"></i> [Shared Configuration][Shared Configuration] - Common settings guide  

[1]:https://docs.nodinite.com/media/Documentation%20Pictures/LogAgent/PickupService/Configuration/PSQL/PostgreSQLsTab.png
[2]:https://docs.nodinite.com/media/Documentation%20Pictures/LogAgent/PickupService/Configuration/PSQL/EmptyAccordion.png
[3]:https://docs.nodinite.com/media/Documentation%20Pictures/LogAgent/PickupService/Configuration/PSQL/GeneralTab.png
[4]:https://docs.nodinite.com/media/Documentation%20Pictures/LogAgent/PickupService/Configuration/PSQL/SourceTab.png
[6]:https://docs.nodinite.com/media/Documentation%20Pictures/LogAgent/PickupService/Configuration/PSQL/ReplaceRulesTab.png

[Configuration]:https://docs.nodinite.com/logging-and-monitoring/pickup-logevents-service/getting-started/configuration/
[Connection Strings]:https://docs.nodinite.com/install-and-update/troubleshooting/sql-server/connection-strings/
[Destination Tab]:https://docs.nodinite.com/logging-and-monitoring/pickup-logevents-service/getting-started/configuration/#fa-right-from-bracket-destination-tab
[JSON Log Event]:https://docs.nodinite.com/core-services/log-event/features/json-log-event/
[Log Agents]:https://docs.nodinite.com/administration/log-management/log-agents/features/what-is-a-log-agent/
[Log API]:https://docs.nodinite.com/core-services/log-api/overview/
[Log Databases]:https://docs.nodinite.com/core-services/log-databases/overview/
[Log Event]:https://docs.nodinite.com/core-services/log-event/features/json-log-event/
[Pickup Service]:https://docs.nodinite.com/logging-and-monitoring/pickup-logevents-service/overview/
[PostgreSQL]:https://www.postgresql.org/
[Remote Configuration]:https://docs.nodinite.com/administration/monitor-management/monitor-agents/features/how-do-i-configure-a-monitor-agent/
[ReplaceRules]:https://docs.nodinite.com/logging-and-monitoring/pickup-logevents-service/getting-started/configuration/#fa-exchange-alt-replace-rules-clean-up-your-dynamic-endpoints-automatically
[Shared Configuration]:https://docs.nodinite.com/logging-and-monitoring/pickup-logevents-service/getting-started/configuration/#fa-circles-overlap-shared-configuration