# Sending data to Elasticsearch

> In this topic you can learn how to leverage the Insights real-time data export feature to send data to **ElasticSearch** and use it to populate real-time monitoring data into Kibana dashboard.

## Overview

In this topic you can learn how to leverage the Insights real-time data export feature to send data to **ElasticSearch** and use it to populate real-time monitoring data into Kibana dashboard.

## Prerequisites

Before you can start viewing real-time monitoring data in Kibana, the following hosts must be set up:

* [Set up an ElasticSearch host](https://docs.uipath.com/insights/automation-cloud/latest/user-guide/elasticsearch#setting-up-an-elasticsearch-host)
* [Set up a FileBeat host](https://docs.uipath.com/insights/automation-cloud/latest/user-guide/elasticsearch#setting-up-a-filebeat-host)

### Setting up an ElasticSearch Host

You can choose to host ElasticSearch yourself or to use the cloud option.

For more information, check the [official Elastic website](https://www.elastic.co/cloud/).

### Setting up a FileBeat Host

#### Overview

**FileBeat** is a tool used to gather data from a source (**EventHub** in this case) and send it into ElasticSearch.

#### Installation

You need to host your own FileBeat server.

To install FileBeat, first provision your hosts and follow the instructions from the [official Elastic website](https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-installation-configuration.html) for your operating system.

#### Configuration

To configure FileBeat, use the following instructions:

1. Open the `filebeat.yml` file.
2. Set up a connection to ElasticSearch:
   ```
   cloud.id: "cloud:YOUR_CLOUD_ID"
   cloud.auth: "USERNAME:YOUR_PASSWORD"
   ```

You can get your cloud ID from the **Deployments** tab in ElasticSearch.

![docs image](https://dev-assets.cms.uipath.com/assets/images/insights/insights-docs-image-161070-19b84dae-a11464a5.webp)
3. Go to the `filebeat.inputs` section in the `filebeat.yml` file.
4. Add your EventHub connection settings in the `filebeat.inputs` section.
   ```
   
   type: azure-eventhub
     enabled: true
     eventhub: <YOUR EVENTHUB>
     consumer_group: "filebeat"
     connection_string: <YOUR CONNECTION STRING>
     storage_account_key: <YOUR STORAGE ACCOUNT KEY>
     storage_account_container: ""
     resource_manager_endpoint: """
   
   ```
5. Go to the `processors` section in the `filebeat.yml` file.
6. Add the following lines in the `processors` section:
   ```
   
   decode_json_fields:
         fields: ["message"]
         process_array: false
         max_depth: 2
         target: ""
         overwrite_keys: false
         add_error_key: true
   
   ```

#### Starting up the FileBeat service

After you successfully installed and configured FileBeat, follow the procedure from the [official Elastic website](https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-installation-configuration.html#start) to start the service.

### View data in Kibana

To view your data in Kibana, use the following steps.

1. Open ElasticSearch.
2. Expand the **Analytics** category from the dashboard on the left.
3. Select **Discover**.

   ![Screenshot of the Discover button.](https://dev-assets.cms.uipath.com/assets/images/insights/insights-docs-image-159966-fbf40124-facc0c53.webp)
4. Set the data view to **filebeat-***.

   ![Screenshot of the filebeat-* data view.](https://dev-assets.cms.uipath.com/assets/images/insights/insights-docs-image-158376-cf7f0e08-c71da564.webp)

You can now view your data in Kibana.

   ![Screenshot of the data in Kibana.](https://dev-assets.cms.uipath.com/assets/images/insights/insights-docs-image-160108-6994e6f3-837797a4.webp)
