> For the complete documentation index, see [llms.txt](https://docs.openg2p.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.openg2p.org/1.2/deployment/openg2p-modules-deployment/reporting-deployment.md).

# Reporting Deployment

## Introduction

There are two models of generating Reporting and visualizing dashboards in OpenG2P currently. One is through [Apache Superset](https://superset.apache.org/) (which performs direct SQL queries on the Database to generate reports). Second is through [reporting framework](https://github.com/openg2p/openg2p-reporting), extended from MOSIP (which replicates all the data into OpenSearch in real-time). Weigh the pros and cons of both approaches here, before choosing one model.

TODO

## Installation of Apache Superset

### Prerequisites

* [PostgreSQL](/1.2/deployment/external-components-setup/postgresql-server.md)
* [Keycloak](/1.2/deployment/external-components-setup/keycloak-deployment.md) for Authentication and Sign-in to OpenSearch Dashboards

### Installation

* Clone the <https://github.com/openg2p/openg2p-deployment> repo and navigate to [kubernetes/superset](https://github.com/OpenG2P/openg2p-deployment/tree/main/kubernetes/superset) directory.
* Run:

  ```bash
  SANDBOX_HOSTNAME=openg2p.sandbox.net \
      ./install.sh
  ```

### Post-installation

After installation is successful, Superset can be accessed at <https://superset.openg2p.sandbox.net>, depending on the hostname given above.

Import [pre-configured dashboards](https://github.com/OpenG2P/openg2p-deployment/tree/main/kubernetes/superset/dashboards) via Superet's console. During import provide password `postgres` user.

Follow the instructions given here to install pre-configured [dashboards](https://github.com/OpenG2P/openg2p-deployment/tree/main/kubernetes/superset/dashboards).

## Installation of Reporting Framework

### Prerequisites

* [PostgreSQL](/1.2/deployment/external-components-setup/postgresql-server.md)
* [Kafka](/1.2/deployment/external-components-setup/kafka-deployment.md)
* [Keycloak](/1.2/deployment/external-components-setup/keycloak-deployment.md) for Authentication and Sign-in to OpenSearch Dashboards
* [OpenSearch](/1.2/deployment/external-components-setup/logging-and-opensearch-deployment.md)

### Installation

* Clone the <https://github.com/openg2p/openg2p-reporting> repository, and navigate to [scripts](https://github.com/openg2p/openg2p-reporting/tree/develop/scripts) folder.
* Run:

  ```bash
  SANDBOX_HOSTNAME=openg2p.sandbox.net \
      ./install.sh
  ```

### Post-installation

* Import Sample Dashboards from the [dashboards](https://github.com/openg2p/openg2p-reporting/tree/develop/dashboards) folder into OpenSearch Dashboards through UI.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.openg2p.org/1.2/deployment/openg2p-modules-deployment/reporting-deployment.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
