AHF安装以及使用

AHF简介

1.AHF的诞生就是为了与时俱进,让DBA们收集系统日志以及故障日志更加快捷,同时让Oracle也能够快速定位问题并提供对应的解决方案,号称是每个DBA必备工具。

2.AHF现在默认绑定在DB12+以及GRID12+的RU中,同时最新的版本也可以通过patch:30166242获取,其对应RU与AHF版本历史如下:
Release Update	AHF Version
Oct 2023	AHF 23.7.0
Jul 2023	AHF 23.4.2
Apr 2023	AHF 23.2.0
Jan 2023	AHF 22.3.1
Oct 2022	AHF 22.2.1
Jul 2022	AHF 22.1.3
Apr 2022	AHF 21.4.3
Jan 2022	AHF 21.3.0

3. AHF安装时,默认需要使用root,即具备AHF所有功能
4. AHF使用非root(必须使用 Oracle home的owner账户,如oracle或者grid等)时,以下功能不具备
Automate diagnostic collections
Collect diagnostics from remote hosts
Collect files that are not readable by the Oracle home owner, for example, /var/log/messages, or certain Oracle Grid Infrastructure logs
To install as the Oracle home owner, use the –ahf_loc option ./ahf_setup -ahf_loc install_dir


AHF下载

使用MOS账户去Oracle官方下载,目前最新版本是v23.10.0

AHF安装


-- 本篇使用root安装

yum -y install perl-Data-Dumper

mkdir -p /{ahf,ahf_data}

unzip AHF-LINUX_v23.10.0.zip

./ahf_setup -ahf_loc /ahf -data_dir /ahf_data -silent



-------------- 安装过程 -------------
[root@]# ./ahf_setup 

AHF Installer for Platform Linux Architecture x86_64

AHF Installation Log : /tmp/ahf_install_2310000_6881_2023_11_12-19_44_08.log

Starting Autonomous Health Framework (AHF) Installation

AHF Version: 23.10.0 Build Date: 202310311821

Default AHF Location : /opt/oracle.ahf

Do you want to install AHF at [/opt/oracle.ahf] ? [Y]|N : y

AHF Location : /opt/oracle.ahf

AHF Data Directory stores diagnostic collections and metadata.
AHF Data Directory requires at least 5GB (Recommended 10GB) of free space.

Please Enter AHF Data Directory : /ahf

AHF Data Directory : /ahf/oracle.ahf/data

Do you want to add AHF Notification Email IDs ? [Y]|N : n

Extracting AHF to /opt/oracle.ahf

Configuring TFA Services

Discovering Nodes and Oracle Resources

Successfully generated certificates.

Starting TFA Services
Created symlink from /etc/systemd/system/multi-user.target.wants/oracle-tfa.service to /etc/systemd/system/oracle-tfa.service.
Created symlink from /etc/systemd/system/graphical.target.wants/oracle-tfa.service to /etc/systemd/system/oracle-tfa.service.

.------------------------------------------------------------------------------------.
| Host          | Status of TFA | PID  | Port  | Version     | Build ID              |
+---------------+---------------+------+-------+-------------+-----------------------+
| oracle-19c-si | RUNNING       | 8732 | 28739 | 23.10.0.0.0 | 231000020231031182123 |
'---------------+---------------+------+-------+-------------+-----------------------'
Invalid option specified : cookie

Running TFA Inventory...

Adding default users to TFA Access list...

.-----------------------------------------------------------.
|                Summary of AHF Configuration               |
+-----------------+-----------------------------------------+
| Parameter       | Value                                   |
+-----------------+-----------------------------------------+
| AHF Location    | /opt/oracle.ahf                         |
| TFA Location    | /opt/oracle.ahf/tfa                     |
| Orachk Location | /opt/oracle.ahf/orachk                  |
| Data Directory  | /ahf/oracle.ahf/data                    |
| Repository      | /ahf/oracle.ahf/data/repository         |
| Diag Directory  | /ahf/oracle.ahf/data/oracle-19c-si/diag |
'-----------------+-----------------------------------------'

Starting ORAchk Scheduler from AHF

Setting up AHF CLI and SDK

AHF binaries are available in /opt/oracle.ahf/bin

AHF is successfully Installed

Do you want AHF to store your My Oracle Support Credentials for Automatic Upload ? Y|[N] : n

Moving /tmp/ahf_install_2310000_6881_2023_11_12-19_44_08.log to /ahf/oracle.ahf/data/oracle-19c-si/diag/ahf/



AHF使用


The new ahf command combines functionality from pre-existing as well as new AHF component CLIs into a single easy to understand command.

Previously, AHF included many components, each with their own command line. This has made it difficult for user to use different features of AHF.

This release begins the unification of all AHF components under a single command line

ahf <category> <action> [<options>]

Where categories are:

configuration - for changing AHF configuration
security - for security related configuration
collection - for capturing diagnostic data
analysis - for analyzing an environment for problems and providing recommendations for corrective action
software - for modifying the install software patching, upgrading or uninstalling
schedule - for scheduling automated tasks
observer - for viewing potential problems captured by AHF
Unification of commands will continue in future releases. Pre-existing commands continue to be supported.

For more information, see the AHF User's Guide section on Unified Command-Line Interface for the Entire AHF Stack .



AHF usecases

posted @ 2023-11-12 20:17  DBAGPT  阅读(283)  评论(0编辑  收藏  举报