OpenObserve Plugin for Grafana
This guide walks you through installing and configuring the openobserve plugin in Grafana within a Kubernetes environment. If you are not using Kubernetes, you can adapt these steps for your environment.
Overview
Grafana is an open-source platform for creating dashboards and visualizations. OpenObserve provides its own interface for logs, metrics, tracing, frontend monitoring, dashboards, and alerting and notifications.
The OpenObserve plugin for Grafana is an optional integration. It enables OpenObserve to be added as a Grafana data source, making it possible to use existing Grafana dashboards or combine OpenObserve data with other monitoring systems.
Plugin maintenance status
OpenObserve actively maintains this Grafana plugin.
Quick start
If you are familiar with the Grafana plugin installation process, proceed to download the plugin from here and move to this step.
Install the OpenObserve plugin in Grafana
Prerequisite
Storage Requirements
Grafana requires persistent storage for two things: configuration and data.
- Configuration can be stored in a ConfigMap or Secret.
- Data must be stored in a database. Grafana supports SQLite, MySQL, and PostgreSQL. Most Grafana installations run on a single node with SQLite.
Deployment method
In Kubernetes, you deploy applications using either a Deployment or StatefulSet. Since Grafana needs persistent storage for its data, your choice depends on which database you use:
- SQLite stores data files inside the pod itself. Use a
StatefulSet
to preserve this data when the pod restarts. - MySQL or PostgreSQL store data in an external database. Use a
Deployment
since the data persists outside the pod.
Note
This guide uses a StatefulSet with SQLite.
Step 1: Create the configuration file
Create a grafana.ini
file with the following configurations.
grafana.ini | |
---|---|
Important:
- In
Line 4
, you must update theroot_url
with the root URL of your Grafana installation. This is the URL that you will use to access grafana. For example,https://grafana.yourdomain.com
. - In
Line 9
, you must specify that Grafana should use the unsigned pluginopenobserve
.You will install this plugin using theinit container
in thestatefulset
.
Step 2: Create a Kubernetes secret
Once you have created the file, you can create a Kubernetes secret using the below command.
Step 3: Create grafana_statefulset.yaml
This file includes an init container that downloads and configures the openobserve
plugin for the Grafana container.
Step 4: Deploy the openobserve
plugin
Run the following kubectl apply
command to deploy the plugin:
Use the OpenObserve plugin in Grafana
Step 1: Set up data source
From the Grafana interface, go to the Data Sources section and search for openobserve
.
Step 2: Add OpenObserve data source server details
-
In the data source configuration screen, update the following fields:
- In the HTTP section, add the URL.
- In the Auth section, enable Basic Auth toggle.
- Under Basic Auth Details, add the User ID and password.
-
Click Save and Test to save the changes.
If everything is correct you should see a success message.
Step 3: Explore logs
- Click the Explore menu and select
openobserve
as the data source. - Select appropriate organization, stream, and time range.
- Click Run Query.
You should now be able to see the results.
Note
If you want to explore metrics from OpenObserve in Grafana, you can set up OpenObserve as a Prometheus-compatible data source using an endpoint like https://api.openobserve.ai/api/org_name/prometheus. You do not need the plugin for this, as Grafana supports Prometheus natively.