Day 76: Build your own Grafana Dashboard.

Day 76: Build your own Grafana Dashboard.

What is Grafana Dashboard?

  • A Grafana dashboard is a web-based visualization tool that allows you to visualize data from a variety of sources, including metrics, logs, and traces. Dashboards are made up of panels, which are individual visualizations that display data in different ways, such as graphs, charts, and tables.

  • Grafana dashboards are highly customizable, and you can use them to create dashboards that meet your specific needs. For example, you can create dashboards to monitor your infrastructure, track your application performance, or analyze your business data.

Why do we need Grafana Dashboard?

  • Easy to use: Grafana dashboards are easy to create and use, even for users with no prior experience with data visualization.

  • Powerful: Grafana dashboards offer a wide range of features and functionality, including the ability to create complex visualizations, drill down into data, and set alerts.

  • Flexible: Grafana dashboards can be used to visualize data from a variety of sources, including metrics, logs, and traces.

  • Open source: Grafana is an open-source project, which means that it is free to use and modify.

Dashboard Components

screenshot-dashboard-annotated-9-5-0

  1. Grafana Home: Click Home to return to the Grafana home page.

  2. Dashboard Name: The name of the dashboard and current folder.

  3. Shared Dashboard: Click the Share icon to share the dashboard with other users.

  4. Add Panel: Click the Add Panel icon to add a new panel to the dashboard.

  5. Save Dashboard: Click the Save icon to save the dashboard.

  6. Dashboard Insights: Click the Insights icon to view insights for the dashboard.

  7. Dashboard Settings: Click the Settings icon to view and edit the dashboard settings.

  8. Time Picker: Use the time picker to select the time range for the dashboard.

  9. Zoom Out time range: Click the Zoom Out icon to zoom out the time range.

  10. Refresh Dashboard: Click the Refresh icon to refresh the dashboard.

  11. Refresh Dashboard Time Interval: Click the Refresh icon to set the refresh interval for the dashboard.

  12. View Mode: Click the View icon to switch to view mode.

  13. Dashboard Panels: The panels that make up the dashboard and display the data.

  14. Graph Legend: The legend for the graph panel that displays the name of each time series.

  15. Dashboard Row: The row that contains the panels that make up the dashboard.

Task: Build your own Grafana Dashboard.

  • Before building the Grafana Dashboard, we need to install the Grafana in our system or on the cloud.

  • For detailed installation steps, please visit my Day 73 Blog for complete steps on how to Install Grafana on AWS EC2.

  • Blog Link: Grafana Installation on AWS EC2 Instance

  • After installing Grafana, we need to configure Grafana Loki and Promtail to collect the logs from the system which I have already explained in my Day 75 Blog.

  • Blog Link: Grafana Loki and Promtail Setup

Let's create a Nginx & Docker Visualization in the Grafana Dashboard.

  • Step-01: Install Nginx on EC2 Instance.
sudo apt-get install nginx -y

Screenshot from 2023-11-07 23-32-14

  • Step-02: Click on Add Visualizations and then select the varlogs and then click on the Operation and the select Rate Count and then click on Apply.

  • Thus it show how many times Nginx is called in the last hour.

Screenshot from 2023-11-07 23-33-45

  • Step-03: So Now we will add this Nginx logs to Visualization.

Screenshot from 2023-11-07 23-43-46

  • Step-04: Now if we want logs from Docker.So do the similar steps as we did for Nginx.Thus we have Docker logs to Visualization.

Screenshot from 2023-11-07 23-46-04

  • Step-05: See the Dashboard of Grafana Loki which have varlogs, Nginx and Docker logs.

imageedit_10_2478461824


Thank You !!!

Did you find this article valuable?

Support Rohit Rajput by becoming a sponsor. Any amount is appreciated!