Predictive Intelligence via the Ertis What-If Panel and Advanced Grafana Data Orchestration

The integration of predictive analytics into observability platforms represents a fundamental shift from reactive monitoring to proactive forecasting. Within the Grafana ecosystem, this capability is significantly extended by the Ertis What-Im Panel, a specialized tool designed for conducting What-If predictive analysis. By leveraging Artificial Intelligence (AI) and Machine Learning (ML) models, this panel allows engineers and data scientists to simulate various scenarios by manipulating numeric data fields. This process is not merely about viewing historical trends but about interacting with models that receive specific numeric inputs via HTTP requests to generate future-state predictions. The utility of such a system lies in its ability to take existing telemetry—metrics, logs, or traces—and subject them to algorithmic scrutiny to determine the impact of potential changes in infrastructure or application behavior.

The core architecture of this functionality relies on the seamless connection between Grafana's data source layer and the external AI/ML inference engine. While Grafana traditionally serves as a visualization layer for storage backends like Prometheus, Loki, or SQL databases, the introduction of the What-If panel transforms the dashboard into an interactive simulation environment. This environment supports the loading of data directly from configured sources, the manual modification of values through defined intervals, and the subsequent visualization of model outputs through interactive, responsive graphs. The implications for site reliability engineering (SRE) are profound; instead of waiting for a breach of a Service Level Objective (

The complexity of implementing such advanced features requires a deep understanding of both the plugin's deployment lifecycle and the underlying Grafana configuration. From managing unsigned plugin permissions in the grafana.ini file to orchestrating deployments via Helm in Kubernetes environments, the technical overhead involves precise configuration of the Grafana backend and the management of data source connectivity.

Implementation of the Ertis What-If Plugin

The deployment of the ertis-whatif-panel requires specific administrative actions to ensure the Grafana instance recognizes and executes the unsigned code. Because this plugin is not pre-signed by Grafana, the security configuration of the host instance must be explicitly altered to permit its execution.

The installation process varies depending on the deployment architecture, whether it be a local bare-metal installation or a containerized Helm-based deployment.

For local installations, the following procedure is mandatory:

  1. Download the latest release of the plugin in its compressed ZIP format.
  2. Locate the Grafiana plugins directory, which defaults to /var/lib/grafana/plugins on most Linux distributions.
  3. Extract the contents of the ZIP file directly into this directory, ensuring that the resulting folder structure is ertis-whatif-panel and does not contain any redundant parent folders.
  4. Locate the grafana.ini configuration file on the host system.
  5. Modify the [plugins] section to include the plugin identifier in the allow_loading_unsigned_plugins list.
  6. Restart the Grafana service to initialize the new plugin.

The configuration syntax within the grafana.ini file must be precise:

```ini
[plugins]

Enter a comma-separated list of plugin identifiers to identify plugins to load even if they are unsigned.

allowloadingunsigned_plugins = ertis-whatif-panel
```

In environments utilizing Kubernetes and the Helm package manager, the configuration is managed via a values.yaml file. This approach is critical for DevOps workflows where infrastructure is treated as code. To enable the plugin in a Helm deployment, the grafana.ini section of the values.yaml must be updated as follows:

yaml grafana.ini: plugins: allow_loading_unsigned_plugins: ertis-whatif-panel

After updating the values.yaml, the deployment must be synchronized with the cluster using the following command:

bash helm upgrade <your-release-name> grafana/grafana -f values.yaml

Following the upgrade, the administrator must verify the operational status of the Grafana pod to ensure the plugin has been successfully integrated into the running instance. This can be achieved by checking the pod status:

bash kubectl get pods

