B.3 tfactl blackout

Use the tfactl blackout command to suppress diagnostic collections at a more granular level.

Syntax

tfactl blackout 
[add|remove|print]
[-targettype all|crs|asm|asmdg|database|listener|service|os] 
[-target all|name]
[-event all|"event_str1,event_str2"]
[-timeout nh|nd|none] 
[-c|-local] 
[-reason "reason for blackout"] 
[-docollection]

Parameters

Table B-5 tfactl blackout Command Parameters

Parameter Description

add|remove|print

Adds, removes, or prints blackout conditions.

-targettype type

Target type: all|crs|asm|asmdg|database|listener|service|os

Limits blackout only to the specified target type.

By default, the target type is set to all.

all: The whole node is under blackout . If all under 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.

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.

-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 B-2 Adding Blackout details

# tfactl blackout add -targettype database -target mydb -event "ORA-00600"

Event "ORA-00600" is blacked out until Wed Feb 20 00:20:34 PST 2019 on targettype : database, target : mydb

# tfactl  blackout add -targettype database -target all  -event "ORA-04031"  -timeout 1h

Event "ORA-04031" is blacked out untill Tue Feb 19 01:21:27 PST 2019 on targettype : database, target : all

# tfactl blackout add -targettype database -target all -event "ORA-04030"  -timeout none -c

Event "ORA-04030" is blacked out untill Sun Feb 19 00:22:39 PST 2119 on targettype : database, target : all

# tfactl blackout add -targettype all -event all -target all -timeout 1h -reason "Disabling all events during patching"

Event "ALL" is blacked out untill Tue Feb 19 01:23:47 PST 2019 on targettype : all, target : all

Example B-3 Printing Blackout details

# tfactl blackout print
.-------------------------------------------------------------------------------------------------------------------------------------------------------.
| Target Type | Target | Events    | Start Time                   | End Time                     | Do Collection | Reason                               |
+-------------+--------+-----------+------------------------------+------------------------------+---------------+--------------------------------------+
| ALL         | ALL    | ALL       | Tue Feb 19 00:23:47 PST 2019 | Tue Feb 19 01:23:47 PST 2019 | false         | Disabling all events during patching |
| DATABASE    | ALL    | ORA-04030 | Tue Feb 19 00:22:39 PST 2019 | Sun Feb 19 00:22:39 PST 2119 | false         | NA                                   |
| DATABASE    | ALL    | ORA-04031 | Tue Feb 19 00:21:27 PST 2019 | Tue Feb 19 01:21:27 PST 2019 | false         | NA                                   |
| DATABASE    | MYDB   | ORA-00600 | Tue Feb 19 00:20:34 PST 2019 | Wed Feb 20 00:20:34 PST 2019 | false         | NA                                   |
'-------------+--------+-----------+------------------------------+------------------------------+---------------+--------------------------------------'

Example B-4 Removing Blackout details

# tfactl blackout remove -targettype database -event "ORA-00600" -target all

Failed to remove Blackout details in TFA.

# tfactl blackout remove -targettype database -event "ORA-00600" -target mydb

Removed Blackouts for ORA-00600 events for targettype : database, target : mydb

# tfactl blackout remove -targettype database -event all -target mydb

Removed Blackouts for ALL events for targettype : database, target : mydb

# tfactl blackout remove -targettype all -event all -target all

Removed Blackouts for ALL events for targettype : all, target : all