Running AHFCTL Upload Commands to Upload Diagnostics

You need root access to ahfctl, or sudo access to run setupload, getupload, checkupload, and unsetupload commands.

ahfctl upload

Use the ahfctl upload command to configure upload parameters.

You can run the upload command as root or a non-root user.

Syntax

ahfctl upload
[-h]
[-debug]
[-name NAME]
[-id ID]
[-file FILE]
[-header HEADER]
[-tls TLS]
[-ciphers CIPHERS]
[-insecure ]

Parameters

ahfctl upload Command Parameters

ParameterDescription
debugSpecify the name of the debug script file.
nameSpecify the name of your configuration. For example, sftpconf to upload a file using SFTP.
idSpecify the identifier number, for example, SR number.
fileSpecify the name of the file to upload, for example, /tmp/generated.zip.
header

Stores the executionId in the ahf.properties file.

For example, to set the header:ahfctl setupload -name a1 -type https -header X-TFA-HEADERS:executionId=aeldb1db01_2020.06.16_19.20.55.15336025

tlsSpecify the version of TLS for curl OSS upload.
ciphersSpecify ciphers for curl OSS upload.
insecureEnables or disables security.

Example Upload to MOS using ahfctl upload:

ahfctl upload -name mos -id 3-23104325631 -file
/opt/oracle.ahf/data/repository/auto_srdc_ORA-00600_20200706T18:58:09_myserver
1.zip

Example Upload to MOS using ahfctl diagcollect:

ahfctl diagcollect -upload mos -srdc ORA-00600 -id 3-23104325631

or

ahfctl diagcollect -srdc ORA-00600 -sr 3-23104325631

Ensure that the MOS configuration name is "mos". For more information, see ahfctl setupload.

ahfctl checkupload

Use the ahfctl checkupload command to validate the configured upload parameters.

You can run the checkupload command as root or a non-root user.

Syntax

ahfctl checkupload
[-h][--help]
[-name NAME]

Parameters

ahfctl checkupload Command Parameters

ParameterDescription
nameSpecify the name of your configuration. For example, mosconfig to upload to My Oracle Support.

ahfctl getupload

Use the ahfctl getupload command to fetch the details of configured upload parameters.

You can run the getupload command as root or a non-root user.

Syntax

ahfctl getupload
[-h][--help]
[-all]
[-name NAME]
[-user USER]
[-password]
[-server SERVER]
[-url URL]
[-proxy PROXY]
[-noauth NOAUTH]
[-request REQUEST]
[-https_token HTTPS_TOKEN]
[-header HEADER]
[-secure SECURE]
[-connectstring CONNECTSTRING]
[-uploadtable UPLOADTABLE]
[-port PORTNUMBER]

Parameters

ahfctl getupload Command Parameters

ParameterDescription
allAll of the parameters.
nameSpecify the name of your configuration. For example, mosconfig.
userSpecify the user who has the privileges to access the endpoint. For example, upload.user@example.com.
passwordSpecify the password of the user.
serverSpecify the name of the server to which you have uploaded files. For example, bugsftp.example.com.
urlSpecify the target URL in case of HTTPS type. For example, https://samplehost.com.
proxySpecify the URL of the proxy server. For example, www.example.com:80.
noauth

Specify true and false. Default value is false.

If noauth is set to true, then HTTPS upload will skip authentication.

For example, upload files to PAR, Pre Authenticated URL where no user/password authentication is required.

requestSpecify the request type, for example, POST.
https_token

Specify any static header values while configuring. For example, set auth tokens while configuring the HTTPS end point.

You can also pass dynamic headers at upload time by passing the -https_token headers command option to tfactl upload command.

For example: -H 'X-TFA-REQUESTID: 1'.

header

Stores the executionId in the ahf.properties file.

For example, to set the header:ahfctl setupload -name a1 -type https -header X-TFA-HEADERS:executionId=aeldb1db01_2020.06.16_19.20.55.15336025

secure

