Configuring Oracle Monitoring

Download this manual as a PDF file

This section describes how to configure and discover your Oracle Database instances for monitoring by Skylar One using the "Oracle: Database" PowerPack.

Prerequisites for Monitoring Oracle Database Instances

To configure the Skylar One system to monitor Oracle Database instances using the "Oracle: DatabasePowerPack, you must have a minimum of two users:

  1. SSH user to access archived files-related data from the server hosting the Oracle Database instance.
  2. Oracle Database user to access the instance.

On a multi-tenant instance like a Database Server, there can be multiple users to access Database Servers and pluggable databases.

For more information about the minimum permissions needed, and why they are required, see the Oracle: Database Minimum Permissions Needed Appendix.

r= read; w= write; x= execute; = denied. All files and directories can be owned by another non-credential user in Skylar One. However, the permissions must be given to the credential user's group, or to everyone else (Other).

If you do not want to configure permissions, you can move the SSH user to the group used by the Oracle installer.

The Oracle database user must have access to the following tables:

Required Ports

To monitor Oracle Database instances using the "Oracle: DatabasePowerPack, your Data Collectors must be able to access the UNIX host on port 22, as well as the port that is configured for the databases that you will be monitoring, as defined in the tnsnames.ora file.

Required Privileges

All Oracle database users must have the following privileges:

Monitoring Pluggable Databases (PDBs)

To monitor pluggable databases (PDBs), you must have permissions to view `DBA_PDBS` and `V_$PDBS`.

NOTE: You can create multiple users to access a CDB and all PDBs by creating a minimum of two Database Credentials, one for the CDB, and one for each PDB.

Creating Users and Assigning Privileges

If you want to monitor a container database (CDB) and PDB, log in to the CDB and create a user and grant access to containers using the following permissions:

For Non-Container Databases (Non-CDBs):

NOTE: If you are monitoring RAC and ASM instances, no additional permissions are required.

NOTE: Each Oracle database user will need a corresponding Skylar One database credential for database access.

Prerequisites to Monitor Using Transport Layer Security (TLS/TCPS)

To monitor using TCPS you must configure the collector with Oracle Instant Client, Oracle Database libraries, wallet and network files.

You need to configure every collector that the PowerPack will use. Alternatively, you can change the Collector Affinity of every Dynamic Application to use the “root device’s collector” to use only one single collector.

For the workflow below, assume the following example:

  Oracle Database Skylar One Collector
Version Oracle Database 21c Oracle Instant Client 21.15
ORACLE_HOME /u01/app/oracle/product/21.0.0/dbhome_1 /opt/oracle/instant_client_21_15

 

  1. Download the Oracle Instant Client that matches your Oracle Database version.
  2. Install the Oracle Instant Client on your Skylar One Collector, typically at /opt/oracle.
  3. Using SSH, connect to your Oracle Database and copy the following folders:
    • $ORACLE_HOME/jdk
    • $ORACLE_HOME/jlib
    • $ORACLE_HOME/bin/orapki
  4. Transfer the folders to your Skylar One Collector:
    • Copy jdk to /opt/oracle/jdk
    • Copy jlib to /opt/oracle/jlib
    • Copy orapki to /opt/oracle/instant_client_21_15/orapki
  5. Confirm proper installation by running the following commands on your collector:

which orapki

which sqlplus

  1. Create a configuration file called "sqlnet.ora" at the location /opt/oracle/instant_client_21_15/network/admin/sqlnet.ora.
  2. Create a network file called "tnsnames.ora" at the location /opt/oracle/instant_client_21_15/network/admin/tnsnames.ora. The contents of this file will control your connections from Skylar One to Oracle: Database.
  3. On your collector, create an Oracle wallet for Skylar One using the following command:

orapki wallet create -wallet /opt/oracle/instant_client_21_15/wallet -pwd YOUR_PASSWORD -auto_login

