Überwachung von Oracle-Datenbanken

Analysieren Sie Ihre Datenbankleistung, -nutzung und -verfügbarkeit im großen Maßstab, um die Ressourceneffizienz zu verbessern und Probleme für den Endbenutzer zu optimieren.

Oracle ist ein objektrelationales Datenbankmanagementsystem, das hauptsächlich für Enterprise Grid Computing entwickelt wurde. Es verwaltet Informationen, Anwendungen und bietet logische Datenspeicherung über Tablespaces.

Die Überwachung der Leistung ist von entscheidender Bedeutung, um die Datenbankintegrität im Blick zu behalten und problematische Server und Ressourcenbereiche schnell zu identifizieren und zu beheben.

  • Informieren Sie sich über die Kennzahlen für Arbeitsspeicher und Festplattenplatz, um sicherzustellen, dass Ihre Oracle DB-Prozesse über genügend Ressourcen verfügen.
  • Überwachen Sie die Antwortzeiten und finden Sie heraus, ob es einen Dienst gibt, der unter schlechten Datenbank-Antwortzeiten leidet.
  • Erfahren Sie, ob die Tablespaces voll sind und ob Sie geeignete Maßnahmen ergreifen müssen, um ihre Kapazität zu erhöhen.
  • Verfolgen Sie die Anzahl der Oracle-Sitzungen, um zu erfahren, wie ausgelastet ein Server ist, und um sicherzustellen, dass sie weiterhin funktionieren.

This document details die Überwachungskennzahlen to ensure continued performance and the Schritte zur Installation des Plug-ins.

Kennzahlen zur Leistungsüberwachung

So überwachen Sie Ihre gesamte Oracle-Datenbank.

Trefferquote im Puffercache

It is the rate at which Oracle finds the data blocks it needs in memory over the lifetime of an instance. buffer_cache_hit_ratio is critical for databases with an undersized buffer pool.

Sortierquote von Festplatte und Speicher

Use the metric disk_memory_sort_ratio to know the percentage of times a session had to perform a disk or a memory sort. Excessive sort activity can degrade the overall database performance.

Oracle-Status

oracle_status helps to notify whether the database is running or not. This helps to monitor business critical metrics, generate alarms and also execute actions automatically when your database goes down.

Reaktionszeit

response_time (ms) is the time spent in database operations per transaction. This helps to understand the database’s capacity to process any change in the workload because of resource shortage or contention.

Prozessnutzung in Prozent

Use the metric processes_usage to study the maximum number of Operating System (OS) user processes that can simultaneously connect to the Oracle database at the same time. This includes the background processes as well.

Sitzungsnutzung

The sessions_usage in percentage specifies the maximum number of sessions used by the database. As every login creates a session, this metric helps to determine the maximum concurrent users in the system.

Fehlgeschlagene Jobs

Use the metric failed_jobs to know the number of jobs failed, either by throwing an error or by abnormally terminating.

Aktive und inaktive Sitzungen

The metrics active_sessions and inactive_sessions denotes the number of active and inactive sessions respectively.

Anzahl fehlgeschlagener Anmeldungen

Use the metric failed_login_count to know the number of failed logon attempts.

Anzahl ungültiger Objekte

The invalid_objects_count metric shows the invalid objects by owner, which will help reduce subsequent latencies.

Trefferquote im PGA-Cache in Prozent

The metric pga_cache_hit_percentage gives the cache hits of Program Global Area (PGA) in percentage used by the process.

Anzahl fehlgeschlagener RMAN-Backups

The rman_failed_backup_count provides the number of failed backups in the RMAN repository.

SQL-Reaktionszeit

The sql_response_time monitors the response time of the SQL service.

So überwachen Sie Ihre Tablespaces

Hinweis: If you wish to monitor only the status and usage of a tablespace, use the OracleTablespaceUsage plugin.

Tablespace-Status und dessen Nutzung (in %)

Know your tablespace_status to be either Read Write, Read Only or Offline. tablespace_usage_percent helps to track how data grows in the database and to make sure appropriate provisioning is given at the right time.

Anzahl der Lese- und Schreibvorgänge in einem Tablespace

The reads and writes represents the number of physical reads and writes respectively. A total of the reads and writes gives the I/O activity for a specific disk.

Freie Blöcke

The free_blocks metric gives the number of blocks on Oracle’s freelist groups for a table, index, or cluster segment

Belegter und freier Speicherplatz (in MB)

The metrics used_space and free_space describes used and free sequential data blocks in a tablespace.

Protokollierung

LOGGING/NOLOGGING helps to control direct path writes to reduce generation of REDO and UNDO. It is one of the varied methods to control the balance between recoverability and performance.

Voraussetzungen

  • oracle-instantclient-basic-linux
  • oracle-instantclient-sdk-linux
  • cx_Oracle – Python-Schnittstelle für Oracle-Datenbank
  1. Install the following packages: apt-get install python-dev build-essential libaio1
  2. Download instant client for Linux x86-64 from the Oracle-Website
    instantclient-basic-linux.x64-12.2.0.1.0.zip
    instantclient-sdk-linux.x64-12.2.0.1.0.zip
  3. Unzip and extract the downloaded zip files into a folder. For example, mkdir -p /opt/oracle_client
  4. Add environment variables:
    • Create a file in /etc/profile.d/oracle.sh and add the following lines:
      export ORACLE_HOME=/opt/oracle_client/instantclient_12_2
      export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME
  5. Create a file in /etc/ld.so.conf.d/oracle.conf and add the following lines /opt/oracle_client/instantclient_12_2
  6. Execute the command sudo ldconfig
    Hinweis: Melden Sie sich vom Server ab und erneut an, damit die Änderungen übernommen werden.
  7. Create a symlink
    cd $ORACLE_HOME
    ln -s libclntsh.so.12.2 libclntsh.so
  8. Installieren Sie cx_Oracle Python mit pip
  9. pip install cx_Oracle
