One of the cool features of the Autonomous Health Framework (AHF) is the ” Baseline Comparison” of orachk report. As the name alludes to, this report compares the contents of multiple orachk reports and displays their differences.
It’s interesting to note here that compared reports can belong to the same or different hosts, giving rise to several use cases. Some typical ones could be
- Comparing the configuration of your staging and prod environments
- Comparing the configuration of your host now with the configuration at an earlier point in time. i.e., A configuration drift analysis.
In addition to comparing the reports, orachk can also merge reports to give you a holistic view of your system. More about this later in the post.
Difference Report
The “orachk -diff” command prompts users to input the reports they want to compare for report generation. The report format is flexible, and orachk supports comparisons based on an
- Output directory name
- ZIP
- HTML
The report is named the “Health Check Baseline Comparison Report.” The details about understanding the orachk report can be found here. It highlights the differences between the two systems and includes a dedicated section for presenting unique check findings on each system.
We can generate these reports on demand or automatically, so let’s look at both options.
On-Demand Report
# Identify the location of the orachk reports
[oracle@node1 ~]$ orachk -showahfhome
/opt/oracle.ahf
[oracle@node1 ~]$ orachk -showdatadir
/opt/oracle.ahf/data/node1/orachk/user_oracle/output
# Create a difference Report
[oracle@node1 output]$ orachk -diff orachk_node1_dev1_090422_055324.zip orachk_node1_axdev2_090422_060048.zip
Summary
Total : 207
Missing : 0
New : 0
Changed : 1
Same : 206
Check comparison is complete. The comparison report can be viewed in: /opt/oracle.ahf/data/node1/orachk/user_oracle/output/orachk_090422055324_090422060048_diff.html
[oracle@node1 output]$ orachk -diff orachk_node1_dev1_090422_055324.zip orachk_node1_dev1_090422_060048.zip -json
Summary
Total : 207
Missing : 0
New : 0
Changed : 1
Same : 206
Check comparison is complete. The comparison report can be viewed in: /opt/oracle.ahf/data/node1/orachk/user_oracle/output/orachk_090422055324_090422060048_diff.json
Automatic Reports
When scheduling orachk to run in silent mode using the daemon, you can configure it to email the results to your inbox. Interestingly, that orachk automatically compares the latest report with the previous one and shares the difference report with you. This can help you monitor the changes in your system over time from your inbox.
Merge Report
Like comparing the reports, orachk offers a feature to merge two reports. This feature is most useful in role-separated systems, where different users have privileges to run a subset of checks. Merging reports can help you get a more holistic picture of your environment configuration.
$ orachk -merge orachk_host01_dev1_090422_060048.zip,orachk_host01_dev2_090422_062532.zip
Merging following collections:
/opt/oracle.ahf/data/host01/orachk/user_oracle/output/orachk_host01_dev1_090422_060048.zip
/opt/oracle.ahf/data/host01/orachk/user_oracle/output/orachk_host01_dev2_090422_062532.zip
Started merging - /opt/oracle.ahf/data/host01/orachk/user_oracle/output/orachk_host01_dev1_090422_060048.zip
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Started merging - /opt/oracle.ahf/data/host01/orachk/user_oracle/output/orachk_host01_dev2_090422_062532.zip
UPLOAD [if required] - /opt/oracle.ahf/data/host01/orachk/user_oracle/output/orachk_host01_dev1_090422_060048_merge.zip