8.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, and Oracle Support.
Diagnostic upload enables you to manage configurations of different types of uploads
in a generic way. Through ahfctl
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.
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: (optional) id
and
file
Parameters or arguments Supported by Different Endpoints
Table 8-5 Parameters or Arguments Supported by Different Endpoints
Parameter | Description |
---|---|
|
The target URL to upload files in case of HTTPS type. For example, https://samplehost.com. |
|
The name of the server to which you want to upload files. For example, sftpserver.domain.com. |
|
The user who has the privileges to access the endpoint. For example, upload.user@example.com. |
|
Password of the user. |
|
The URL of the proxy server. For example, www.example.com:80. |
|
The location or target where you want to upload your files to. |
|
The name of the file to upload. |
|
Specify If For example, upload files to PAR, Pre Authenticated URL where no user/password authentication is required. |
|
Any static header values while configuring. For example, set auth tokens while configuring the HTTPS end point. For example, You can also pass dynamic headers at upload time by
passing the For example: |
|
Stores the For example, to set the header: |
|
Specify If |
|
The database connect string to log in to the database where you want to upload files. For example, |
|
Specify the name of the table where you want to upload
files as For example, for uploading Oracle ORAchk collections to the
Collection Manager it is set to |
Example 8-1 Diagnostic Upload Examples To upload files to My Oracle Support
ahfctl 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
ahfctl setupload -name mos -type https -proxy www-proxy.example.com:80
ahfctl setupload -name mos -type https -user user_id -url https://transport.oracle.com/upload/issue -proxy www-proxy.example.com:80
Note:
Instead ofmos
,
you can specify any configuration name of your choice.
- 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 withdiagcollcet
command:tfactl diagcollect -last 1h -sr 3-23104325631
Note:
In this case, upload configuration name should be
mos
as internally Oracle Trace File Analyzer looks for this name. It works even if MOS configuration is set using thetfactl setupmos
command in versions earlier than 20.2.
Example 8-2 Uploading a File Using SFTP
ahfctl upload -name sftp1 -file test_sftp_upload.log
Upload for: sftp1
Uploading file using pexpect
sftp> put test_sftp_upload.log
put test_sftp_upload.log
Uploading test_sftp_upload.log to /root/test_sftp_upload.log
test_sftp_upload.log 100% 17 0.0KB/s 00:00
sftp> quit
type: sftp
file: test_sftp_upload.log
Upload completed successfully
Example 8-3 Diagnostic Upload Examples
ahfctl setupload -name mysqlnetconfig -type sqlnet
[root@myserver1]# ahfctl 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
ahfctl setupload -name mysqlnetconfig2 -type sqlnet
-user user_name@example.com
-password
option and therefore
reports:Database upload parameter(s) successfully stored. AHF will not upload collections into the database until the following parameters are also set: ['password', 'connectstring', 'uploadtable']
-user
command option,
ahfctl
does NOT prompt for the other required parameters so you
must explicitly specify them at the command line as follows:
ahfctl setupload -type sqlnet -name orachkcm -user testuser -password -connectstring sqlnet connect string -uploadtable RCA13_DOCS
The -password
command option DOES NOT take any
arguments. When specified, ahfctl
prompts you to provide the
password for the user you specified using the -user
command
option.
AHF.properties
file:ahfctl getupload
# ahfctl getupload
Upload configurations available:
1. mysftpconfig
2. myhttpsconfig
3. mysqlnetconfig
ahfctl getupload -name mysftpconfig
# ahfctl getupload -name mysftpconfig
Upload configuration get for: mysftpconfig
type: sftp
user: testuser1@example.com
password: #########
server: sftphost.example.com
ahfctl getupload -name mysftpconfig -user
[root@myserver1]# ahfctl getupload -name mysftpconfig -user
Upload configuration get for: mysftpconfig
type: sftp
user: testuser1@example.com
ahfctl checkupload -name mysftpconfig
# ahfctl checkupload -name mysftpconfig -type sftp
Upload configuration check for: mysftpconfig
Parameters are configured correctly to upload files to sftp end point mysftpconfig
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.
ahfctl unsetupload -name mysftpconfig -user
# ahfctl unsetupload -name mysftpconfig -user
Upload configuration successfully unset for: mysftpconfig
ahfctl unsetupload -name mysftpconfig -all
# ahfctl unsetupload -name mysftpconfig -all
Upload configuration successfully unset for: mysftpconfig
exachk -showpass -localonly -check BF7AE780E1252F69E0431EC0E50AE447
# exachk -showpass -localonly -check BF7AE780E1252F69E0431EC0E50AE447
Orachk.zip successfully uploaded to RCA13_DOCS table
tfactl
diagcollect
:$ tfactl diagcollect -since 1h -upload mos -id 3-123456789
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
Parent topic: Using On-Demand Diagnostic Collections