9.3.1.3 tfactl blackout

Use the tfactl blackout command to suppress diagnostic collections at a more granular level. By default, blackout will be in effect for 24 hours.

Syntax

tfactl blackout add|remove|print
-targettype host|crs|asm|asmdg|database|dbbackup|db_dataguard|db_tablespace|pdb_tablespace|pdb|listener|service|os
-target all|name
[-container name]
[-pdb pdb_name]
-event all|"event_str1,event_str2"|availability
[-timeout nm|nh|nd|none]
[-c|-local|-nodes "node1,node2"]
[-reason "reason for blackout"]
[-docollection]

Parameters

Table 9-49 tfactl blackout Command Parameters

Parameter Description

add|remove|print|

Adds, removes, or prints blackout conditions.

-targettype type

Target type: host|crs|asm|asmdg|database|dbbackup|db_dataguard|db_tablespace|pdb_tablespace|pdb|listener|service|os

Limits blackout only to the specified target type.

host: The whole node is under blackout. If there is host blackout, then every blackout element that's shown true in the Telemetry JSON will have the reason for the blackout.

crs: Blackout the availability of the Oracle Clusterware resource or events in the Oracle Clusterware logs.

asm: Blackout the availability of Oracle Automatic Storage Management (Oracle ASM) on this machine or events in the Oracle ASM alert logs.

asmdg: Blackout an Oracle ASM disk group.

database: Blackout the availability of an Oracle Database, Oracle Database backup, tablespace, and so on, or events in the Oracle Database alert logs.

dbbackup: Blackout Oracle Database backup events (such as CDB or archive backups).

db_dataguard: Blackout Oracle Data Guard events.

db_tablespace: Blackout Oracle Database tablespace events (container database).

pdb_tablespace: Blackout Oracle Pluggable Database tablespace events (Pluggable database).

pdb: Blackout Oracle Pluggable Database events.

listener: Blackout the availability of a listener.

service: Blackout the availability of a service.

os: Blackout one or more operating system records.

-target all|name

Specify the target for blackout. You can specify a comma-delimited list of targets.

By default, the target is set to all.

-container name

Specify the database container name (db_unique_name) where the blackout will take effect (for PDB, DB_TABLESPACE, and PDB_TABLESPACE).

-pdb pdb_name

Specify the PDB where the blackout will take effect (for PDB_TABLESPACE only).

-events all|"str1,str2"

Limits blackout only to the availability events, or event strings, which should not trigger auto collections, or be marked as blacked out in telemetry JSON.

all: Blackout everything for the target specified.

string: Blackout for incidents where any part of the line contains the strings specified.

Specify a comma-delimited list of strings.

-timeout nh|nd|none

Specify the duration for blackout in number of hours or days before timing out. By default, the timeout is set to 24 hours (24h).

-c|-local

Specify if blackout should be set to cluster-wide or local.

By default, blackout is set to local.

-reason comment

Specify a descriptive reason for the blackout.

-docollection

Use this option to do an automatic diagnostic collection even if a blackout is set for this target.

Example 9-45 tfactl blackout

  • To blackout event: ORA-00600 on targettype: database, target: mydb
    tfactl blackout add -targettype database -target mydb -event "ORA-00600"
  • To blackout event: ORA-04031 on targettype: database, target: all
    tfactl blackout add -targettype database -target all -event "ORA-04031" -timeout 1h
  • To blackout db backup events on targettype: dbbackup, target: mydb
    tfactl blackout add -targettype dbbackup -target mydb
  • To blackout db dataguard events on targettype: db_dataguard, target: mydb
    tfactl blackout add -targettype db_dataguard -target mydb -timeout 30m
  • To blackout db tablespace events on targettype: db_tablespace, target: system, container: mydb
    tfactl blackout add -targettype db_tablespace -target system -container mydb -timeout 30m
  • To blackout ALL events on targettype: host, target: all
    tfactl blackout add -targettype host -event all -target all -timeout 1h -reason "Disabling all events during patching"
  • To print blackout details
    tfactl blackout print
    .-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------.
    |                                                                                myhostname                                                                                     |
    +---------------+---------------------+-----------+------------------------------+------------------------------+--------+---------------+--------------------------------------+
    | Target Type   | Target              | Events    | Start Time                   | End Time                     | Status | Do Collection | Reason                               |
    +---------------+---------------------+-----------+------------------------------+------------------------------+--------+---------------+--------------------------------------+
    | HOST          | ALL                 | ALL       | Thu Mar 24 16:48:39 UTC 2022 | Thu Mar 24 17:48:39 UTC 2022 | ACTIVE | false         | Disabling all events during patching |
    | DATABASE      | MYDB                | ORA-00600 | Thu Mar 24 16:39:03 UTC 2022 | Fri Mar 25 16:39:03 UTC 2022 | ACTIVE | false         | NA                                   |
    | DATABASE      | ALL                 | ORA-04031 | Thu Mar 24 16:39:54 UTC 2022 | Thu Mar 24 17:39:54 UTC 2022 | ACTIVE | false         | NA                                   |
    | DB_DATAGUARD  | MYDB                | ALL       | Thu Mar 24 16:41:38 UTC 2022 | Thu Mar 24 17:11:38 UTC 2022 | ACTIVE | false         | NA                                   |
    | DBBACKUP      | MYDB                | ALL       | Thu Mar 24 16:40:47 UTC 2022 | Fri Mar 25 16:40:47 UTC 2022 | ACTIVE | false         | NA                                   |
    | DB_TABLESPACE | SYSTEM_CDBNAME_MYDB | ALL       | Thu Mar 24 16:45:56 UTC 2022 | Thu Mar 24 17:15:56 UTC 2022 | ACTIVE | false         | NA                                   |
    '---------------+---------------------+-----------+------------------------------+------------------------------+--------+---------------+--------------------------------------'
  • To remove blackout for event: ORA-00600 on targettype: database, target: mydb
    tfactl blackout remove -targettype database -event "ORA-00600" -target mydb
  • To remove blackout for db backup events on targettype: dbbackup, target: mydb
    tfactl blackout remove -targettype dbbackup -target mydb
  • To remove blackout for db tablespace events on targettype: db_tablespace, target: system, container: mydb
    tfactl blackout remove -targettype db_tablespace -target system -container mydb
  • To remove blackout for host events on targettype: all, target: all
    tfactl blackout remove -targettype host -event all -target all