# Architecture

## Components

### Platform

The platform is composed of several components, including:

* The timeseries database [InfluxDB](https://www.influxdata.com/), responsible for storing metrics.
* [Grafana](https://grafana.com/), a visualization software equipped with an embedded PostgreSQL v14 cluster.
* Datasentinel frontend and backend applications, accompanied by an API and agents.

{% hint style="info" %}
During the platform installation, all components are seamlessly embedded and set up.
{% endhint %}

<figure><img src="/files/YvHqZL10Awvv2OHaoRqU" alt="Architecture"><figcaption><p>Datasentinel components</p></figcaption></figure>

### **PostgreSQL Clusters**

Prerequisites for Monitored [PostgreSQL Clusters](/manual/getting-started/postgresql-clusters.md):

* Version >= 9.4
* Extension [pg\_stat\_statements](/manual/getting-started/postgresql-clusters/extensions/pg_stat_statements.md)

## On-premises

You have the flexibility to choose between using either the [Agent-based](/manual/implementation/agent-usage.md), [Agentless](/manual/features/other-features/agentless-monitoring.md), or a combination of both methods to monitor the metrics of your PostgreSQL clusters.

<figure><img src="/files/xLS4lJsPO58pYLiBQvdx" alt=""><figcaption><p>Hybrid architecture example</p></figcaption></figure>

{% hint style="info" %}
Install on as many platforms as you'd like—there are no limitations.
{% endhint %}

{% content-ref url="/pages/NWHE4JQgbY6GLYsMK4qx" %}
[Platform](/manual/getting-started/installation/platform.md)
{% endcontent-ref %}

## Agent-based vs. Agentless

Datasentinel ships with a built-in **pool of internal agents** (functionally identical to the local agents installed in agent-based deployments).\
This pool is **dynamic**: it automatically scales up or down based on the number of monitored instances and the platform's backend configuration.

Whether you use **local agents**, **internal agents** (agentless), or **both** in a hybrid setup, the collected metrics are processed and displayed identically across the platform.

<table><thead><tr><th width="179">Criterion</th><th>Agent-based</th><th>Agentless</th></tr></thead><tbody><tr><td><strong>Collection method</strong></td><td>PUSH — the local agent pushes metrics to the platform</td><td>PULL — the platform connects remotely to clusters via internal agents</td></tr><tr><td><strong>Component to install</strong></td><td>One agent per server (one agent monitors multiple clusters on the same host)</td><td>Nothing to install on the database host</td></tr><tr><td><strong>Deployment effort</strong></td><td>Requires installation, startup configuration, and upgrades on each server</td><td>Configured centrally from the platform UI or Connection API</td></tr><tr><td><strong>Target environments</strong></td><td>Self-managed PostgreSQL clusters on physical or virtual servers (on-premises or cloud)</td><td>Agent-based environments<br>+<br>Cloud-managed and containerized PostgreSQL services.</td></tr><tr><td><strong>System / OS metrics</strong></td><td>Collected natively by the agent</td><td>Not collected by default — requires the <code>system_stats</code> extension installed on the cluster. Not available for managed services such as RDS where OS-level access is restricted</td></tr><tr><td><strong>Connectivity direction</strong></td><td>Agent → platform (outbound from the database host)</td><td>Platform → cluster (outbound from the platform to the database endpoint)</td></tr><tr><td><strong>Proxy support</strong></td><td>Supported — agents can be configured to route through a proxy</td><td>N/A — connections are issued from the platform</td></tr><tr><td><strong>Configuration interface</strong></td><td>Agent CLI and Agent API</td><td>Platform UI (<strong>Agentless settings</strong>) and Connection API</td></tr><tr><td><strong>Table / query monitoring limits</strong></td><td>Configurable per agent via CLI or API (defaults: 1000 tables, 15000 queries)</td><td>Configurable centrally since v2025.11;<br>applies to all agentless instances</td></tr><tr><td><strong>Upgrade scope</strong></td><td>Upgrade each agent independently from the platform</td><td>Upgrade the platform only — internal agents follow automatically</td></tr><tr><td><strong>Best suited for</strong></td><td><em><strong>On-premises and self-managed deployments requiring complete OS-level visibility</strong></em></td><td><em><strong>Large fleets where installing agents per host is impractical.</strong></em><br><em><strong>Cloud-managed databases, containerized environments, and</strong></em></td></tr></tbody></table>

## SaaS

With SaaS, Datasentinel hosts a dedicated machine, allowing users to access the software via the internet without the need for infrastructure or hardware investments.

[Agents](/manual/getting-started/installation/agent.md) need to be installed. The agents can be configured to use a proxy server if needed.

<figure><img src="/files/9q7HOni75fRn04bpQ7mS" alt=""><figcaption><p>SaaS Architecture</p></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.datasentinel.io/manual/getting-started/architecture.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
