Live / Historical Data#
Estimated time to read: 6 minutes
This document will provide a quick guide for the configuration of a mechanism that enables retrieving information from the events entering the system in real-time or to fetch historical data recorded in the past.
Overview#
Live data refers to computing data that remains relevant and observable in real-time. This type of data enables you to be proactive and take immediate action to prevent potential issues before they arise. With live data, you can respond with greater speed and accuracy to the dynamic needs of your industry, thus ensuring efficient and reliable operations.
Historical data, on the other hand, consists of collected information about past events and circumstances. This data provides valuable insights into trends, performance improvements, and long-term patterns, which helps you to better understand your business and its evolution over time.
Grafana excels at helping you access, process, and visualize both live and historical data. By combining real-time monitoring with historical analysis, you can gain a comprehensive understanding of your operations and this will help you plan effectively for the future.
Visualizations Available in Grafana for Data Monitoring#
Grafana offers a wide variety of visualization options to help you monitor live and historical data effectively:
-
Time Series Graphs
- Ideal for live data, time series graphs allow you to monitor metrics like production rates, temperature changes, or equipment performance in real-time. These graphs are highly interactive, and have features such as zooming, panning, and live data streaming.
-
Bar Charts
- Useful for comparing categorical data or summarizing trends in historical data, bar charts provide clear visual comparisons between different time periods, production lines, or other categories.
-
Heatmaps
- Visualize data density or intensity over time, thus helping you spot anomalies or patterns in operational data. Heatmaps are particularly effective for identifying bottlenecks or irregularities in production processes.
-
Gauge Panels
- Monitor KPIs (Key Performance Indicators) such as utilization rates, energy consumption, or defect ratios with visually appealing gauges. These panels provide at-a-glance updates for critical metrics.
-
Tables
- Display raw data or aggregated summaries in tabular format for precise analysis. Tables are a great way to show details like production logs or historical records alongside graphical data.
-
Pie Charts
- Represent data as portions of a whole, ideal for visualizing proportional metrics such as resource allocation or defect distribution.
-
Alerts and Threshold Indicators
- Overlay alerts or thresholds on any visualization to provide instant feedback on whether metrics exceed defined limits, thus ensuring timely responses to potential issues.
-
Scatter Plots
- Useful for identifying correlations between two variables, scatter plots are particularly helpful for analyzing relationships between production rates and energy consumption, or temperature changes and defect rates.
-
Line Charts
- Display trends over time, making them ideal for monitoring production rates, energy consumption, or temperature changes. Line charts are highly customizable, thus allowing you to highlight specific periods or events.
These are a just a few visualization options that can help you boost your dashboards look and feel.
For further information on the available visualizations, visit the Grafana Sandbox ⧉.
Setting Up Live Data / Historical Data#
To be able to use the Live Data / Historical Data feature, it is necessary to follow the steps below:
Step 1: Configure and IoT Event Definition#
-
Define the Events — ensure an IoT Event is configured to generate real-time event data.
-
Identify the metrics you want to monitor (e.g., equipment status, production rates, or environmental conditions).
-
Ensure Data is being stored in a data set — check that your IoT event data is stored in our MES Data Sets. To do so, you need to enable this feature during the IoT Event creation, in the IoT Event Definition wizard. For more information, see Create IoT Event Definition.
-
Set Up Alerts (optional) — you can set up an IoT workflow, and configure thresholds for critical metrics to receive in MES or define alert notifications directly in Grafana.
Step 2: Create a Dashboard#
-
To open Grafana in Critical Manufacturing MES, select the Data Platform menu, followed by the Data Manager tile, and navigate to the Dashboards section:
-
Select + New Dashboard.
-
Add a panel to your dashboard:
- Choose Add a New Panel and select the type of visualization you want (e.g., time series, table, or gauge).
- Name the panel based on the data it will display (e.g., Live Production Data or Historical Performance Trends).
-
Save the dashboard for later use.
Step 3: Configure Data Source#
Navigate to Configuration > Data Sources in the Grafana menu.
-
Select Add data source and choose Data Manager.
-
For live and historical data, the most appropriate query ops would be
Get metric valueto post the last value received and theGet Metric history. -
Define the metrics you may want to monitor (e.g., equipment status, production rates, or environmental conditions).
Step 4: Configure the Update Interval#
As the data is being collected in real-time from the IoT Event, we can configure the update interval in Grafana Dashboard, accordingly. Here is how:
- Return to the dashboard you created in Step 1.
-
In the Refresh button next to the timeframe selector, configure the update interval to control how frequently the dashboard refreshes itself:
- For real-time data, set a shorter interval (e.g., 5-10 seconds).
- For historical data, you can choose longer periods to reduce the load.
Step 5: Save and Share#
- Save your completed dashboard.
- Share the dashboard with your team by generating a shareable link or exporting it as a JSON file.
- Use the dashboard to monitor your live and historical data, and make adjustments as needed to fit your workflow.
By following these steps, you will have a fully functional Grafana dashboard that displays both live and historical data, thus enabling you to make data-driven decisions with ease.
