tachOrg / Real-Time-Data-Processing-Application

0 stars 0 forks source link

Display Data on grafana Spike #16

Closed tacho090 closed 1 year ago

tacho090 commented 1 year ago

EC2 t2.micro install grafana and import dynamodb data to grafana

(Spike) how to link DynamoDB table to grafana?

Objective: Visualize dynamodb data in grafana

XrosHeart05 commented 1 year ago

The issue is taken up and started

XrosHeart05 commented 1 year ago

[NEED TO UPDATE]

Currently there is no direct connection from DynamoDB to Grafana; however, there are some options with which such a connection can be established by means of a "bridge". Next I will detail the valid options as of today (15/Jun/2023) that I have been able to find to establish such a connection:

  1. AWS AppSync - GraphQL: I will start with what we believe is the best solution to this problem. AWS AppSync allows the creation of an API on which you can make use of GraphQL and expose it through an endpoint, with this we can establish the connection with Grafana through the GraphQL Data Source plugin (Dependency with Grafana 7.0.0 or higher versions). For this option I will detail the steps to follow:

Mandatory and Dependent:

Only mandatory:

Notes about AWS AppSync:

AWS AppSync as of today (15/Jun/2023; this may change in the future) offers during the first year up to 450 000 monthly requests without charge (read more details about the prices in this link); the costs may go up depending on the use of this; it is very important to take this detail into consideration as it depends on the budget of each person/entity this will suppose if it is a good option or not.

Setup Schema

In AWS AppSync you'll need to setup the 'Schema' or 'Schemas' needed to expose the data (Is very important define the right data type of the "columns"; more info in docs GraphQL, because some graphs can only be displayed if data type in the right type, ex. height: 86.4; this must be 'Float' type instead 'String' type).

DataSource Setup

A name related to the operations you are going to perform with this connection is recommended.

Grafana Dashboard Setup -- UPDATE --

  1. Rockset: Using the Rockset tool, it is possible to establish a connection with Grafana; in the following link the steps to follow to establish this connection are detailed.

  2. InfluxDB: To make use of a connection through InfluxDB, an EC2 instance needs to be configured; once it is configured, its URL and connection port can be used to configure it in Grafana. However, there is a problem and that is that you cannot use DynamoDB; you must pass the data to another table, for example with AWS Glue. To transfer data from DynamoDB, a Job must be generated to perform this task (ETL). Once you have the data in the other table, you can generate the connection in Grafana through InfluxDB.

XrosHeart05 commented 1 year ago

Actually displaying data in Grafana imagen

tacho090 commented 1 year ago

data is displayed