Mostrando postagens com marcador AHF. Mostrar todas as postagens
Mostrando postagens com marcador AHF. Mostrar todas as postagens

sábado, 27 de julho de 2024

[ORACLE] Quick tips: Autonomous Health Framework (AHF) files cleanup.

Hello everyone.
 
How are you doing?
 
Today, I going to show you a quick tip about the AHF - Autonomous Health Framework.
 
In case your autopurge is off, and your disk space is slowing, you can do a manual purge.
 
And it's a simple operation.
 
1) Check the space
 
df -h
 

2) Lists all the files that would be deleted without deletion - as root.
 
For example, I'm only going to clear the last 10 days (my retention is 30 days). 
  
tfactl purge -older 20d -dryrun
 
 
 
3) Delete the files
 
tfactl purge -older 25d
 
I could run it using hours, for example:
 
tfactl purge -older 200h
 

The full syntax and parameters are:
 

 
 
4) Check the space
 
 
5) To enable autopurge:
 
tfactl set autopurge=on
 
 
You can manage the options using tfactl menu:
 
tfactl menu
 
 
For more information: tfactl purge
 
And, there you go. The space has been cleared.
 
It`s as simple as that!
 
I hope this tip helps you.
 
Regards
Mario
 
 

terça-feira, 3 de outubro de 2023

[ORACLE] How do I upgrade the AHF.

Hello everyone!!!

I hope you're doing well!

In my last post here, I've showed how to install the Oracle Autonomous Health Framework (AHF).  

Today, I'll show how you can upgrade the AHF and how to use the auto upgrade as well.  

But always remember:

  1. This step-by-step worked for me, but it may not work for you.
  2. It's a basic and limited environment. The real life will be different, for sure.
  3. This post is for study and testing as well, and has no concern for performance and security best practices.
So, let's get started!!! 

1) Download the AHF zip file

I'll download the last version, "AHF 23.8.0 for Linux". 






Important: I'll execute all opertations with user ROOT.

2) Check the zip file

There is no need to unzip the file.



3) Check the AHF services 

tfactl print status



4) Set to stage for upgrade (if you don't run auto upgrade process)

ahfctl setupgrade -swstage /u01/AHF


Important: If you don't run the setup upgrade, you'll receive the error below:


5) Finally, I'll run the upgrade

ahfctl upgrade



6) And now, I'll check the services

tfactl print status


The upgrade process also removes the zip file from the staging area.


You can make the process easier if you configure the auto upgrade process.

If you run this setup before upgrade, you don't need to run the stage setup (step 4):

ahfctl setupgrade -all

Enter autoupgrade flag <on/off> : on
Enter software stage location : /u01/AHF
Enter auto upgrade frequency : 30
AHF autoupgrade parameters successfully updated
Successfully synced AHF configuration
refreshConfig() completed successfully.




More information about auto upgrade here.

And that's it my friends. AHF has been updated and is ready to use!!!

So, I hope this has helped.

Regards
Mario

sexta-feira, 29 de setembro de 2023

[ORACLE] How do I install the Oracle Autonomous Health Framework (AHF)?

Hello everyone!!!

I hope you're doing well!

Today, I'll show you how to install the Oracle Autonomous Health Framework (AHF). 

I don't have an Oracle RAC installed here on my laptop, but I'll provide it. Today I'll show you a single-node environment.

I decided to write and learn a bit more about AHF after having the privilege of attending Sandesh Rao's live session at Oracle Cloudworld 2023 in Las Vegas.

First, what is Oracle Autonomous Health Framework?

In Oracle's words, it's a "Machine learning-based solution for maintaining database availability and performance".

In Mario's words, it's a "very cool tool that collects and groups your system health information and logs and uses Machine Learning to provide you insights and predictions so that you can act preventively, avoiding problems in your environment".



For more information, feel free to click.

So, let's get started!!!

But always remember:

  1. This step-by-step worked for me, but it may not work for you.
  2. It's a basic and limited environment. The real life will be different, for sure.
  3. This post is for study and testing as well, and has no concern for performance and security best practices.
1) Download the AHF zip file

In my post, I'll download version "AHF 23.7.0 for Linux". 

Calm down, calm down, buddy!!! I know we already have version 23.8 at the time of writing this post (Sep/23), but I'll show you how to upgrade the version on next post. 




2) Unzip the zip file

Important: I'll execute all installation with user ROOT.

[root@Mariao ~]# cd /u01/AHF
[root@Mariao ~]# unzip AHF-LINUX-v23.7.0.zip


3) Create the data directory.

[root@Mariao ~]# mkdir -p /AHF/Data


3) Run install.

In red, my changes and interactions.

[root@Mariao ~]# cd /u01/AHF/

[root@Mariao AHF]# ./ahf_setup 

AHF Installer for Platform Linux Architecture x86_64

AHF Installation Log : /tmp/ahf_install_237000_306422_2023_09_29-09_29_16.log

Starting Autonomous Health Framework (AHF) Installation

AHF Version: 23.7.0 Build Date: 202307281326

Default AHF Location : /opt/oracle.ahf

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

Please Enter new AHF Location : /AHF/Data

AHF Location : /AHF/Data/oracle.ahf

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

Choose Data Directory from below options : 

1. /AHF/Data/oracle.ahf [Free Space : 12525 MB]
2. Enter a different Location

Choose Option [1 - 2] : 1

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

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

Extracting AHF to /AHF/Data/oracle.ahf

Configuring TFA Services

Discovering Nodes and Oracle Resources

Not generating certificates as GI discovered

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

.----------------------------------------------------------------------------.
| Host   | Status of TFA | PID    | Port | Version    | Build ID             |
+--------+---------------+--------+------+------------+----------------------+
| mariao | RUNNING       | 308232 | 5000 | 23.7.0.0.0 | 23700020230728132609 |
'--------+---------------+--------+------+------------+----------------------'

Running TFA Inventory...

Adding default users to TFA Access list...

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

Starting ORAchk Scheduler from AHF

Setting up AHF CLI and SDK

AHF binaries are available in /AHF/Data/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_237000_306422_2023_09_29-09_29_16.log to /AHF/Data/oracle.ahf/data/mariao/diag/ahf/





4) And finally, check the installation.

[root@Mariao ~]# tfactl print status


[root@Mariao ~]#  tfactl toolstatus


[root@Mariao ~]# ahfctl statusahf
 


It's realy easy!

In the next post, I'll show you how to upgrade the AHF version.

So, I hope this has helped.

Regards
Mario

Postagem em destaque

[ORACLE] Useful scripts for the day-to-day life of a DBA (Part 3) - System metrics

Hello everyone.   Hope you're doing well! As I said here , I've created a repository on GITHUB to share some scripts that I like t...