Important: This documentation is about an older version. It's relevant only to the release noted, many of the features and functions have been updated or replaced. Please view the current version.
Configure the Oracle data source
Grafana provides a number of configuration options for the Oracle data source. For general information on installing a data source, refer to Install Grafana plugins. For general information on adding a data source, refer to Add a data source.
Only users with the organization administrator
role can add data sources. Administrators can also configure the data source via YAML with Grafana’s provisioning system.
To install the Oracle plugin, refer to Installation on the Oracle plugin page.
Configure the data source
To add the Oracle data source, complete the following steps:
- Install the Oracle plugin.
- Click Connections in the left-side menu.
- Under Connections, click Add new connection.
- Enter Oracle in the search bar.
- Select Oracle Database under the Data Source section.
- Click Add new data source in the upper right.
You will be taken to the Settings tab where you will set up your Oracle configuration.
Configuration options
The following is a list configuration options for Oracle.
The first option to configure is the name of your connection:
Name - The data source name. This is how you refer to the data source in panels and queries. Examples: Oracle Database-1, Oracle-DB-Sales.
Default - Toggle to select as the default name in dashboard panels. When you go to a dashboard panel this will be the default selected data source.
Connection
You can connect to Oracle via 2 different connection methods, depending on whether you have an on-premise or cloud account.
Host with TCP Port - Connect with a hostname or IP address with the TCP port number.
Host - Hostname with IP address with TCP port number.
Database - Name of the database.
TNSNames Entry - Specify a tnsnames.ora entry for connection. Note that this is not available in Grafana Cloud.
- TNSName - The configuration connection specified in the tnsnames.ora file.
Authentication
There are several authentication methods you can choose in the Authentication section. Authentication methods depend on your connection method.
You can select the following authentication methods from the dropdown menu.
Basic authentication -The only authentication available with the Host with TCP Port connection method. Authenticate with a username and password.
User - The Oracle username with access to the specified database.
Password - The Oracle password with access to the specified database.
Kerberos Authentication - Kerberos authentication only works with TNSNames enabled, and must be configured in the tnsnames.ora configuration file. Refer to Kerberos integration for configuration parameters. Follow Oracle’s documentation Configuring Kerberos Authentication to integrate Oracle with Kerberos.
Note
Kerberos authentication isn’t supported in Grafana Cloud.
Private data source connect (PDC) and Oracle Database
Use private data source connect (PDC) to connect to and query data within a secure network without opening that network to inbound traffic from Grafana Cloud. Refer to Private data source connect for more information on how PDC works and Configure Grafana private data source connect (PDC) for steps on setting up a PDC connection.
- Private data source connect - Click in the box to set the default PDC connection from the dropdown menu or create a new connection.
Once you have configured your Oracle data source options, click Save & test at the bottom to test out your data source connection. You can also remove a connection by clicking Delete.
Configure the data source with provisioning
You can define and configure the Oracle data source in YAML files as part of Grafana’s provisioning system. For more information about provisioning a data source, and for available configuration options, refer to Provision Grafana.
The following are provisioning examples for the Oracle data source.
TNSNames enabled with basic auth:
apiVersion: 1
datasources:
- name: Oracle (TNS-BASICAUTH)
type: grafana-oracle-datasource
access: proxy
basicAuth: false
editable: true
jsonData:
timezone_name: UTC
useKerberosAuthentication: false
useTNSNamesBasedConnection: true
user: USERNAME
secureJsonData:
password: PASSWORD
url: TNSNAME
version: 1
TNSNames disabled with basic auth:
apiVersion: 1
datasources:
- name: Oracle (Integration)
type: grafana-oracle-datasource
access: proxy
basicAuth: false
editable: true
jsonData:
database: DATABASE
user: USERNAME
secureJsonData:
password: PASSWORD
url: HOST
version: 1
Environment variables
Note
This feature isn’t supported in Grafana Cloud.
You can set GF_PLUGINS_ORACLE_DATASOURCE_MAX_RESPONSE_SIZE
in your environment variable to change query response data size. The default is 16
, the maximum is 512
.
export GF_PLUGINS_ORACLE_DATASOURCE_MAX_RESPONSE_SIZE=<number>