The pod must be in a Running and `

Development and Source Code Compilation

For organizations that require custom modifications to the predictive logic or the visualization components of the What-If panel, building from the source code is a necessary capability. This process requires a local development environment with Node.js and the Yarn package manager installed.

The development workflow is designed to be highly iterative, utilizing a hot-reloading mechanism that allows developers to see changes in real-time.

The steps for building the plugin from source are as follows:

  1. Clone the repository containing the plugin source code to your local machine.
  2. Navigate to the root directory of the project using the cd command.
  3. Execute the dependency installation command to pull all necessary Node modules.
  4. Initiate the development server to begin the compilation process.

The required terminal commands are:

bash yarn install yarn dev

The yarn dev command starts a process that watches for file changes. When a change is detected, the code is automatically recompiled. However, for these changes to manifest in the Grafana UI, the Grafana service itself must be restarted.

There are critical troubleshooting considerations during the development phase. If the plugin fails to appear in the dashboard, the grafana.tar.ini file must be inspected to ensure the app_mode option is explicitly set to development. Furthermore, if code updates do not appear to take effect despite a service restart, the issue is frequently rooted in the browser's aggressive caching of JavaScript assets. In such cases, clearing the browser cache or deleting the .cache folder within the node_modules directory of the plugin is a recommended corrective action.

Advanced Data Ingestion and Model Interaction

The operational utility of the What-If panel is defined by its five-step functional workflow, which governs how data is ingested, how models are selected, and how predictions are generated.

The workflow is structured as follows:

  1. Model Selection: The user must first select the specific AI/ML model intended for the predictive analysis. This model must be capable of receiving numeric fields via HTTP requests.
  2. Tag Identification: Once a model is selected, the panel automatically retrieves and displays the specific tags associated with that model.
  3. Data Collection Assignment: The user assigns data collections to the model. It is important to note that while multiple data collections can be loaded, they will all be processed using the same selected model.
  4. Data Input Methods: The panel supports diverse methods for populating the model with data, providing flexibility for different use cases.
  5. Result Visualization: The processed results are rendered through interactive graphs that respond to user interaction.

Data can be introduced into the model through three primary channels:

  • Manual Date and Time Selection: Users can define a specific temporal window for the analysis.
  • CSV Uploads: Users can upload structured comma-separated values to provide a static dataset for prediction.
  • Grafana Dashboard Variables: The panel can dynamically ingest data from existing dashboard variables, such as $from and $to time ranges, creating a seamless link between standard monitoring and predictive simulation.

When data is loaded via any of these methods, the panel creates a new entry in a drop-down menu, allowing users to switch between different datasets or temporal slices within the same dashboard. This capability is essential for comparing "what-if" scenarios across different time periods or configurations.

Data Source Orchestration and Querying

The effectiveness of the What-If panel is fundamentally dependent on the underlying Grafana data sources. A data source serves as the critical bridge between the visualization layer and the storage backend, where metrics, logs, traces, and profiles reside.

Grafana acts as a unified interface for a wide array of storage engines. The following table outlines common data source types and their primary functions:

Data Source Type Primary Use Case Data Structure
Prometheus Time-series monitoring Metrics and counters
Loki Log aggregation Log streams and labels
SQL Databases Relational data analysis Structured tables and rows
Tempo Distributed tracing Spans and traces
Grafana (Built-in) Testing and experimentation Random walk and file listing
Mixed Multi-source visualization Heterogeneous queries
Dashboard Cross-panel dependency Result sets from other panels

The "Mixed" data source is particularly powerful for complex troubleshooting, as it allows a single panel to execute queries against different backends simultaneously. For instance, an engineer could correlate a spike in Prometheus metrics with specific error logs in Loki within the same visual context.

Furthermore, the "Dashboard" data source introduces a layer of inter-panel dependency, where the output of one panel serves as the input for another, enabling sophisticated hierarchical data drilling.

For large-scale enterprise deployments, managing these data sources through the Grafana UI is often inefficient and prone to human error. Instead, professional environments utilize "Provisioning," where data sources are defined via YAML files or Terraform scripts. This allows for:

  • Version-controlled configuration of the observability stack.
  • Automated deployment of data sources alongside the infrastructure.
  • Consistent environment replication across development, staging, and production clusters.

While Grafana Cloud provides pre-configured, "ready-to-query" sources for Prometheus, Loki, and Tempo, the ability to develop custom data source plugins or utilize the "Dashboard" and "Mixed" abstractions ensures that the platform can scale to meet the needs of any emerging technology or proprietary storage backend.

Logic Limitations in Grafana Variables

A common challenge encountered by advanced users is the requirement for complex logic within Grafana variables. While the What-If panel allows for predictive manipulation of numeric data, the standard Grafana variable system has inherent limitations regarding conditional programming.

For example, a user may attempt to parse a variable, such as $cluster, and apply conditional logic to determine a string output based on a numeric threshold. A common requirement might look like this in pseudocode:

```javascript
function parseAndEvaluate($cluster) {
// Parse the variable to an integer
let parsedNumber = parseInt($cluster, 10);
let result;

// Use the result in an if-else statement
if (!isNaN(parsedNumber)) {
    if (parsedNumber > 50) {
        result = "The number is greater than 50.";
    } else {
        result = "The number is 50 or less.";
    }
} else {
    result = "The input is not a valid number.";
}
return result;

}
```

Currently, the native Grafana variable engine does not support the execution of arbitrary JavaScript functions or complex if-else logic directly within the variable definition. Variables are primarily designed for string manipulation, regex-based filtering, and simple query-based transformations. This limitation means that for highly complex conditional logic, engineers must often rely on intermediary transformations within the data source itself (e.g., using SQL CASE statements or Prometheus label_replace) or utilize specialized plugins like the Ertis What-If panel to handle the advanced algorithmic processing that standard variables cannot achieve.

Analysis of Predictive Observability Integration

The integration of the Ertis What-If panel into the Grafana ecosystem represents a significant evolution in the observability paradigm. By moving beyond the mere visualization of historical telemetry, this technology enables a "simulation-first" approach to system monitoring. The ability to ingest data via HTTP-compatible AI/ML models and manipulate that data through interactive UI elements bridges the gap between data science and DevOps.

However, the successful implementation of this technology is contingent upon rigorous configuration management. The necessity of handling unsigned plugins via allow_loading_unsigned_plugins introduces a security consideration that must be balanced against the need for advanced functionality. Furthermore, the reliance on complex data orchestration—ranging from Helm-based deployments to Terraform-driven data source provisioning—requires a high level of operational maturity.

The technical friction points, such as the lack of advanced logic in Grafana variables and the complexities of building plugins from source, are offset by the immense value provided by predictive capabilities. As organizations continue to adopt more complex microservices architectures and machine learning-driven automation, the ability to perform "What-If" analysis within the existing monitoring framework will become a standard requirement for maintaining high availability and system resilience. The future of observability lies not just in knowing what happened, but in understanding what might happen if specific parameters are altered, a capability that the Ertis What-If panel and advanced Grafana configuration techniques are uniquely positioned to provide.

Sources

  1. Ertis Research - Grafana What-If Panel
  2. Grafana Community - Code in Grafana Variables
  3. Grafana Documentation - Data Sources

Related Posts