6.7 Diagnostic Upload

Diagnostic upload eliminates the need for different set of commands to upload Oracle ORAchk, Oracle EXAchk, and Oracle Trace File Analyzer diagnostic collections to AHF Service, database, BugDB, and Oracle Support.

Diagnostic upload enables you to manage configurations of different types of uploads in a generic way. Through tfactl command-line interface, you use generic upload commands to set, get, unset, and check configurations. Configurations are uniquely identified using configuration name so that you can pass the configuration name in command-line to perform upload and other operations.

AHF synchronizes the configuration automatically across the cluster nodes. If you find any sync issues, then run the tfactl syncahfconfig -c command to sync configuration across the cluster nodes.

Diagnostic upload supports multiple operating system users to run the diagnostic upload commands if you install AHF as root. If you install AHF as a non-root user, then you cannot benefit from the multiple operating system users support.

Note:

Currently not supported on Microsoft Windows.

Currently, AHF supports HTTP, SQLNET, and SFTP types or protocols, or end points. Following sections list the parameters or arguments supported by different end points while setting the configuration.

HTTP

Set Parameters: url, user, password, proxy, noauth, https_token, header, secure, and storetype

Upload Parameters: id, file, and https_token

SQLNET

Set Parameters: user, password, connectstring, and uploadtable.

Upload Parameters: file.

SFTP

Set Parameters: server, user, and password.

Upload Parameters: id and file.

Parameters or arguments Supported by Different End Points

Table 6-5 Parameters or Arguments Supported by Different End Points

Parameter Description

url

The target URL to upload files in case of HTTPS type. For example, https://samplehost.com.

server

The name of the server to which you want to upload files. For example, sftpserver.domain.com.

user

The user who has the privileges to access the endpoint. For example, upload.user@example.com.

password

Password of the user.

proxy

The URL of the proxy server. For example, www.example.com:80.

id

The location or target where you want to upload your files to.

file

The name of the file to upload.

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

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

For example, tfactl 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:tfactl 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

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.

Example 6-1 Diagnostic Upload Examples To upload files to My Oracle Support

To setup MOS configuration:
tfactl setupload -name mos -type https 

Enter mos.https.user: user_id 
Enter mos.https.password: ######## 
Enter mos.https.url: https://transport.oracle.com/upload/issue 

Upload configuration set for: mos 
type: https 
user: user_id 
password: ######## 
url: https://transport.oracle.com/upload/issue
To set proxy:
tfactl setupload -name mos -type https -proxy www-proxy.example.com:80
Single line command:
tfactl setupload -name mos -type https -user user_id -url https://transport.oracle.com/upload/issue -proxy www-proxy.example.com:80

Note:

Instead of mos, you can specify any configuration name of your choice.
To upload collections or files to MOS: There are multiple ways you can upload files to MOS after configuring MOS.
  • Upload files as part of Oracle Trace File Analyzer diagnostic collection:
    tfactl diagcollect -last 1h -upload mos -id 3-23104325631
  • Upload files standalone:
    tfactl upload -name mos -id 3-23104325631 -file /tmp/generated.zip
  • Backward compatibility or upload using -sr flag with diagcollcet command:
    tfactl diagcollect -last 1h -sr 3-23104325631

    Note:

    In this case, upload configuration name should be mos as intrnally Oracle Trace File Analyzer looks for this name. It works even if MOS configuration is set using the tfactl setupmos command in versions earlier than 20.2.

Example 6-2 Diagnostic Upload Examples

To set configuration parameters for the specified configuration name and SQLNET configuration type:
tfactl setupload -name mysqlnetconfig -type sqlnet
[root@myserver1]# tfactl setupload -name mysqlnetconfig -type sqlnet
Enter mysqlnetconfig.sqlnet.user: testuser
Enter mysqlnetconfig.sqlnet.password: ########
Enter mysqlnetconfig.sqlnet.connectstring: (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = testhost)(PORT = 1521))(CONNECT_DATA =(SERVER = DEDICATED)(SERVICE_NAME = testservice)))
Enter mysqlnetconfig.sqlnet.uploadtable: RCA13_DOCS

Upload configuration set for: mysqlnetconfig
type: sqlnet
user: testuser
password: ########

connectstring: (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = testhost)(PORT = 1521))(CONNECT_DATA =(SERVER = DEDICATED)(SERVICE_NAME = testservice)))
uploadtable: RCA13_DOCS
To set individual parameters for the specified configuration name and SQLNET configuration type:
tfactl setupload -name mysqlnetconfig2 -type sqlnet -user user_name@example.com
# tfactl setupload -name mysqlnetconfig2 -type sqlnet -user testuser2
Upload configuration set for: mysqlnetconfig2
type: sqlnet
user: testuser2
To get the list of all configured names in the AHF.properties file:
tfactl getupload
# tfactl getupload
Upload configurations available:
1. mysftpconfig
2. myhttpsconfig
3. mysqlnetconfig
To get all configuration parameters for the specified configuration name:
tfactl getupload -name mysftpconfig
# tfactl getupload -name mysftpconfig
Upload configuration get for: mysftpconfig
type: sftp
user: testuser1@example.com
password: #########
server: sftphost.example.com
To get individual parameter for the specified configuration name:
tfactl getupload -name mysftpconfig -user
[root@myserver1]# tfactl getupload -name mysftpconfig -user
Upload configuration get for: mysftpconfig 
type: sftp 
user: testuser1@example.com
To check or validate configuration of the specified configuration name:
tfactl checkupload -name mysftpconfig
# tfactl checkupload -name mysftpconfig -type sftp
Upload configuration check for: mysftpconfig
Parameters are configured correctly to upload files to sftp end point mysftpconfig
To upload to target using the configuration name specified:
tfactl upload -name mysftpconfig -id 30676598 -file /tmp/temp.txt
# tfactl upload -name mysftpconfig -id 30676598 -file /tmp/filename.txt
Upload for: mysftpconfig
type: sftp 
file: /tmp/filename.txt
id: 30676598
Upload completed successfully.
To unset individual parameter of the specified configuration name:
tfactl unsetupload -name mysftpconfig -user
# tfactl unsetupload -name mysftpconfig -user 
Upload configuration successfully unset for: mysftpconfig
To unset all parameters of the specified configuration name:
tfactl unsetupload -name mysftpconfig -all
# tfactl unsetupload -name mysftpconfig -all
Upload configuration successfully unset for: mysftpconfig
To auto upload generated zip file to the database using Oracle ORAchk:
exachk -showpass -localonly -check BF7AE780E1252F69E0431EC0E50AE447
# exachk -showpass -localonly -check BF7AE780E1252F69E0431EC0E50AE447
Orachk.zip successfully uploaded to RCA13_DOCS table
To auto upload generated zip file to MOS using tfactl diagcollect:
$ tfactl diagcollect -since 1h -upload mos -id 3-123456789
To upload generated zip to the database with the configurations set by AHF with the specified database config name:
exachk -showpass -localonly -check BF7AE780E1252F69E0431EC0E50AE447 -db_config_name user_dbconf
# exachk -showpass -localonly -check BF7AE780E1252F69E0431EC0E50AE447 -db_config_name user_dbconf
Orachk.zip successfully uploaded to RCA13_DOCS table