Get started with Oracle on Grafana Cloud
This guide walks you through connecting your Oracle Database to Grafana Cloud and visualizing your first query. The entire process takes under 10 minutes.
Prerequisites
Before you begin, ensure you have:
- A Grafana Cloud Pro or Advanced plan.
- An Oracle Database instance.
- A database user with
SELECTpermissions on the tables you want to query. Refer to Create a least-privilege database user for setup instructions. - If your database is on a private network: A Linux host in the same network to run the PDC agent.
Step 1: Install the plugin
- In your Grafana Cloud instance, navigate to Administration > Plugins and data > Plugins.
- Search for Oracle.
- Click Install.
The plugin is ready to use immediately after installation.
Step 2: Connect to a private database (optional)
Note
Skip this step if your Oracle Database has a public IP address that Grafana Cloud can reach directly.
If your Oracle Database is behind a firewall or on a private network, set up Private data source connect (PDC) to create a secure tunnel:
Navigate to Connections > Private data source connect.
Click Add new network and follow the setup wizard.
Install the PDC agent on a host in the same network as your Oracle Database:
curl -sL https://raw.githubusercontent.com/grafana/pdc-agent/main/production/install.sh | bashStart the agent and verify it shows a Connected status in the Grafana Cloud UI.
Confirm the agent host can reach your Oracle Database:
nc -zv <oracle-host> 1521.
For detailed instructions, refer to Configure Private data source connect.
Step 3: Configure the data source
Navigate to Connections > Add new connection.
Search for Oracle Database and select it.
Click Add new data source.
Fill in the connection settings:
If you set up PDC in Step 2, select your PDC network from the Private data source connect dropdown.
Click Save & test.
On success, you’ll see a message like: Success: Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production.
If the connection fails, refer to Troubleshoot connection errors.
Step 4: Write your first query
Navigate to Explore in the left-side menu.
Select your new Oracle data source from the dropdown.
Paste the following query to verify connectivity and see active sessions:
SELECT status, COUNT(*) AS session_count FROM V$SESSION WHERE username IS NOT NULL GROUP BY statusClick Run query. You should see a table with session statuses and counts.
Try a time-series query to see data on a graph:
SELECT
$__timeGroup(begin_time, '5m') AS time,
metric_name AS metric,
ROUND(average, 2) AS value
FROM V$SYSMETRIC_HISTORY
WHERE $__timeFilter(begin_time)
AND metric_name = 'CPU Usage Per Sec'
GROUP BY $__timeGroup(begin_time, '5m'), metric_name, ROUND(average, 2)
ORDER BY timeSet the Format as dropdown to Time series to see the result as a graph.
Step 5: Build a dashboard
- Click + > New dashboard > Add visualization.
- Select your Oracle data source.
- Paste a time-series query (like the CPU example above).
- Choose a visualization type (Time series, Stat, Gauge, or Table).
- Click Apply to add the panel.
- Repeat for additional panels, then click Save dashboard.
Starter panels to consider:
Next steps
- Oracle query editor—macros, data types, and advanced query patterns.
- Template variables—create dynamic dashboards with drop-down filters.
- Annotations—overlay deployment or event markers on your graphs.
- Alerting—get notified when metrics cross thresholds.
- Troubleshooting—solutions for common issues.