Specify true or false. Default value is true.

Specifying the secure value checks for certificates.

If secure is set to false, the upload command will run an unsecure upload.

connectstring

Specify the database connect string to log in to the database where you have uploaded files.

For example, (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = host)(PORT = 1521))(CONNECT_DATA =(SERVER = DEDICATED)(SERVICE_NAME = orcl))).

uploadtable

Specify the name of the table where you have uploaded files as BLOB type.

For example, for uploading Oracle Orachk collections to the Collection Manager it is set to RCA13_DOCS.

portSpecify a custom port number. If you do not specify a port, then 443 is used by default. You can set a port number in the range of 0 - 65353.
ahfctl getupload -name ahf_upgrade_loc
Upload configuration get for: ahf_upgrade_loc
type: https
ahf_upgrade_loc.https.user : [not set]
ahf_upgrade_loc.https.password : [not set]
ahf_upgrade_loc.https.url :
https://10.65.16.53/rest/tfa-processor/download?osName=LINUX&ahfVersion=%2720.2%27
ahf_upgrade_loc.https.storetype : [not set]
ahf_upgrade_loc.https.proxy : [not set]
ahf_upgrade_loc.https.secure : [not set]
ahf_upgrade_loc.https.noauth : [not set]
ahf_upgrade_loc.https.https_token : ******
ahf_upgrade_loc.https.request : [not set]
ahf_upgrade_loc.https.header : Content-Type:application/json
ahf_upgrade_loc.https.useinstanceprincipal : [not set]
ahf_upgrade_loc.https.ociclient : [not set]
ahf_upgrade_loc.https.port : 4545

ahfctl setupload

Use the ahfctl setupload command to set upload parameters.

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

.

You can run the setupload command as root or a non-root user.

Syntax

ahfctl setupload
[-h][--help]
[-all]
[-type TYPE]
[-name NAME]
[-user USER]
[-password]
[-server SERVER]
[-url URL]
[-proxy PROXY]
[-noauth NOAUTH]
[-https_token HTTPS_TOKEN]
[-request REQUEST]
[-header HEADER]
[-secure SECURE]
[-connectstring CONNECTSTRING]
[-uploadtable UPLOADTABLE]
[-port PORTNUMBER]

Parameters

ahfctl setupload Command Parameters

ParameterDescription
allAll of the parameters.
typeSpecify the type of an endpoint. For example, https, sftp, or sqlnet.
nameSpecify a unique descriptive name to your configuration. For example, mosconfig to upload to My Oracle Support.
userSpecify the user who has the privileges to access the endpoint. For example, upload.user@example.com.
password

If this option is passed, AHF will prompt you to enter the password.

You can also set the password using the environment variable AHF_SERVICE_PASSWORD. For example: $ export AHF_SERVICE_PASSWORD="user_password"

serverSpecify the name of the server to which you want to upload files. For example, bugsftp.example.com.
urlSpecify the target URL to upload files in case of HTTPS type. For example, https://samplehost.com.
proxySpecify the URL of the proxy server. For example, www.example.com:80.
noauth

Specify true and false. Default value is false.

If noauth is set to true, then HTTPS upload will skip authentication.

For example, upload files to PAR, Pre Authenticated URL where no user/password authentication is required.

requestSpecify the request type, for example, POST.
https_token

Specify any static header values while configuring. For example, set auth tokens while configuring the HTTPS end point.

For example, ahfctl setupload -name config -type https -https_token 'abc:13'.

You can also pass dynamic headers at upload time by passing the -https_token headers command option to tfactl upload command.

For example: -H 'X-TFA-REQUESTID: 1'.

header

Stores the executionId in the ahf.properties file.

For example, to set the header:ahfctl setupload -name a1 -type https -header X-TFA-HEADERS:executionId=aeldb1db01_2020.06.16_19.20.55.15336025

secure

Specify true or false. Default value is true.

Specifying the secure value checks for certificates.

If secure is set to false, then the upload command will run an unsecure upload.

