9.3.1.22 tfactl queryindex
Use the tfactl queryindex
command to view stored
events.
Syntax
tfactl queryindex -category result | metadata
[-checkid ID]
[-target target]
[-severity severity
[-name keywords
[-fields all | fields_list]
[-last nh|d | -from time -to time]
Parameters
Table 9-62 tfactl queryindex Command Parameters
Parameter | Description |
---|---|
|
Searches all metadata stored in the Oracle Trace File Analyzer index. The compliance check run result consists of data like check ID, status, and so on while metadata consist of compliance run information like user, start time, end time, and so on. Example
Metadata
Example
Result
|
|
Searches results by check ID. |
|
Searches results by target. Specify a target, or a list of comma-delimited list of targets. Note: If you do not specify a target, then Oracle Trace File Analyzer displays data for all of the targets.Valid values:
|
|
Searches results by severity. Valid values:
|
|
Searches results by check name. To query multiple check names, provide a space-delimited list of check names. |
|
Specify the fields to restrict to a subset of
attributes, for example, Note: Field names are case sensitive.By default, the field is set to
|
|
Specify hours or days to query data since the
previous Specify the Valid date and time formats:
|
Example 9-75 tfactl queryindex
tfactl queryindex -category result -from "2021-06-29 09:00:00" -to "2021-06-29 15:00:00" | python -m json.tool
[
{
"Result": [
{
"ActualValue": "1",
"AlertType": "CRITICAL",
"DBVersion": "112040",
"EngineeredSystems": "Exadata",
"ExadataVersion": "NULL",
"ExecTimestamp": "2021-06-29 09:42:51 EDT",
"ExpectedValue": "1",
"HardwareType": "X4-2",
"ID": "002331F422E014CAE05312C0E50AA2F3",
"MsgDetail": "DATA FROM testhost - EXADATA DATABASE SERVER ROLLING SWITCH PATCHING MINIMUM GI SOFTWARE REQUIREMENT //n32240590;TOMCAT RELEASE UPDATE 19.0.0.0.0 (32240590)//n32222571;OCW Interim patch for 32222571//n32218663;ACFS RELEASE UPDATE 19.10.0.0.0 (32218663)//n32218454;Database Release Update :19.10.0.0.210119 (32218454)//n29340594;DBWLM RELEASE UPDATE 19.0.0.0.0 (29340594)//nOPatch succeeded.",
"Name": "Exadata Database Server rolling switch patching minimum GI software requirement",
"NodeName": "testhost.example.com",
"OSVersion": "7",
"Profile": "dba",
"RackIdentifier": "Cluster-c1",
"RackType": "N/A",
"ReturnCode": "1",
"Status": "PASS",
"StatusCode": "0",
"TargetType": "CRS_HOME",
"Type": "OS",
"message": "Exadata Database Server GI software version meets requirement for rolling switch patching",
"modelVersion": "21.2.0(dev)_20210622"
},
{
"ActualValue": "0",
"AlertType": "CRITICAL",
"DBVersion": "112040",
"EngineeredSystems": "Exadata",
"ExadataVersion": "NULL",
"ExecTimestamp": "2021-06-29 09:43:00 EDT",
"ExpectedValue": "0",
"HardwareType": "X4-2",
"ID": "AA8C83A023362C5EE040E50A1EC0146A",
"MsgDetail": "DATA FROM testhost - CDBM121 DATABASE - RECOVERY AND CREATE FILE DESTINATIONS//ndb_recovery_file_dest = +RECOC1//ndb_create_file_dest = +DATAC1//nDATA FROM testhost - CDBM122 DATABASE - RECOVERY AND CREATE FILE DESTINATIONS//ndb_recovery_file_dest = +RECOC1//ndb_create_file_dest = +DATAC1//nDATA FROM testhost - CDBM19C DATABASE - RECOVERY AND CREATE FILE DESTINATIONS//ndb_recovery_file_dest = +RECOC1//ndb_create_file_dest = +DATAC1//nDATA FROM testhost - RAC11G DATABASE - RECOVERY AND CREATE FILE DESTINATIONS//ndb_recovery_file_dest = +RECOC1//ndb_create_file_dest = +DATAC1//nDATA FROM testhost - RAC12C DATABASE - RECOVERY AND CREATE FILE DESTINATIONS//ndb_recovery_file_dest = +RECOC1//ndb_create_file_dest = +DATAC1//nDATA FROM testhost - RAC1 DATABASE - RECOVERY AND CREATE FILE DESTINATIONS//ndb_recovery_file_dest = +RECOC1//ndb_create_file_dest = +DATAC1//nDATA FROM testhost - SING11G DATABASE - RECOVERY AND CREATE FILE DESTINATIONS//ndb_recovery_file_dest = +RECOC1//ndb_create_file_dest = +DATAC1",
"Name": "Recovery and Create File Destinations",
"NodeName": "testhost.example.com",
"OSVersion": "7",
"Profile": "dba",
"RackIdentifier": "Cluster-c1",
"RackType": "N/A",
"ReturnCode": "0",
"Status": "PASS",
"StatusCode": "0",
"TargetType": "RDBMS",
"Type": "OS",
"message": "Database DB_CREATE_FILE_DEST and DB_RECOVERY_FILE_DEST are in different diskgroups",
"modelVersion": "21.2.0(dev)_20210622"
}
],
"hostname": "testhost1"
}
]
tfactl queryindex -category metadata -from "2021-06-29 09:00:00" -to "2021-06-29 15:00:00" | python -m json.tool
[
{
"Result": [
{
"end_time": "2021-06-29 09:33:27 UTC",
"error": "somemsg",
"health_score": "0",
"nodename": "testhost",
"output_zip_name": "exachk_testhost_rac19c_061421_093053",
"result_location": "/opt/oracle.ahf/data/testhost/exachk/user_root/output",
"run_arguments": "-showpass -check B407B045E9413B83E053D598EB0A8904 -excludeprofile storage,switch -dball -silentforce ",
"run_type": "STANDALONE",
"size": "45363",
"start_time": "2021-06-29 09:31:35 UTC",
"user": "root"
}
],
"hostname": "testhost1"
}
]
tfactl queryindex -category metadata -last 20d | python -m json.tool
[
{
"Result": [
{
"end_time": "2021-06-29 09:33:27 UTC",
"error": "somemsg",
"health_score": "0",
"nodename": "testhost",
"output_zip_name": "exachk_testhost_rac19c_061421_093053",
"result_location": "/opt/oracle.ahf/data/testhost/exachk/user_root/output",
"run_arguments": "-showpass -check B407B045E9413B83E053D598EB0A8904 -excludeprofile storage,switch -dball -silentforce ",
"run_type": "STANDALONE",
"size": "45363",
"start_time": "2021-06-29 09:31:35 UTC",
"user": "root"
}
],
"hostname": "testhost1"
}
]
tfactl queryindex -category result -from "2021-06-29 09:00:00" -to "2021-06-29 15:00:00" -checkid 002331F422E014CAE05312C0E50AA2F3 | python -m json.tool
[
{
"Result": [
{
"ActualValue": "1",
"AlertType": "CRITICAL",
"DBVersion": "112040",
"EngineeredSystems": "Exadata",
"ExadataVersion": "NULL",
"ExecTimestamp": "2021-06-29 09:42:51 EDT",
"ExpectedValue": "1",
"HardwareType": "X4-2",
"ID": "002331F422E014CAE05312C0E50AA2F3",
"MsgDetail": "DATA FROM testhost - EXADATA DATABASE SERVER ROLLING SWITCH PATCHING MINIMUM GI SOFTWARE REQUIREMENT //n32240590;TOMCAT RELEASE UPDATE 19.0.0.0.0 (32240590)//n32222571;OCW Interim patch for 32222571//n32218663;ACFS RELEASE UPDATE 19.10.0.0.0 (32218663)//n32218454;Database Release Update :19.10.0.0.210119 (32218454)//n29340594;DBWLM RELEASE UPDATE 19.0.0.0.0 (29340594)//nOPatch succeeded.",
"Name": "Exadata Database Server rolling switch patching minimum GI software requirement",
"NodeName": "testhost.example.com",
"OSVersion": "7",
"Profile": "dba",
"RackIdentifier": "Cluster-c1",
"RackType": "N/A",
"ReturnCode": "1",
"Status": "PASS",
"StatusCode": "0",
"TargetType": "CRS_HOME",
"Type": "OS",
"message": "Exadata Database Server GI software version meets requirement for rolling switch patching",
"modelVersion": "21.2.0(dev)_20210622"
}
],
"hostname": "testhost1"
}
]
tfactl queryindex -category result -from "2021-06-29 09:00:00" -to "2021-06-29 15:00:00" -target rdbms | python -m json.tool
[
{
"Result": [
{
"ActualValue": "0",
"AlertType": "CRITICAL",
"DBVersion": "112040",
"EngineeredSystems": "Exadata",
"ExadataVersion": "NULL",
"ExecTimestamp": "2021-06-29 09:43:00 EDT",
"ExpectedValue": "0",
"HardwareType": "X4-2",
"ID": "AA8C83A023362C5EE040E50A1EC0146A",
"MsgDetail": "DATA FROM testhost - CDBM121 DATABASE - RECOVERY AND CREATE FILE DESTINATIONS//ndb_recovery_file_dest = +RECOC1//ndb_create_file_dest = +DATAC1//nDATA FROM BUSM01CLIENT01 - CDBM122 DATABASE - RECOVERY AND CREATE FILE DESTINATIONS//ndb_recovery_file_dest = +RECOC1//ndb_create_file_dest = +DATAC1//nDATA FROM BUSM01CLIENT01 - CDBM19C DATABASE - RECOVERY AND CREATE FILE DESTINATIONS//ndb_recovery_file_dest = +RECOC1//ndb_create_file_dest = +DATAC1//nDATA FROM BUSM01CLIENT01 - RAC11G DATABASE - RECOVERY AND CREATE FILE DESTINATIONS//ndb_recovery_file_dest = +RECOC1//ndb_create_file_dest = +DATAC1//nDATA FROM BUSM01CLIENT01 - RAC12C DATABASE - RECOVERY AND CREATE FILE DESTINATIONS//ndb_recovery_file_dest = +RECOC1//ndb_create_file_dest = +DATAC1//nDATA FROM BUSM01CLIENT01 - RAC1 DATABASE - RECOVERY AND CREATE FILE DESTINATIONS//ndb_recovery_file_dest = +RECOC1//ndb_create_file_dest = +DATAC1//nDATA FROM BUSM01CLIENT01 - SING11G DATABASE - RECOVERY AND CREATE FILE DESTINATIONS//ndb_recovery_file_dest = +RECOC1//ndb_create_file_dest = +DATAC1",
"Name": "Recovery and Create File Destinations",
"NodeName": "testhost.example.com",
"OSVersion": "7",
"Profile": "dba",
"RackIdentifier": "Cluster-c1",
"RackType": "N/A",
"ReturnCode": "0",
"Status": "PASS",
"StatusCode": "0",
"TargetType": "RDBMS",
"Type": "OS",
"message": "Database DB_CREATE_FILE_DEST and DB_RECOVERY_FILE_DEST are in different diskgroups",
"modelVersion": "21.2.0(dev)_20210622"
}
],
"hostname": "testhost1"
}
]
tfactl queryindex -category result -from "2021-06-29 09:00:00" -to "2021-06-29 15:00:00" -severity critical | python -m json.tool
[
{
"Result": [
{
"ActualValue": "1",
"AlertType": "CRITICAL",
"DBVersion": "112040",
"EngineeredSystems": "Exadata",
"ExadataVersion": "NULL",
"ExecTimestamp": "2021-06-29 09:42:51 EDT",
"ExpectedValue": "1",
"HardwareType": "X4-2",
"ID": "002331F422E014CAE05312C0E50AA2F3",
"MsgDetail": "DATA FROM testhost - EXADATA DATABASE SERVER ROLLING SWITCH PATCHING MINIMUM GI SOFTWARE REQUIREMENT //n32240590;TOMCAT RELEASE UPDATE 19.0.0.0.0 (32240590)//n32222571;OCW Interim patch for 32222571//n32218663;ACFS RELEASE UPDATE 19.10.0.0.0 (32218663)//n32218454;Database Release Update :19.10.0.0.210119 (32218454)//n29340594;DBWLM RELEASE UPDATE 19.0.0.0.0 (29340594)//nOPatch succeeded.",
"Name": "Exadata Database Server rolling switch patching minimum GI software requirement",
"NodeName": "testhost.example.com",
"OSVersion": "7",
"Profile": "dba",
"RackIdentifier": "Cluster-c1",
"RackType": "N/A",
"ReturnCode": "1",
"Status": "PASS",
"StatusCode": "0",
"TargetType": "CRS_HOME",
"Type": "OS",
"message": "Exadata Database Server GI software version meets requirement for rolling switch patching",
"modelVersion": "21.2.0(dev)_20210622"
},
{
"ActualValue": "0",
"AlertType": "CRITICAL",
"DBVersion": "112040",
"EngineeredSystems": "Exadata",
"ExadataVersion": "NULL",
"ExecTimestamp": "2021-06-29 09:43:00 EDT",
"ExpectedValue": "0",
"HardwareType": "X4-2",
"ID": "AA8C83A023362C5EE040E50A1EC0146A",
"MsgDetail": "DATA FROM testhost - CDBM121 DATABASE - RECOVERY AND CREATE FILE DESTINATIONS//ndb_recovery_file_dest = +RECOC1//ndb_create_file_dest = +DATAC1//nDATA FROM testhost - CDBM122 DATABASE - RECOVERY AND CREATE FILE DESTINATIONS//ndb_recovery_file_dest = +RECOC1//ndb_create_file_dest = +DATAC1//nDATA FROM testhost - CDBM19C DATABASE - RECOVERY AND CREATE FILE DESTINATIONS//ndb_recovery_file_dest = +RECOC1//ndb_create_file_dest = +DATAC1//nDATA FROM testhost - RAC11G DATABASE - RECOVERY AND CREATE FILE DESTINATIONS//ndb_recovery_file_dest = +RECOC1//ndb_create_file_dest = +DATAC1//nDATA FROM testhost - RAC12C DATABASE - RECOVERY AND CREATE FILE DESTINATIONS//ndb_recovery_file_dest = +RECOC1//ndb_create_file_dest = +DATAC1//nDATA FROM testhost - RAC1 DATABASE - RECOVERY AND CREATE FILE DESTINATIONS//ndb_recovery_file_dest = +RECOC1//ndb_create_file_dest = +DATAC1//nDATA FROM testhost - SING11G DATABASE - RECOVERY AND CREATE FILE DESTINATIONS//ndb_recovery_file_dest = +RECOC1//ndb_create_file_dest = +DATAC1",
"Name": "Recovery and Create File Destinations",
"NodeName": "testhost.example.com",
"OSVersion": "7",
"Profile": "dba",
"RackIdentifier": "Cluster-c1",
"RackType": "N/A",
"ReturnCode": "0",
"Status": "PASS",
"StatusCode": "0",
"TargetType": "RDBMS",
"Type": "OS",
"message": "Database DB_CREATE_FILE_DEST and DB_RECOVERY_FILE_DEST are in different diskgroups",
"modelVersion": "21.2.0(dev)_20210622"
}
],
"hostname": "testhost1"
}
]
tfactl queryindex -category result -from "2021-06-29 09:00:00" -to "2021-06-29 15:00:00" -name "Exadata" | python -m json.tool
[
{
"Result": [
{
"ActualValue": "1",
"AlertType": "CRITICAL",
"DBVersion": "112040",
"EngineeredSystems": "Exadata",
"ExadataVersion": "NULL",
"ExecTimestamp": "2021-06-29 09:42:51 EDT",
"ExpectedValue": "1",
"HardwareType": "X4-2",
"ID": "002331F422E014CAE05312C0E50AA2F3",
"MsgDetail": "DATA FROM testhost - EXADATA DATABASE SERVER ROLLING SWITCH PATCHING MINIMUM GI SOFTWARE REQUIREMENT //n32240590;TOMCAT RELEASE UPDATE 19.0.0.0.0 (32240590)//n32222571;OCW Interim patch for 32222571//n32218663;ACFS RELEASE UPDATE 19.10.0.0.0 (32218663)//n32218454;Database Release Update :19.10.0.0.210119 (32218454)//n29340594;DBWLM RELEASE UPDATE 19.0.0.0.0 (29340594)//nOPatch succeeded.",
"Name": "Exadata Database Server rolling switch patching minimum GI software requirement",
"NodeName": "testhost.example.com",
"OSVersion": "7",
"Profile": "dba",
"RackIdentifier": "Cluster-c1",
"RackType": "N/A",
"ReturnCode": "1",
"Status": "PASS",
"StatusCode": "0",
"TargetType": "CRS_HOME",
"Type": "OS",
"message": "Exadata Database Server GI software version meets requirement for rolling switch patching",
"modelVersion": "21.2.0(dev)_20210622"
}
],
"hostname": "testhost1"
}
]
tfactl queryindex -category result -from "2021-06-29 09:00:00" -to "2021-06-29 15:00:00" -name "Recovery Destinations" | python -m json.tool
[
{
"Result": [
{
"ActualValue": "0",
"AlertType": "CRITICAL",
"DBVersion": "112040",
"EngineeredSystems": "Exadata",
"ExadataVersion": "NULL",
"ExecTimestamp": "2021-06-29 09:43:00 EDT",
"ExpectedValue": "0",
"HardwareType": "X4-2",
"ID": "AA8C83A023362C5EE040E50A1EC0146A",
"MsgDetail": "DATA FROM testhost - CDBM121 DATABASE - RECOVERY AND CREATE FILE DESTINATIONS//ndb_recovery_file_dest = +RECOC1//ndb_create_file_dest = +DATAC1//nDATA FROM testhost - CDBM122 DATABASE - RECOVERY AND CREATE FILE DESTINATIONS//ndb_recovery_file_dest = +RECOC1//ndb_create_file_dest = +DATAC1//nDATA FROM testhost - CDBM19C DATABASE - RECOVERY AND CREATE FILE DESTINATIONS//ndb_recovery_file_dest = +RECOC1//ndb_create_file_dest = +DATAC1//nDATA FROM testhost - RAC11G DATABASE - RECOVERY AND CREATE FILE DESTINATIONS//ndb_recovery_file_dest = +RECOC1//ndb_create_file_dest = +DATAC1//nDATA FROM testhost - RAC12C DATABASE - RECOVERY AND CREATE FILE DESTINATIONS//ndb_recovery_file_dest = +RECOC1//ndb_create_file_dest = +DATAC1//nDATA FROM testhost - RAC1 DATABASE - RECOVERY AND CREATE FILE DESTINATIONS//ndb_recovery_file_dest = +RECOC1//ndb_create_file_dest = +DATAC1//nDATA FROM testhost - SING11G DATABASE - RECOVERY AND CREATE FILE DESTINATIONS//ndb_recovery_file_dest = +RECOC1//ndb_create_file_dest = +DATAC1",
"Name": "Recovery and Create File Destinations",
"NodeName": "testhost.example.com",
"OSVersion": "7",
"Profile": "dba",
"RackIdentifier": "Cluster-c1",
"RackType": "N/A",
"ReturnCode": "0",
"Status": "PASS",
"StatusCode": "0",
"TargetType": "RDBMS",
"Type": "OS",
"message": "Database DB_CREATE_FILE_DEST and DB_RECOVERY_FILE_DEST are in different diskgroups",
"modelVersion": "21.2.0(dev)_20210622"
}
],
"hostname": "testhost1"
}
]
tfactl queryindex -category result -from "2021-06-29 09:00:00" -to "2021-06-29 15:00:00" -fields ID | python -m json.tool[
{
"Result": [
{
"ID": "002331F422E014CAE05312C0E50AA2F3"
},
{
"ID": "AA8C83A023362C5EE040E50A1EC0146A"
}
],
"hostname": "testhost1"
}
]
tfactl queryindex -category result -from "2021-06-29 09:00:00" -to "2021-06-29 15:00:00" -fields all | python -m json.tool
[
{
"Result": [
{
"ActualValue": "1",
"AlertType": "CRITICAL",
"CoverageWindow.EndTime": "NULL",
"CoverageWindow.StartTime": "NULL",
"DBVersion": "112040",
"EngineeredSystems": "Exadata",
"ExadataVersion": "NULL",
"ExecTimestamp": "2021-06-29 09:42:51 EDT",
"ExpectedValue": "1",
"HardwareType": "X4-2",
"ID": "002331F422E014CAE05312C0E50AA2F3",
"MsgDetail": "DATA FROM testhost - EXADATA DATABASE SERVER ROLLING SWITCH PATCHING MINIMUM GI SOFTWARE REQUIREMENT //n32240590;TOMCAT RELEASE UPDATE 19.0.0.0.0 (32240590)//n32222571;OCW Interim patch for 32222571//n32218663;ACFS RELEASE UPDATE 19.10.0.0.0 (32218663)//n32218454;Database Release Update :19.10.0.0.210119 (32218454)//n29340594;DBWLM RELEASE UPDATE 19.0.0.0.0 (29340594)//nOPatch succeeded.",
"Name": "Exadata Database Server rolling switch patching minimum GI software requirement",
"NodeName": "testhost.example.com",
"OSVersion": "7",
"Profile": "dba",
"RackIdentifier": "Cluster-c1",
"RackType": "N/A",
"ReturnCode": "1",
"Status": "PASS",
"StatusCode": "0",
"TargetType": "CRS_HOME",
"Type": "OS",
"data_type": "compliance_result",
"message": "Exadata Database Server GI software version meets requirement for rolling switch patching",
"modelVersion": "21.2.0(dev)_20210622",
"timestamp": "20210629134251000",
"user": "root"
},
{
"ActualValue": "0",
"AlertType": "CRITICAL",
"CoverageWindow.EndTime": "NULL",
"CoverageWindow.StartTime": "NULL",
"DBName": "cdbm121",
"DBVersion": "112040",
"EngineeredSystems": "Exadata",
"ExadataVersion": "NULL",
"ExecTimestamp": "2021-06-29 09:43:00 EDT",
"ExpectedValue": "0",
"HardwareType": "X4-2",
"ID": "AA8C83A023362C5EE040E50A1EC0146A",
"InstanceName": "cdbm1211",
"InstanceType": "CDB",
"MsgDetail": "DATA FROM testhost - CDBM121 DATABASE - RECOVERY AND CREATE FILE DESTINATIONS//ndb_recovery_file_dest = +RECOC1//ndb_create_file_dest = +DATAC1//nDATA FROM testhost - CDBM122 DATABASE - RECOVERY AND CREATE FILE DESTINATIONS//ndb_recovery_file_dest = +RECOC1//ndb_create_file_dest = +DATAC1//nDATA FROM testhost - CDBM19C DATABASE - RECOVERY AND CREATE FILE DESTINATIONS//ndb_recovery_file_dest = +RECOC1//ndb_create_file_dest = +DATAC1//nDATA FROM testhost - RAC11G DATABASE - RECOVERY AND CREATE FILE DESTINATIONS//ndb_recovery_file_dest = +RECOC1//ndb_create_file_dest = +DATAC1//nDATA FROM testhost - RAC12C DATABASE - RECOVERY AND CREATE FILE DESTINATIONS//ndb_recovery_file_dest = +RECOC1//ndb_create_file_dest = +DATAC1//nDATA FROM testhost - RAC1 DATABASE - RECOVERY AND CREATE FILE DESTINATIONS//ndb_recovery_file_dest = +RECOC1//ndb_create_file_dest = +DATAC1//nDATA FROM testhost - SING11G DATABASE - RECOVERY AND CREATE FILE DESTINATIONS//ndb_recovery_file_dest = +RECOC1//ndb_create_file_dest = +DATAC1",
"Name": "Recovery and Create File Destinations",
"NodeName": "testhost.example.com",
"OSVersion": "7",
"Profile": "dba",
"RackIdentifier": "Cluster-c1",
"RackType": "N/A",
"ReturnCode": "0",
"Status": "PASS",
"StatusCode": "0",
"TargetType": "RDBMS",
"Type": "OS",
"data_type": "compliance_result",
"message": "Database DB_CREATE_FILE_DEST and DB_RECOVERY_FILE_DEST are in different diskgroups",
"modelVersion": "21.2.0(dev)_20210622",
"timestamp": "20210629134300000",
"user": "root"
}
],
"hostname": "testhost1"
}
]