# 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>
