15.3 REST Service print API

Learn to use the REST Service print API

15.3.1 status

Use GET requests to print the statuses of all hosts.

Syntax

/tfactl/print/status

Example 15-1 print

[ {
  "status" : "CheckOK",
  "hostname" : "myhost",
  "pid" : 73637,
  "port" : 9090,
  "version" : "latest-version",
  "buildId" : "latest-build-ID",
  "inventoryStatus" : "COMPLETE"
} ]

15.3.2 hosts

Use GET requests to print the list of hosts.

Syntax

/tfactl/print/hosts

Example 15-2 hosts

[ {
  "hostname" : "myhost"
} ]

15.3.3 actions

Use GET requests to print the list of actions performed on all hosts.

Syntax

/tfactl/print/actions

Example 15-3 actions

[ {
  "actionName" : "Run inventory",
  "hostname" : "Requested in all nodes",
  "client" : "tfactl",
  "startTime" : "Jan 09 07:50:26 PST",
  "endTime" : "Jan 09 07:50:29 PST",
  "status" : "COMPLETE",
  "comments" : null
} ]

15.3.4 repository

Use GET requests to print the repository details of all hosts.

Syntax

/tfactl/print/repository

Example 15-4 repository

[ {
  "hostname" : "myhost",
  "directory" : "/scratch/smith/view_storage/smith_tfa_latest/oracle/log/tfa/repository",
  "status" : "OPEN",
  "maxSizeMB" : 10240,
  "currentSizeMB" : 13,
  "freeSpaceMB" : 10227
} ]

15.3.5 collections

Use GET requests to print the details of all collections, or a specific collection.

Syntax

/tfactl/print/collections
/tfactl/print/collections/{collectionid}

Example 15-5 collections

[ {
  "id" : "20171010115528myhost",
  "type" : "Manual Collection",
  "requestUser" : "smith",
  "nodeList" : "[]",
  "masterHost" : "myhost",
  "startTime" : "Mon Oct 09 23:55:32 PDT 2017",
  "endTime" : "Tue Oct 10 11:55:32 PDT 2017",
  "tag" : "/scratch/smith/view_storage/smith_tfa_latest/oracle/log/tfa/repository/tfa_11",
  "zipFileName" : "myhost.tfa_Tue_Oct_10_11_55_28_PDT_2017.zip",
  "componentList" : "[emagent, crsclient, oms, dbwlm,emplugins, cfgtools, afd, wls]",
  "zipFileSize" : 3055,
  "collectionTime" : 16,
  "events" : null
}]
[{
  "id" : "20171011044112myhost",
  "type" : "Manual Collection",
  "requestUser" : "smith",
  "nodeList" : "[]",
  "masterHost" : "myhost",
  "startTime" : "null",
  "endTime" : "Wed Oct 11 04:41:14 PDT 2017",
  "tag" : "/scratch/smith/view_storage/smith_tfa_latest/oracle/log/tfa/repository/TFA_T1",
  "zipFileName" : "myhost.TFA_T1.zip",
  "componentList" : "[]",
  "zipFileSize" : 0,
  "collectionTime" : 0,
  "events" : null
}]

15.3.6 config

Use GET requests to print the configuration details of all hosts.

Syntax

/tfactl/print/config

Example 15-6 config

[ {
  "hostname" : "myhost",
  "tfaVersion" : "latest-version",
  "javaVersion" : "latest-version",
  "inventoryTraceLevel" : 1,
  "collectionTraceLevel" : 1,
  "scanTraceLevel" : 1,
  "otherTraceLevel" : 3,
  "currentSizeMB" : 13,
  "maxSizeMB" : 10240,
  "maxLogSize" : 50,
  "maxLogCount" : 10,
  "maxCoreFileSize" : 50,
  "maxCoreCollectionSize" : 500,
  "minSpaceForRTScan" : 500,
  "diskUsageMoninterInterval" : 60,
  "manageLogsAutoPurgeInterval" : 60,
  "manageLogsAutoPurgePolicyAge" : "30d",
  "minFileAgeToPurge" : 12,
  "language" : "en",
  "encoding" : "UTF-8",
  "country" : "US",
  "alertLogLevel" : "ALL",
  "userLogLevel" : "ALL",
  "baseLogPath" : "ERROR",
  "tfaIpsPoolSize" : 5,
  "autoPurge" : true,
  "publicIp" : false,
  "fireZipsInRT" : true,
  "rtscan" : true,
  "diskUsageMonOn" : true,
  "manageLogsAutoPurgeOn" : false,
  "trimmingOn" : true
} ]

15.3.7 protocols

Use GET requests to print the details of protocols of all hosts.

Syntax

/tfactl/print/protocols

Example 15-7 protocols

{
  "hostname" : "myhost",
  "available" : [ "TLSv1.2" ],
  "restricted" : [ "SSLv3", "SSLv2Hello", "TLSv1", "TLSv1.1" ]}

15.3.8 directories

Use GET requests to print the details of directories of all hosts.

Syntax

/tfactl/print/directories

Example 15-8 directories

[ {
  "hostname" : "myhost",
  "directory" : "/oem/app/oracle/product/emagent/agent_inst/install/logs",
  "components" : [ "EMPLUGINS" ],
  "permission" : "public",
  "owner" : "root",
  "collectionPolicy" : "exclusions",
  "collectAll" : false
}, {
  "hostname" : "myhost",
  "directory" : "/oem/app/oracle/product/emagent/agent_inst/sysman/log",
  "components" : [ "EMAGENT" ],
  "permission" : "public",
  "owner" : "root",
  "collectionPolicy" : "exclusions",
  "collectAll" : false
} ]