# 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="https://1072624949-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlcWi6G1jtNuyGT9C0pkc%2Fuploads%2FnR3p6I72VzW2un8iZTo1%2Farchitecture.png?alt=media&#x26;token=a84cae44-b487-4699-a825-320b4deed505" alt=""><figcaption><p>Datasentinel Backend Components</p></figcaption></figure>

### **PostgreSQL Clusters**

Prerequisites for Monitored [PostgreSQL Clusters](https://docs.datasentinel.io/manual/getting-started/postgresql-clusters):

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

## On-premises

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

<figure><img src="https://1072624949-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlcWi6G1jtNuyGT9C0pkc%2Fuploads%2FqwtQXKtMGARCzHOpUE8C%2Fon-premises.png?alt=media&#x26;token=92abc9f1-7235-4a1a-8a32-6436d6970322" 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="installation/platform" %}
[platform](https://docs.datasentinel.io/manual/getting-started/installation/platform)
{% endcontent-ref %}

## 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](https://docs.datasentinel.io/manual/getting-started/installation/agent) need to be installed. The agents can be configured to use a proxy server if needed.

<figure><img src="https://1072624949-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlcWi6G1jtNuyGT9C0pkc%2Fuploads%2FtcnwJGZmFvXJLRjfddt2%2Fsaas-architecture.png?alt=media&#x26;token=cbf06116-d33e-460b-b876-27a48d65f894" 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.
