# Reporting Framework

The Reporting Framework is an infrastructure to make database data available in searchable indexes for efficient slicing and dicing of data and real-time monitoring with visualization and reports. The framework utilizes open-source components to achieve this data pipeline and visualization capabilities.

<figure><img src="https://3034178245-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJZcdob2emEcLMvLyIxqT%2Fuploads%2Fo6KZnXVtZ2AaXf3PLr57%2FReporting%20Framework.jpg?alt=media&#x26;token=8c340f0c-668c-48b6-9eab-eafbfe735265" alt=""><figcaption></figcaption></figure>

Postgres WAL contains events on the database, specifically, changes to any table fields. These events are read by Debezium and pushed to Kafka Topics. Using a connector the fields are further pushed into OpenSearch indexes. These indexes may be searched by APIs or consumed by OpenSearch Dashboards for visualization.

The salient features of the framework are the following:

<table><thead><tr><th width="323">Features</th><th>Benefits</th></tr></thead><tbody><tr><td>Searchable indexes in OpenSearch</td><td><ul><li><strong>No load on main DB</strong> esp when dataset is large and SQL queries get complex</li><li><strong>Real-time slicing and dicing</strong> of data with searchable indexes</li></ul></td></tr><tr><td>OpenSearch Dashboards</td><td><ul><li><strong>Ease</strong> of creation of dashboards and reports</li></ul></td></tr><tr><td>Authentication and authorisation using Keycloak</td><td><ul><li><strong>Authorized access</strong> to dashboards</li><li><strong>Single sign-on</strong> with Keycloak</li></ul></td></tr><tr><td>PII data not available for search*</td><td><ul><li><strong>Privacy protection</strong></li></ul></td></tr></tbody></table>

{% hint style="info" %}
\* As a highly recommended practice PII data is not shunted to the search indexe&#x73;*,* however, the framework does not impose any restriction as such.
{% endhint %}

## Installation

Refer to [Installation Guide and Post Installation Check](https://docs.openg2p.org/platform/platform-services/monitoring-and-reporting/reporting-framework/user-guides/installation-and-troubleshooting).

## Accessing OpenSearch dashboards

* Pick the URL provided during the installation of the Helm chart of the module (like SR, PBMS)
* Add Keycloak roles to the user who is accessing the dashboard (as given [here](https://docs.openg2p.org/platform/platform-services/monitoring-and-reporting/user-guides/installation-and-troubleshooting#assigning-roles-to-users)).
* Confirm that the number of indexed records in OpenSearch matches the number of rows in the DB (*guide TBD*). This check confirms that the reporting pipeline is working fine.

## Creating dashboards

* [Create connectors](https://docs.openg2p.org/platform/platform-services/monitoring-and-reporting/reporting-framework/user-guides/connector-creation-guide).
* [Create Dashboards](https://docs.openg2p.org/platform/platform-services/monitoring-and-reporting/reporting-framework/user-guides/dashboards-creation-guide).


---

# 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.openg2p.org/platform/platform-services/monitoring-and-reporting/reporting-framework.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.
