OpenObserve Grafana Plugin
What is Grafana?
Grafana is a popular open-source dashboarding and visualization platform. Originally designed for time series data, it has evolved into a comprehensive tool that can pull data from multiple sources and create unified dashboards for logs, metrics, and traces. It's widely used for monitoring and observability across organizations.
Do You Need Grafana with OpenObserve?
Short Answer: No, but you might want it.
OpenObserve comes with a powerful built-in GUI that handles all your visualization needs, including:
- Logs analysis and search
- Metrics monitoring
- Distributed tracing
- Frontend monitoring
- Interactive dashboards
- Alerting and notifications
When to Use the Grafana Plugin:
You should consider using OpenObserve's Grafana plugin if you:
- Already use Grafana for other monitoring needs (e.g., Prometheus metrics)
- Have existing Grafana dashboards you want to keep
- Need to consolidate OpenObserve data with other data sources in a single Grafana instance
Plugin Maintenance Status
This Grafana plugin is not actively maintained. It may work with current Grafana and OpenObserve versions, but compatibility isn’t guaranteed. Test thoroughly before production use. For best results, use OpenObserve’s built-in visualizations.
Getting Started
The following guide will walk you through installing and configuring the plugin in a Kubernetes environment. The steps can be adapted for non-Kubernetes deployments.
Quick Start: If you are already familiar with grafana plugin installation, you can download the plugin from here and get started. Feel free to skip the configuration section, you can directly jump here
Install Grafana
Grafana requires a persistent store to store its data and configuration. While configuration can be stored in a configmap or secret, data needs to be stored in a database. Grafana supports sqlite, mysql and postgres. Most installations I have seen in the wild use a single node grafana installation using sqlite. I have also seen that many of these use a kubernetes deployment
.
If you are using a single node grafana installation using sqlite then you should use statefulset
instead of deployment
so you do not lose your data when the pod restarts. If you are using mysql/postgres then you can use deployment
as the data is stored in the database.
You would also need a grafana.ini
config file to configure grafana. You can use the below minimalistic working grafana.ini file to start. You can add more configuration as needed.
Configuration
grafana.ini | |
---|---|
Line 4
should be updated with the root url of your grafana installation. This is the url that you will use to access grafana. e.g. https://grafana.yourdomain.com
Line 9
is the one that is important where we specify that grafana should use the unsigned plugin zinclabs_openobserve
. This is the plugin that we will install using the init container in the statefulset.
Once you have created the file, you can create a kubernetes secret using the below command.
Deployment
Now let's install grafana.
We are using an init container
in this case to download and configure openobserve plugin for the grafana container.
Now let's install the statefulset using the below command.
Using Grafana plugin
Set up data source
Once grafana starts you could go to the data sources section and search for OpenObserve
Next let's add OpenObserve data source server details.
You need to do following:
- Update URL
- Enable Basic Auth
- Provide user id and password for basic auth details.
Once you have updated the above, click on Save and Test
button. If everything is correct you should see a success message.
Explore logs
Now let's explore some logs. Click on Explore menu item on the left and select OpenObserve as the data source.
Select appropriate: 1. organization 1. stream 1. time range
and click on Run Query
button. You should see the logs from the stream.
You should now be able to see the results.
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.