Note: If you are using Centos/RHEL OS, Führen Sie die in diesem Abschnitt beschriebenen Schritte aus. to install the above modules.

Plug-in-Installation

  • Laden Sie die neueste Version des Linux-Agenten von Site24x7 herunter und installieren Sie ihn auf dem Server, auf dem Sie das Plug-in ausführen möchten. Nach erfolgreicher Installation sehen Sie die Überwachung des Linux-Servers in der Steuerkonsole von Site24x7. Dies bestätigt, dass der Agent in der Lage ist, mit unserem Rechenzentrum zu kommunizieren.
  • Laden Sie zur Überwachung Ihrer gesamten Datenbank die Datei OracleCore herunter, zur Überwachung der Tablespaces die Datei OracleTablespaceDetails und zur Überwachung der Nutzung Ihrer Tablespaces die Datei OracleTablespaceUsage.
  • Enter the ORACLE_HOST, ORACLE_PORT, ORACLE_USERNAME, ORACLE_PASSWORD and ORACLE_SID under the #Config Section of the plugin script.
    Note: If you are monitoring the tablespaces, make sure to enter the name of the tablespace that you wish to monitor in the TABLESPACE_NAME
    Hinweis

    Stellen Sie sicher, dass dem in der obigen Konfiguration genannten Benutzer die folgenden Berechtigungen erteilt werden:

    • VERBINDEN
    • SELECT_CATALOG_ROLE (or) grant SELECT permission for all the tables below:
      Für "oracle.py": gv$session, v$pgastat, dba_scheduler_job_log, v$rman_status, dba_audit_trail, dba_objects, v$resource_limit, v$sysmetric, v$sysstat
      Für "oracle_tablespace_usage.py" und "oracle_tablespace_details.py": sys.dba_tablespaces, sys.dba_free_space, sys.dba_data_f, dba_extents
  • Create distinct folders according to the plugins you have downloaded, under the Site24x7 Linux agent plugin directory '/opt/site24x7/monagent/plugins/' and place the respective plugin file under '/opt/site24x7/monagent/plugins/<plugin folder>/'
    • OracleCore.py and OracleCore.cfg-Plug-in im Ordner OracleCore
    • OracleTablespaceDetails.py and OracleTablespaceDetails.cfg im Ordner OracleTablespaceDetails
    • OracleTablespaceUsage.py and OracleTablespaceUsage.cfg im Ordner OracleTablespaceUsage

Der Agent führt das Plug-in automatisch innerhalb von fünf Minuten aus und sendet Leistungsdaten an das Site24x7-Rechenzentrum.

Daten im Site24x7-Webclient anzeigen

  1. Melden Sie sich bei Site24x7 an und navigieren Sie zu "Server" > "Plug-ins" > Name der Plug-in-Überwachung.
  2. Sie können die Leistungskennzahlen zu den verschiedenen Metriken für Ihren Oracle-Server anzeigen.

Fehlerbehandlung

S.No Fehlermeldung Lösung
1 cx_Oracle module is not installed Informationen zur Installation des Python-Moduls können Sie dem Abschnitt "Voraussetzungen" entnehmen.
2 Exception while connecting to host Stellen Sie sicher, dass Sie gültige Konfigurationsdetails eingegeben haben (Hostname, Port, SID, Benutzername, Passwort).
3 Please check the Tablespace Name in the configuration section Stellen Sie sicher, dass der im Konfigurationsabschnitt des Plug-in-Skripts angegebene Tabellenname gültig ist.

Plug-in-Beitrag

Sie können gerne einen Beitrag zu unseren bestehenden Plug-ins leisten und Vorschläge oder Feedback in unserer Community einreichen.

Weitere Plug-in-Integrationen

  • Sofort einsetzbare Plug-ins – Zur Überwachung Ihres gesamten App-Stacks mit unserer umfangreichen Auswahl an Integrationen
  • NGINX und NGINX Plus: Bleiben Sie den Problemen in NGINX und darüber hinaus in Ihrer Webinfrastruktur immer einen Schritt voraus
  • MySQL: Zur Überwachung der Leistungskennzahlen Ihrer MySQL-Datenbanken
  • Postgres: Zur proaktiven Überwachung der Verfügbarkeit und Leistung des geschäftskritischen Postgres-Datenbankservers
  • Nagios – Zur Ausführung Tausender von Nagios-Plug-ins in Site24x7, ohne einen Nagios-Server betreiben zu müssen
  • Überwachung benutzerdefinierter Skripts – Zur Erstellung benutzerdefinierter Linux- und Windows-Plug-ins und Überwachung der erforderlichen Attribute
  • GitHub Repository – Zur Anzeige von mehr als 50 Plug-in-Integrationen