connectstring

Specify the database connect string to log in to the database where you want to upload files.

For example, (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = host)(PORT = 1521))(CONNECT_DATA =(SERVER = DEDICATED)(SERVICE_NAME = orcl))).

uploadtable

Specify the name of the table where you want to upload files as BLOB type.

For example, for uploading Oracle Orachk collections to the Collection Manager, it is set to RCA13_DOCS.

portSpecify a custom port number. If you do not specify a port, then 443 is used by default. You can set a port number in the range of 0 - 65353.

To setup MOS configuration:

ahfctl setupload -name mos -type https -user sample_user@domain.com -url https://transport.oracle.com/upload/issue

To set proxy for MOS configuration:

ahfctl setupload -name mos -type https -proxy www-proxy.server.com:80

To set a custom port:

ahfctl setupload -name my_upload -type https -url 'https://samplehost.com' -https_token "abc:13" -header Content Type:application/json -port 4545

To upload to MOS using tfactl upload:

tfactl upload -name mos -id 3-23104325631 -file /opt/oracle.ahf/data/repository/auto_srdc_ORA-00600_20200706T18:58:09_myserver1.zip

To upload to MOS using tfactl diagcollect:

tfactl diagcollect -upload mos -srdc ORA-00600 -id 3-23104325631

or

tfactl diagcollect -srdc ORA-00600 -sr 3-23104325631

Note:

Ensure that the configuration name is mos.

ahfctl unsetupload

Use the ahfctl unsetupload command to unset the configured upload parameters.

You can run the unsetupload command as root or a non-root user.

Syntax

ahfctl unsetupload -name <config_name> {-all | <config_parameter> ...
} [Options]

Options:
  -h, --help      show this help message and exit
  -debug          Debug Script

Config parameters:
  -user
  -password
  -server
  -url
  -storetype
  -proxy
  -secure
  -connectstring
  -uploadtable
  -noauth
  -https_token
  -request
  -header
  -port

Parameters

ahfctl unsetupload Command Parameters

ParameterDescription
allAll of the parameters.
nameSpecify the name of your configuration. For example, mosconfig to upload to My Oracle Support.
userSpecify the user who has the privileges to access the endpoint. For example, upload.user@example.com.
passwordSpecify the password of the user.
serverSpecify the name of the server to which you have uploaded the files. For example, bugsftp.example.com.
urlSpecify the target URL to which you have uploaded the files in case of HTTPS type. For example, https://samplehost.com.
-storetypeSpecify the storetype. For example, casper.
proxySpecify the URL of the proxy server. For example, www.example.com:80.
secure

Specify true or false. Default value is true. Specifying the secure value checks for certificates.

If secure is set to false, then the upload command will run an unsecure upload.

connectstring

Specify the database connect string to log in to the database where you have uploaded files.

For example, (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = host)(PORT = 1521))(CONNECT_DATA =(SERVER = DEDICATED)(SERVICE_NAME = orcl))).

uploadtable

Specify the name of the table where you have uploaded the files as BLOB type.

For example, for uploading Oracle Orachk collections to the Collection Manager it is set to RCA13_DOCS.

noauth

Specify true and false. Default value is false.

If noauth is set to true, then HTTPS upload will skip authentication.

For example, upload files to PAR, Pre Authenticated URL where no user/password authentication is required.

https_token

Specify any static header values while configuring. For example, set auth tokens while configuring the HTTPS end point.

You can also pass dynamic headers at upload time by passing the -https_token headers command option to tfactl upload command.

For example: -H 'X-TFA-REQUESTID: 1'.

requestSpecify the request type, for example, POST.
header

Stores the executionId in the ahf.properties file.

For example, to set the header:ahfctl setupload -name a1 -type https -header X-TFA-HEADERS:executionId=aeldb1db01_2020.06.16_19.20.55.15336025

ahfctl unsetupload -name mos -all
ahfctl unsetupload -name mos -url -secure