Grafana is an open source data visualization and monitoring platform that enables users to build interactive and real-time dashboards. To extend Grafana’s capabilities for streaming analytics, SAS provides an open source extension called the SAS Event Stream Processing (ESP) Data Source Plug-in for Grafana. This plug-in allows Grafana users to connect directly to a running SAS ESP model or project and visualize event streams as they are produced. The integration is designed to operate within a Kubernetes environment, where both SAS ESP and Grafana are deployed, ensuring secure communication, streamlined discovery of ESP resources, and seamless real-time data rendering inside Grafana dashboards.
In this post, I explore how to use the SAS Event Stream Processing (ESP) Data Source Plug-in for Grafana and demonstrate how it enables real-time visualization of streaming data within Grafana dashboards.
Prerequisites:
Before configuring and using the SAS Event Stream Processing (ESP) Data Source Plug-in for Grafana, ensure the following requirements are in place.
The SAS ESP plug-in for Grafana can be downloaded and deployed in your Grafana environment from the official open source repository on GitHub: grafana-esp-plugin. Once the plug-in is installed, Grafana automatically adds SAS Event Stream Processing as an available data source type. From the Grafana data source configuration window, you can then select and configure the SAS ESP data source to establish a connection to your ESP environment and begin visualizing real-time streaming data.
Select any image to see a larger version.
Mobile users: To view the images, select the "Full" version at the bottom of the page.
While configuring the SAS ESP data source in Grafana, users have several options for establishing a connection to the SAS ESP environment.
If your deployment uses a self-signed certificate, you can enable the “Do not use TLS certificate validation (Not recommended)” option. This setting should only be used in non-production or testing environments, as it bypasses standard security checks.
To connect to an ESP server, Grafana relies on a discovery service provided by SAS ESP Studio and SAS Event Stream Manager. When Grafana is deployed in the same Kubernetes namespace as SAS ESP Studio and SAS Event Stream Manager, you can select the “Internal” Discovery Service option from the drop-down list.
With the Internal discovery option selected, an additional drop-down menu allows you to choose SAS ESP Studio or SAS Event Stream Manager as the discovery source. By default, TLS is enabled for secure communication; however, if your ESP deployment does not use TLS, you may uncheck this option.
You may also choose to enable OAuth token forwarding. When this option is selected, Grafana forwards the user’s OAuth token to the discovery service—useful when the SAS ESP environment relies on OAuth-based authentication.
If Grafana is deployed in a separate Kubernetes namespace from SAS ESP Studio or SAS Event Stream Manager, you can choose the “URL” Discovery Service option from the drop-down list. When using the URL-based discovery method, you must provide the discovery service URL generated by either SAS ESP Studio or SAS Event Stream Manager. If the discovery service relies on OAuth authentication, you may also enable the OAuth token option. When selected, Grafana will forward the user’s OAuth token directly to the discovery service, ensuring proper authentication during the lookup process.
With the SAS ESP data source configured in Grafana, you can connect directly to a running SAS ESP model or project. The ESP model or project must be in an active running state before Grafana can successfully establish the connection.
In the Grafana dashboard editor, under the Data source section, you will be able to select the pre-configured SAS ESP data source. Once selected—and with the ESP model or project running—the Query panel will allow you to choose the ESP model/project, the ESP continuous query, the specific ESP window, and the individual data fields within that window. These selections form the basis of your real-time data feed into the Grafana dashboard, enabling you to design visualizations that reflect live streaming data.
The Grafana editor’s query configuration serves as the key connection point between the SAS ESP model or project and the Grafana dashboard. Once the ESP streaming data is successfully linked to Grafana, you can begin designing visualizations that best meet your requirements. This includes selecting the appropriate panels, applying transformations, and arranging dashboard elements to present real-time insights effectively.
Important Links:
SAS Event Stream Processing Data Source Plug-in for Grafana
Find more articles from SAS Global Enablement and Learning here.
Dive into keynotes, announcements and breakthroughs on demand.
Explore Now →The rapid growth of AI technologies is driving an AI skills gap and demand for AI talent. Ready to grow your AI literacy? SAS offers free ways to get started for beginners, business leaders, and analytics professionals of all skill levels. Your future self will thank you.