Skip to content

Commit 600f19e

Browse files
authored
Merge pull request #848 from ritza-co/968-database
968: add system lvl oracle details; index.mdx
2 parents 93faf95 + d8bc145 commit 600f19e

File tree

1 file changed

+48
-1
lines changed
  • docs/auto-discovery/database-discovery

1 file changed

+48
-1
lines changed

docs/auto-discovery/database-discovery/index.mdx

Lines changed: 48 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ Device42 supports autodiscovery on Windows and \*nix platforms for the following
266266

267267
Device42 database autodiscovery for Windows and \*nix targets supports discovery for Oracle RAC clustered database environments, which helps users better assess their cluster databases and understand all the IT assets tied to critical business applications. Discovery returns data about the RAC configuration, the RAC database, and the nodes (physical servers) running the RAC software. You can run the autodiscovery against one or more nodes in the Oracle RAC and return information about all connected nodes. Device42 requires the use of sudo for Oracle discoveries to mitigate the risk of lockout.
268268

269-
### Minimum Permissions Requirements for Oracle Discovery
269+
### Minimum Database-Level Permissions Requirements for Oracle Discovery
270270

271271
For discovery to return detailed info about your database instance, you will require read or view permissions for the following system views and tables:
272272

@@ -284,6 +284,53 @@ To get information about pluggable databases (PDBs) within an Oracle container d
284284
CONTAINER = CURRENT;
285285
```
286286

287+
#### System-Level Permissions
288+
289+
In addition to the minimum DB-level permissions above, discovery also needs shell access to the target system to run OS-level commands to get information about the Oracle environment.
290+
291+
For example, shell access is needed to read the `tnsames.ora` file, which contains network connection details:
292+
293+
```bash
294+
/usr/bin/cat: /dbprog/oracle/product/19.3.0.0.26/network/admin/tnsnames.ora
295+
```
296+
297+
Another example is the `lsnrctl status` command, which checks the status of the Oracle listener:
298+
299+
```bash
300+
oracle -c 'lsnrctl status'
301+
```
302+
303+
To allow Device42 to run these commands securely, you can grant limited `sudo` access by adding the following to the `/etc/sudoers` file or by creating a separate `sudoers` file for Device42 Oracle discovery:
304+
305+
<details>
306+
<summary>Click to expand the code block</summary>
307+
308+
```bash
309+
# Basic Oracle Discovery Commands
310+
Cmnd_Alias DEVICE42_ORACLE = \
311+
/usr/bin/ps -ef, \
312+
/usr/bin/pwdx *, \
313+
/usr/bin/su - oracle -c lsnrctl status, \
314+
/usr/bin/su - oracle -c echo "select * from product_component_version;" | sqlplus -L -S -M "HTML ON" / as sysdba, \
315+
/usr/bin/cat /etc/oratab, \
316+
/usr/bin/su - oracle -c /u01/app/19.1.0.0/grid/bin/lsnrctl status, \
317+
/usr/bin/su - oracle -c echo "select * from product_component_version;" | /u01/app/19.1.0.0/grid/bin/sqlplus -L -S -M "HTML ON" / as sysdba
318+
319+
# Oracle RAC Additional Commands
320+
Cmnd_Alias DEVICE42_ORACLE_RAC = \
321+
/usr/bin/su - oracle -c /u01/app/19.1.0.0/grid/bin/olsnodes -c, \
322+
/usr/bin/su - oracle -c /u01/app/19.1.0.0/grid/bin/olsnodes -n -i -s, \
323+
/usr/bin/su - oracle -c /u01/app/19.1.0.0/grid/bin/olsnodes -l -n -i -s, \
324+
/usr/bin/su - oracle -c /u01/app/19.1.0.0/grid/bin/srvctl config scan_listener, \
325+
/usr/bin/su - oracle -c /u01/app/19.1.0.0/grid/bin/srvctl config scan, \
326+
/usr/bin/su - oracle -c /u01/app/19.1.0.0/grid/bin/crsctl stat res -t | grep *, \
327+
/usr/bin/su - oracle -c srvctl config database -d *
328+
329+
# Grant these permissions to your Device42 discovery user:
330+
# username ALL=(ALL) NOPASSWD: DEVICE42_ORACLE, DEVICE42_ORACLE_RAC
331+
```
332+
</details>
333+
287334
### Set Up Your Oracle Discovery Job
288335

289336
To begin discovering your Oracle databases, navigate to **Discovery > HyperVisors /\*nix /Windows**. Create a new discovery job for Windows or \*nix (or both) targets, and be sure to check the **Collect database server information** checkbox.

0 commit comments

Comments
 (0)