Use the -auto_login option so Python can access the wallet. Do not use -auto_login_local, as this will cause issues.

  1. Create or add your SSL certificate to the Skylar One wallet. The certificate must have a key size of 2048 bits or greater.
  2. Exchange certificates between the Oracle Database wallet and the Skylar One wallet if needed.
  3. Change the collector's Instant Client owner and permissions for monitoring:
    • sudo chown -R ‘em7admin:s-em7-core' /opt/oracle
    • chmod -v 640 /opt/oracle/instant_client_21_15/wallet/*

Monitoring TCPS Use Case

Assume this Oracle DB:

Instance Host Port Protocol
cdb1 (SID) 192.0.2.110 2484 TCPS
silo_pdb (SERVICE_NAME) 192.0.2.110 2484 TCPS

 

You must configure the collector's tnsnames.ora file to point to these instances. The tnsnames.ora file should have a format similar to the following:

AN_ALIAS_YOU_LIKE=

(DESCRIPTION=

(ADDRESS=

(PROTOCOL=TCPS)

(HOST=YOUR_ORACLE_ADDRESS)

(PORT=YOUR_ORACLE_PORT)

)

(CONNECT_DATA=(SERVER=dedicated)

(SID=YOUR_ORACLE_SID)

)

)

Modifying the collector's Skylar One tnsnames.ora file with the example Oracle Database above, the tnsnames.ora file should look like this:

cdb1_ssl=

(DESCRIPTION=

(ADDRESS=

(PROTOCOL=TCPS)

(HOST=192.0.2.110)

(PORT=2484)

)

(CONNECT_DATA=(SERVER=dedicated)

(SID=cdb1)

)

)

silo_pdb_tcps=

(DESCRIPTION=

(ADDRESS=

(PROTOCOL=TCPS)

(HOST=192.0.2.110)

(PORT=2484)

)

(CONNECT_DATA=(SERVER=dedicated)

(SERVICE_NAME=silo_pdb)

)

)

After configuring the tnsnames.ora file, fill the Skylar One database credential with the following:

  1. In the Oracle Connect Type field, enter "Oracle Real Application Clusters (SERVICE_NAME)"
  2. In the Oracle Database SID field, enter the tnsnames.ora alias you created above. For example, "cdb1_ssl" or "silo_pdb_tcps".
  3. Complete the other fields of the Database Credential as described in the Creating a Database Credential section.

Configuring Oracle Credentials

To monitor Oracle Database instances using Skylar One, you must create at least three credentials. The types of credentials that are required for monitoring depend on the type of server that is hosting the Oracle Database:

NOTE: The SOAP/XML credential is the only credential that is used for discovery.

Suggested Timeout Configuration

There are current platform limitations to implementing a timeout for Database Server sessions.

To prevent issues and perform the suggested configuration:

  1. Create a new profile for the DB user in the Database.
  2. Configure the profile with these queries:

With this configuration implemented, a three-minute minute timeout session is established. This allows the user time to stop the collection if it prevents Skylar One from creating SIGTERMs.

Creating an SSH/Key Credential (Linux Users)

Linux and Unix users must create an SSH/Key credential.

To create an SSH/Key credential:

  1. Go to the Credentials page (Manage > Credentials).
  2. Locate the "Oracle: DB Example SSH" sample credential, then click its Actions icon () and select Duplicate. A copy of the credential, called Oracle: DB Example SSH copy appears.

An image of the SSH Create Credential page.

  1. Supply values in the following fields:

The private key can have a maximum of 64 characters per line. Therefore, you cannot use keys in the OpenSSH format, because that format uses 70 characters per line. When you attempt to save the credential, Skylar One will validate that the private key entered is in the correct format. You will be able to save the credential only if the private key is correctly formatted.

  1. Click Save & Close.

NOTE: The credential ID will appear in the ID column of the Credentials page after it has been saved. Take note of the ID as you will need it when creating the SOAP/XML credential.

Creating an SSH/Key Credential (Linux Users) in the Classic Skylar One User Interface

To create an SSH/Key credential :

  1. Go to the Credential Management page (System > Manage > Credentials).
  2. Click the wrench icon () for the "Oracle: DB Example SSH" credential. The Credential Editor modal page appears.
  3. Supply values in the following fields:

The private key can have a maximum of 64 characters per line. Therefore, you cannot use keys in the OpenSSH format, because that format uses 70 characters per line. When you attempt to save the credential, Skylar One will validate that the private key entered is in the correct format. You will be able to save the credential only if the private key is correctly formatted.

  1. Click the Save As button.
  2. When the confirmation message appears, click OK.

NOTE: The credential ID will appear at the top of the window after it has been saved. Take note of the ID as you will need it when creating the SOAP/XML credential.

Creating a Database Credential

To monitor multiple CDB or PDB instances, you must create a database credential.

To create a database credential:

  1. Go to the Credentials page (Manage > Credentials).
  2. Click the Create New button and then select Create Database Credential. The Create Credential modal page appears:

An image of the database Create Credential page.

  1. Supply values in the following fields:

Oracle Settings

NOTE: Any PDB instance SERVICE_NAME or SID that you entered in the database credential should match the PDB alias in your Oracle DB tnsnames.ora file.

  1. Click Save & Close.

NOTE: The credential ID will appear in the ID column of the Credentials page after it has been saved. Take note of the ID as you will need it when creating the SOAP/XML credential.

Creating a Database Credential in the Classic Skylar One User Interface

You must create a database credential if you want to monitor multiple CDB or PDB instances .

To create a database credential:

  1. Go to the Credential Management page (System > Manage > Credentials).
  1. In the Credential Management page, click the Actions menu, then select Create Database Credential.
  1. The Credential Editor modal page appears. In this page, you can define the new database credential. To define the new credential, supply values in the following fields:

Basic Settings

Oracle Settings

NOTE: Any PDB instance SERVICE_NAME or SID that you entered in the database credential should match the PDB alias in your Oracle DB tnsnames.ora file.

NOTE: Any PDB instance SID that you entered in the database credential should match the SID in your tnsnames.ora file. Your SOAP/XML credential can have the alias of the PDB instance SID.

  1. Click Save.

NOTE: The credential ID will appear at the top of the window after it has been saved. Take note of the ID as you will need it when creating the SOAP/XML credential.

Creating a SOAP/XML Credential

To create a SOAP/XML credential:

  1. Go to the Credentials page (Manage > Credentials).
  2. Locate the appropriate sample credential for your use case, then click its Actions icon () and select Duplicate. A copy of the credential with its name and copy as a suffix appears.

An image of the SOAP/XML Create Credential page.

  1. Supply values in the following fields:

Creating a SOAP/XML Credential in the Classic Skylar One User Interface

To create the SOAP/XML credential:

  1. Go to the Credential Management page (System > Manage > Credentials).

  1. Click the wrench icon () for either the chosen sample credential for Windows users. The Credential Editor modal page appears.

  1. Update the values in the following fields:

Basic Settings

NOTE: Discovering multiple instances on a single database server is supported, but all instances must share the same credentials entered in the SOAP/XML credential's HTTP Auth User and HTTP Auth Password fields.

HTTP Headers

HTTP Headers allow you to register the Oracle Database servers you want to discover. Additionally, there are special keywords that can be used, described in the HTTP Headers Special Keywords section.

A header should be added for each Oracle Database instance that you are monitoring.

Only the SIDs listed in the credential will be discovered.

Do not end the HTTP header with a backslash.

Headers for Oracle DB Server OS:

Only one OS type is supported per credential.

Headers for PDBs

show pdbs

SELECT PDB_ID, DBID, GUID, PDB_NAME, STATUS FROM DBA_PDBS;

For the SID, the CDB value will always be either "True" or "False". For a PDB, the CDB value will be the container SID.

Example Use Case 1, assuming this Oracle DB:

Instance DB Credential ID Parent CDB
cdb1 122 N/A
PDB1 123 cdb1
PDB2 23456 cdb1

 

SSH: 77

SID:cdb1:DB_CID:122:CBD:True

PDB:PDB1:DB_CID:123:CDB:cdb1

PDB:PDB2:DB_CID:23456:CDB:cdb1

Example Use Case 2, assuming this Oracle DB:

Instance DB Credential ID Parent CDB
cdb2 332 N/A
PDB3 333 cdb2

 

SSH:78

SID:cdb2:DB_CID:332:CDB:true

PDB:PDB3:DB_CID:333:CDB:cdb2

Example Use Case 3, assuming this Oracle DB:

Instance DB Credential ID Parent CDB
silo_cdb 1241 N/A
SILO_PDB55 1242 silo_cdb

 

SSH:55

SID:silo_cdb:DB_CID:1241:CDB:true

PDB:SILO_PDB55:DB_CID:1242:CDB:silo_cdb

Example Use Case 4, assuming this Oracle DB:

Instance DB Credential ID Parent CDB
cdb1 56 N/A
PDB1 111 cdb1
PDB2 222 cdb1
PDB3 333 cdb1
cdb2 77 N/A
PDB1 90 cdb2

 

SSH:100

SID:cdb1:DB_CID:56:CDB:true

PDB:PDB1:DB_CID:111:CDB:cdb1

PDB:PDB2:DB_CID:222:CDB:cdb1

PDB:PDB3:DB_CID:333:CDB:cdb1

SID:cdb2:DB_CID:77:CDB:true

PDB:PDB1:DB_CID:90:CDB:cdb2

Example Use Case 5, assuming this Oracle DB:

Instance DB Credential ID Parent CDB
oraclecdb 56 N/A
PDB1 111 oraclecdb
PDB2 222 oraclecdb

 

SSH:99

SID:oraclecdb:DB_CID:56:CDB:true

PDB:PDB1:DB_CID:111:CDB:oraclecdb

PDB:PDB2:DB_CID:222:CDB:oraclecdb

Be sure to put CDB:true as the last element in the header. If you do not, the PowerPack may report incorrectly that the SOAP credential is incorrect.

PDB headers must always be followed by their parent CDB.

Headers for RAC

This version of the Oracle: DatabasePowerPack is designed to monitor Oracle Real Application Clusters (RAC) environments. While comprehensive cluster-wide monitoring is limited, you can effectively monitor each RAC node individually by discovering and configuring them separately.

This section includes instructions for discovering Container Databases (CDBs). If your cluster includes Pluggable Databases (PDBs), please refer to the Monitoring Pluggable Databases (PDBs) section after completing this section. This section is also applicable to non-CDB environments.

Example Use Case 1, assuming this Oracle DB:

Instance DB Credential ID Parent CDB
cdbrac1 51 N/A
cdbrac2 52 N/A

 

OS information will only be gathered from one node.

SSH:50

SID:cdbrac1:DB_CID:51

SID:cdbrac2:DB_CID:52

Example Use Case 2, assuming this Oracle DB:

Instance DB Credential ID Parent CDB
cdbrac1 51 N/A
PDB1 53 cdbrac1
cdbrac2 52 N/A
PDB1 54 cdbrac2

 

SSH:50

SID:cdbrac1:DB_CID:51:CDB:true

PDB:PDB1:DB_CID:53:CDB:cdbrac1

SID:cdbrac2:DB_CID:52:CDB:true

PDB:PDB1:DB_CID:54:CDB:cdbrac2

Example Use Case 3, assuming this Oracle DB:

Instance DB Credential ID Parent CDB
cdbrac1 51 N/A
PDB1 53 cdbrac1
cdbrac2 52 N/A
PDB1 54 cdbrac2
cdbrac3 55 N/A
+ASM1 56 N/A
+ASM2 57 N/A

 

SSH:50

SID:cdbrac1:DB_CID:51:CDB:true

PDB:PDB1:DB_CID:53:CDB:cdbrac1

SID:cdbrac2:DB_CID:52:CDB:true

PDB:PDB1:DB_CID:54:CDB:cdbrac2

SID:cdbrac3:DB_CID:55

ASM:56

ASM:57

Example Use Case 4, assuming this Oracle DB and multiple SOAP/XML credentials to gather OS information from multiple nodes:

Instance DB Credential ID Parent CDB
cdbrac1 51 N/A
PDB1 53 cdbrac1
cdbrac2 52 N/A
PDB1 54 cdbrac2
cdbrac3 55 N/A

 

SOAP/XML Credential 1:

SSH:50

SID:cdbrac1:DB_CID:51:CDB:true

PDB:PDB1:DB_CID:53:CDB:cdbrac1

SOAP/XML Credential 2:

SSH:56

SID:cdbrac2:DB_CID:52:CDB:true

PDB:PDB1:DB_CID:54:CDB:cdbrac2

SOAP/XML Credential 3:

SSH:57

SID:cdbrac3:DB_CID:55

This configuration will likely cause duplicate collection and event generation.

Headers for Non-CDB

Headers for non-CDBs are handled like the headers for CDBs, but the PDB header is not included.

Example Use Case 1, assuming this Oracle DB:

Instance DB Credential ID
rac1 51
rac2 52

 

SSH:50

SID:rac1:DB_CID:51

SID:rac2:DB_CID:52

Example Use Case 2, assuming this Oracle DB:

Instance DB Credential ID
orcl 52

 

SSH:51

SID:orcl:DB_CID:52

Example Use Case 3, assuming this Oracle DB:

Instance DB Credential ID
devdb 52
testdb 54
prod1 56
staging 59
qaenv 57

 

SSH:51

SID:devdb:DB_CID:52

SID:testdb:DB_CID:54

SID:prod1:DB_CID:56

SID:staging:DB_CID:59

SID:qaenv:DB_CID:57

Headers for ASM

Headers for ASMs only need to include the credential ID.

Example Use Case 1, assuming this Oracle DB:

Instance DB Credential ID
cdbrac1 51
cdbrac2 52
+ASM1 53
+ASM2 54

 

SSH:50

SID:cdbrac1:DB_CID:51

SID:cdbrac2:DB_CID:52

ASM:53

ASM:54

Example Use Case 2, assuming this Oracle DB:

Instance DB Credential ID
orcl 52
+ASM1 53

 

SSH:51

SID:orcl:DB_CID:52

ASM:53

Headers for TCPS

To force the PowerPack use TCPS, you must add a header with “TCPS:/path/to/instant_client”. By adding this header, every instance listed in the headers will reference the Skylar One tnsnames.ora file, so it is important to ensure that all required instances are included in the tnsnames.ora file.

Example Use Case 1, assuming this Oracle DB:

Instance DB Credential ID Parent CDB
cdbrac1 51 N/A
PDB1 53 cdbrac1

 

SSH:50

SID:cdbrac1:DB_CID:51:CDB:true

PDB:PDB1:DB_CID:53:CDB:cdbrac1

TCPS:/opt/oracle/instant_client_21_15

Example Use Case 2, assuming this Oracle DB:

Instance DB Credential ID Parent CDB
orcl 52 N/A
PDBPROD 54 orcl
+ASM1 53 N/A

 

SSH:51

SID:orcl:DB_CID:52:CDB:true

PDB:PDBPROD:DB_CID:54:CDB:orcl

ASM:53

TCPS:/opt/oracle/instant_client_19_24

Deprecated HTTP Configuration Headers

The following headers have been deprecated and will no longer function:

Enabling PEM on a Linux Machine

Linux and Unix users can create an SSH/Key credential in order to monitor Oracle Database instances in Skylar One. The Private Key (PEM Format) field may be filled when creating an SSH/Key credential. To enable PEM on a Linux machine, perform the following steps:

  1. Create a PEM folder to place the identity keys by running the following command:

mkdir -p ~s/.ssh

ScienceLogic suggests that you create a PEM folder inside the .ssh folder of the user that will use the PEM authentication.

  1. Run the following command on your Linux machine to create the SSH key. This command will create public and private keys:

ssh-keygen -b 2048 -t rsa -f ~/.ssh/identity

When prompted for a password, you can press Enter to leave it blank and move forward. You will be prompted for a password every time the system runs a Dynamic Application.

The value "identity" in the command above will be the name of the file that is generated. This value can be replaced with any file name.

  1. The private key generated from this command is the .pem file needed for the SSH/Key credential. Copy the contents of the file to input into the Skylar One credential.
  2. Add the generated public key to the authorized_keys file that is found in ~/.ssh/authorized_keys manually or by using the following command:

cat ~/.ssh/identity.pub >> ~/.ssh/authorized_keys

  1. Restart the SSH service by running the following command:

sudo service ssh restart

After completing the steps above, you can create an SSH/Key credential in Skylar One by entering your Linux server username, Linux server password, and private key. If you would like to create an SSH/Key credential by entering only your Linux server username and private key, perform the following steps on your Linux machine:

  1. Find the sshd_config file.
  2. Find the PasswordAuthentication command line, delete yes, and input no.
  3. Restart the SSH service by running the following command:

sudo service ssh restart

Discovering Oracle Database Instances

To create and run a discovery session that will discover an Oracle instance, perform the following steps:

  1. On the Devices page () or the Discovery Sessions page (Devices > Discovery Sessions), click the Add Devices button. The Select page appears:

Image of the Discovery start page

  1. Click the Unguided Network Discovery button. Additional information about the requirements for discovery appears in the General Information pane to the right.
  1. Click Select. The Add Devices page appears:

An image of the Add Devices page.

  1. Complete the following fields:

  1. Click Next. The Credentials page of the Add Devices wizard appears:

Image of the Add Devices wizard, page 2

  1. On the Credentials page, select the SOAP/XML credential you created.
  1. Click Next. The Discovery Session Details page of the Add Devices wizard appears:

An image of the Add Devices page.

  1. Complete the following fields:

In the Advanced options section, click the down arrow icon () to complete the following fields:

  1. Click Save and Close to save the discovery session. The Discovery Sessions page (Devices > Discovery Sessions) displays the new discovery session.
  2. If you selected the Run after save option on this page, the discovery session runs, and the Discovery Logs page displays any relevant log messages. If the discovery session locates and adds any devices, the Discovery Logs page includes a link to the Device Investigator page for the discovered device.

Discovering Oracle Database Instances in the Skylar One Classic User Interface

To model and monitor your Oracle Database instances, you must run a discovery session. To create and run a discovery session that will discover your Oracle Database instances, perform the following steps:

  1. Go to the Discovery Control Panel page (System > Manage > Classic Discovery or System > Manage > Discovery in the classic user interface).

  1. Click the Create button to create a new discovery session. The Discovery Session Editor window appears:

  1. Enter values in the following fields:

  1. You can enter values in the other fields on this page, but are not required to and can simply accept the default values. For more information about the other fields on this page, see the Discovery & Credentials section.
  2. Click the Save button and then close the Discovery Session Editor window.
  3. The discovery session you created will appear at the top of the Discovery Control Panel page. Click its lightning-bolt icon () to run the discovery session.
  4. The Discovery Session window will be displayed.
  5. When the server that is hosting the Oracle Database is discovered, click its device icon () to view the Device Properties page for that device.
  6. After the server hosting the Oracle Database is discovered, the "Oracle: DB Instance Discovery" Dynamic Application will automatically be aligned. This Dynamic Application will discover the Oracle Database instances which will appear in the Device Manager page.

Verifying Discovery and Dynamic Application Alignment

During discovery, Skylar One will first identify the root device, followed by the associated Oracle Database instance, whether it's a CDB, PDB, non-CDB, or RAC node, depending on the configuration in the SOAP/XML credential header. All relevant Dynamic Applications will then be automatically aligned to the discovered components, ensuring accurate monitoring and configuration.

If you discovered a non-CDB in a Windows instance, the "Oracle: DB Archived File System Stats" and "Oracle: DB Non-Archived File System Stats" Dynamic Applications will not be aligned.

To verify alignment of the Oracle Database Dynamic Applications:

  1. After discovery has completed, click the device icon for the Oracle device (). From the Device Properties page for the Oracle device, click the Collections tab. The Dynamic Application Collections page appears.

    It can take two to three polling cycles after the discovery session has completed for Dynamic Applications to appear in the Dynamic Application Collections page.


  1. All applicable Dynamic Applications are automatically aligned to the root device and component devices during discovery:

You should see the following Dynamic Applications aligned to the root device:

Using an Oracle PP on an existing Linux device will not interfere with the historical data on the device. Instead, the Oracle will align at the root with the other Linux Dynamic Applications.

You should see the following Dynamic Applications aligned to ASM:

You should see the following Dynamic Applications aligned to CDB:

You should see the following Dynamic Applications aligned to PDB Oracle Database instances:

You should see the following Dynamic Applications aligned to non-CDB Oracle Database instances:

Snippet and Snippet Argument Configuration for New Oracle Dynamic Applications

Snippet arguments can be used for simple queries consisting of only SELECT and WHERE. Complex queries must be defined in the snippet.

Running Raw SQL Queries from the Snippet

You can run raw SQL queries in the snippets in Dynamic Applications by going to the Snippets tab on your Dynamic Application (Manage > Applications > Dynamic Application > Snippet Editor & Registry) and selecting the snippet from the Snippet Registry.

For Discovery Dynamic Applications, you can use the following:

For Collection Dynamic Applications, you can use the following:

Step 1: What Do You Want to Collect?

To run raw SQL queries from a snippet you first need to know what you want to collect. ScienceLogic recommends that you start with a list of simple queries that you want to run against Oracle. You can add more queries to the list later. For example:

SELECT dbms_utility.port_string AS port_string FROM dual;

Complex or nested subqueries in the example below are not supported:

SELECT (SELECT username FROM dba_users WHERE ROWNUM =1) AS user_example FROM dual;

ScienceLogic recommends using SELECT column FROM table patterns when running SQL queries from a snippet.

Step 2: How Do I Set Up the SQL_LIST

In your Python Dynamic Application script, you must define the list of SQL queries you want to execute. For example:

SQL_LIST = [

"SELECT dbms_utility.port_string AS port_string FROM dual",

"SELECT platform_name FROM v$database"

]

Step 3: What Does the SLQCollector Class Do?

The SQLCollector class is a helper class that handles the following processes:

Step 4: How Do I Use the SQLCollector Correctly?

After you narrow down which data you want to collect and have defined your list of SQL queries, you can use the SQLCollector inside the Dynamic Application script. For example:

from silo.apps.errors import ErrorManager

from silo.oracle_db.sql_manager import SQLCollector

SQL_LIST = [

"SELECT dbms_utility.port_string AS port_string FROM dual",

"SELECT platform_name FROM v$database"

]

with ErrorManager(self):

manager = SQLCollector(

self,

cluster_wide=True,

as_sysdba=False,

first_column_is_index=False

)

manager.collect (SQL_LIST)

Step 5: How Do I Match SQL Columns to Skylar One Collection Objects?

It is critical that each column returned by your SQL query must match a collection object in the Collections tab of the Dynamic Application. For example, if your query is:

SELECT dbms_utility.port_string AS port_string FROM dual;

Your collection object OID must exactly match as:

port_string

If the query does not match the collection object listed in the Dynamic Application, the Dynamic Application cannot collect any data.

Column names are case-sensitive in Skylar One. To clarify, Port_String is not the same as port_string.

Parameters for Running Raw SQL Queries

To run raw SQL queries, you can use the following parameters to optimize your query:

Running SSH Commands from a Snippet

You can run SSH commands the snippets in Dynamic Applications by going to the Snippets tab and selecting the snippet from the Snippet Registry.

For example, in the "Oracle: DB Non-Archived File System Stats" Dynamic Application, you can edit the snippet to include an SSH command in the following way:

ssh.append("your_ssh_command")

ssh_results = ssh_collector.run_commands(ssh)

 

Viewing Oracle Component Devices

In addition to the Devices page, you can view the Oracle Database and all associated component devices in the following places in the user interface:

Viewing Oracle Component Devices in the Classic Skylar One User Interface

In addition to the Device Manager page (Devices > Classic Devices, or Registry > Devices > Device Manager in the classic user interface), you can view the Oracle Database instances and all associated component devices in the following places in the user interface: