How domdanrtsey/orawatch works
Purpose and Entry Points
This repository is a standalone Oracle Database health-check utility. It is intended to run under the Oracle OS account against the instance selected by ORACLE_SID, using a supplied system/password login. The executable entry point is orawatch.sh; its generated example/report artifact is 192.168.35.244os_oracle_summary.html.
Execution Model
The operator exports the target instance identifier, makes the shell script executable, and invokes it with Oracle SYSTEM credentials. The script is therefore coupled to the local Oracle client/runtime environment and the selected local database instance rather than being a network service.
• orawatch.sh
• README.md
Credential and Database Boundary
orawatch.sh accepts credentials from the command line or can use credentials embedded in the script. It connects as the Oracle system user to run inspection SQL. Credentials must correspond to the active ORACLE_SID; repeated invalid attempts can lock the SYSTEM account. Oracle authentication and SQL execution are the primary external-system boundary.
• orawatch.sh
Oracle Inspection Stages
The script collects database and host-facing operational information, including:
1. Host/IP identification for the report.
2. Oracle database version.
3. Archive-log mode, archive destination/path, and archive filesystem usage.
4. Database memory state, including memory/SGA/PGA information.
5. Tablespace autoextend configuration.
6. Allocated tablespace utilization.
These checks form the main monitoring pipeline implemented by the shell script.
• orawatch.sh
• README.md
Report Generation
Inspection results are formatted into an HTML summary written in the script’s working directory. The output name incorporates the host IP and follows the *os_oracle_summary.html convention. The checked-in HTML file demonstrates the expected report artifact and likely serves as a sample generated result rather than an application runtime dependency.
• orawatch.sh
• 192.168.35.244os_oracle_summary.html
Runtime and Infrastructure Dependencies
The runtime is a Unix-like shell environment with Oracle installed/configured for the executing Oracle user. Required operational context includes ORACLE_SID, access to Oracle command-line SQL tooling, local archive-log filesystem visibility, and permission to write the HTML report. No application server, package manager, or persistent service infrastructure is represented.
• orawatch.sh
Extension Boundary
Additional inspection metrics are expected to be added by extending the SQL/shell collection and HTML rendering logic in orawatch.sh. New checks should preserve the existing sequence: obtain database/host state, convert results into report sections, and emit the consolidated HTML artifact.
• orawatch.sh
Main entry points: orawatch.sh orawatch.sh · README.md README usage guide · 192.168.35.244os_oracle_summary.html Example HTML report
Components 15
Local Runtime
- Oracle OS operator · Exports the target SID and invokes the utility.
- Oracle local environment · Provides ORACLE_SID, Oracle client tooling, and filesystem access.
- orawatch.sh · Collects health data and emits the HTML summary.
orawatch.sh - SYSTEM credentials · Supplied on the command line or embedded in the script.
orawatch.sh - Selected Oracle instance · The local instance selected by ORACLE_SID.
- README usage guide · Documents invocation and runtime prerequisites.
README.md
Inspection Pipeline
- Host and IP discovery
orawatch.sh - Database version
orawatch.sh - Archive-log status · Collects log mode, destination, and archive filesystem usage.
orawatch.sh - Memory state · Collects memory, SGA, and PGA information.
orawatch.sh - Tablespace autoextend
orawatch.sh - Tablespace utilization · Collects allocated tablespace usage.
orawatch.sh
Report Output
- HTML report assembly · Converts collected results into report sections.
orawatch.sh - IP-based HTML summary · Written in the working directory using the os_oracle_summary.html convention.
- Example HTML report · Demonstrates expected generated output.
192.168.35.244os_oracle_summary.html
Connections 25
- Oracle OS operator → Oracle local environment: prepares
- Oracle OS operator → orawatch.sh: invokes
- README usage guide → Oracle OS operator: documents
- Oracle local environment → orawatch.sh: provides runtime
- SYSTEM credentials → orawatch.sh: authenticates
- orawatch.sh → Selected Oracle instance: runs inspection SQL
- orawatch.sh → Host and IP discovery: collects
- orawatch.sh → Database version: collects
- orawatch.sh → Archive-log status: collects
- orawatch.sh → Memory state: collects
- orawatch.sh → Tablespace autoextend: collects
- orawatch.sh → Tablespace utilization: collects
- Selected Oracle instance → Database version: returns state
- Selected Oracle instance → Archive-log status: returns state
- Selected Oracle instance → Memory state: returns state
- Selected Oracle instance → Tablespace autoextend: returns state
- Selected Oracle instance → Tablespace utilization: returns state
- Host and IP discovery → HTML report assembly: report section
- Database version → HTML report assembly: report section
- Archive-log status → HTML report assembly: report section
- Memory state → HTML report assembly: report section
- Tablespace autoextend → HTML report assembly: report section
- Tablespace utilization → HTML report assembly: report section
- HTML report assembly → IP-based HTML summary: writes
- Example HTML report → IP-based HTML summary: illustrates format