9.5.2 ahf analysis

Use the ahf analysis command to generate AHF Insights and AHF Balance reports.

AHF 23.8

Starting in AHF 23.8, you will be able to upload AHF Insights report automatically if Object Store is configured as part of AHF. Uploading AHF Insights reports helps Oracle Cloud Operations to identify, investigate, track, and resolve system health issues and divergences in best practice configurations quickly and effectively.

Oracle Autonomous Database on Dedicated Exadata Infrastructure and Oracle SaaS

To set REST endpoints (Object Store's), run:
ahfctl setupload -name oss -type https -user <user> -url <object_store> -password
To upload AHF Insights report to Object Store, run:
ahf analysis create --type insights
.

ahf analysis create

ahf analysis create [-h] [--type {insights|impact}] [[--last n{m|h} [--refresh] | --for DATETIME | --from DATETIME --to DATETIME] [--tag TAGNAME] | [--scope SCOPE --name NAME --cluster CLUSTER --clusters CLUSTER_LIST]][--output-file PATH] [--to-json]

Syntax: AHF Balance

ahf analysis create [-h] --type impact --scope [fleet|cluster|database] [--cluster CLUSTER_NAME] [--clusters space-delimited list of clusters
] [--em-group] --name NAME

Parameters

Table 9-127 ahf analysis create --type impact Command Parameters

Parameter Description

-h, --help

Show this help and exit.

--type impact

Specify the type of report to generate.

--scope [fleet|cluster|database]

Specify to generate AHF Balance reports - Fleet Report, Cluster Report, and Database Report

Specify the --scope and --name options to create an impact analysis.

The --cluster option is required for database impact analysis.

--output-file PATH

Specify to create output file in the specified location.

--clusters clu1 clu2 clu3

Specify a space-delimited list of clusters to include in the fleet scope.

--name NAME

Specify the name of the fleet, EM Group, cluster, or database to report on.

--em-group

Specify the EM group name.

Note:

This option is mutually exclusive with the --clusters option and must be used with the --scope fleet option.
For example:
ahf analysis create --type impact --scope fleet --name <em-group-name> --em-group

--user-name USER_NAME

Specify the Oracle Enterprise Manager Repository user name.

Note:

Not required if AHF Balance has been configured. For more information, see ahf configuration.

--connect-string CONNECT_STRING

Specify the connect string for the Oracle Enterprise Manager Repository.

Note:

Not required if AHF Balance has been configured. For more information, see ahf configuration.

Syntax: AHF Insights

ahf analysis create [-h] --type insights [--last n{m|h} | --for DATETIME | --from DATETIME --to DATETIME] [--refresh] [--tag TAGNAME
]

Parameters

Table 9-128 ahf analysis create --type insights Command Parameters

Parameter Description

-h, --help

Show this help and exit.

--type insights

Specify the type of report to generate.

--last n{m|h}

Specify the --last parameter to analyze data for the past number of minutes (m) or hours (h).

--last cannot be greater than 12 hours.

--for <DATETIME>

Specify the --for parameter to analyze data for a 2 hour period before and after the timestamp specified.

Supported time formats:
"YYYY-MM-DDTHH:MM:SS"
"YYYY-MM-DD HH:MM:SS"

--from <DATETIME>

--to <DATETIME>

Specify the --from and --to parameters (you must use these two parameters together) to analyze data for a specific time interval.

Supported time formats:
"YYYY-MM-DDTHH:MM:SS"
"YYYY-MM-DD HH:MM:SS"
"YYYY-MM-DD"

Time difference between from and to time should not be more than 4 hours.

--refresh

Provides fresh data from AHF Insights sources.

Specify --refresh alone or together with --last to provide fresh data from AHF Insights sources.

--include-cell-data

Specify to include data from cell into AHF Insights sources.

--tag TAGNAME

Specify to collect the files into the TAGNAME directory inside the repository.

Syntax: ahf analysis explore

ahf analysis explore [-h] [--with scope] [--from-file FILE]

Parameters

Table 9-129 ahf analysis explore Command Parameters

Parameter Description

-h, --help

Show this help and exit.

--from-file FILE

Specify to read from a file.

If you do not specify the file extension, then AHF Scope assumes .mdb as the file extension.

Example 9-125 AHF Insights Analysis Usage Examples

Specify [--last | --for | --from --to] to create an analysis for a given period of time. Maximum time interval allowed is 4 hrs.

Specify [--refresh] alone or together with [--last] to provide fresh data from AHF Insights sources.

  • Create analysis report from the data collected in the last 3 hours:
    ahf analysis create --type insights --last 3h
  • Create analysis for a 2-hour period centered at the specified timestamp:
    ahf analysis create --type insights --for 2022-10-10T14:00:00
  • Create analysis for a given time range:
    ahf analysis create --type insights --from 2022-10-10T14:00:00 --to 2022-10-10T15:30:00
  • Create analysis specifying a timezone:
    ahf analysis create --type insights --from 2022-10-10T14:00:00 --to 2022-10-11T13:30:00
  • Create analysis with most recent data:
    ahf analysis create --type insights --refresh
  • Create analysis with a tag:
    ahf analysis create --type insights --tag my_tag

Example 9-126 AHF Balance Usage Examples

Specify [--scope] and [--name] options to create an impact analysis.

The [--cluster] option is required for database impact analysis.

  • Create analysis for a fleet (all clusters):
    ahf analysis create --type impact --scope fleet --name fleet1
  • Create analysis for a fleet (cluster list):
    ahf analysis create --type impact --scope fleet --name fleet1 --clusters clu1 clu2 clu3
  • Create analysis for a cluster:
    ahf analysis create --type impact --scope cluster --name cluster1
  • Create analysis for a database:
    ahf analysis create --type impact --scope database --cluster cluster1 --name database1
  • Create analysis specifying the output directory:
    ahf analysis create --type impact --scope fleet --name fleet1 --output-file /custom_path/custom_name.html
  • Create analysis specifying EM repository user name and password:
    ahf analysis create --type impact --scope fleet --name fleet1 --user-name oracle --connect-string <cs>