This article is applicable to the scenario of independent deployment of obdiag. It can be executed with one click to display all internal table names matching the specified fields.
Instructions for use
obdiag display scene run --scene=observer.inner_table [options]
The options are explained below:
Option name |
Is it required |
Data type |
Default value |
Description |
|---|---|---|---|---|
| -c | No | string | ~/.obdiag/config.yml |
Configuration file path. |
| --inner_config | No | string | Default is empty | obdiag's own configuration. |
| --config | No | string | Default is empty | Configuration of the cluster to be diagnosed by obdiag, fixed style: --config key1=value1 --config key2=value2.
ExplanationParameters that support configuration through this option can be found in obdiag configuration. |
| --env | Yes | string | Default is empty | Additional parameters required by obdiag display, here used to set the internal table name you want to query. Fixed style: --env tablename=${table_name}.
Explanation
|
| --config_password | No | string | Default is empty | obdiag When using an encrypted configuration file, you need to pass in the corresponding password through this option.
ExplanationFor details, please see Configuration file encryption. |
Usage example
Method 1: Use without configuration file (out of the box)
obdiag display scene run --scene=observer.inner_table --env tablename=audit \
--config db_host=xx.xx.xx.xx \
--config db_port=xxxx \
--config tenant_sys.user=root@sys \
--config tenant_sys.password=***
Method 2: Use with configuration file
You need to ensure that the login information of the node to be collected has been configured in the obdiag configuration file config.yml. For related detailed configuration introduction, see obdiag configuration.
$ obdiag display scene run --scene=observer.inner_table --env tablename=audit
The output is as follows:
display_scenes_run start ...
execute tasks: observer.inner_table
+---------------------------------------------------+
| table_name |
+---------------------------------------------------+
| __all_tenant_security_audit |
| __all_tenant_security_audit_aux_lob_meta |
| __all_tenant_security_audit_aux_lob_piece |
| __all_tenant_security_audit_history |
| __all_tenant_security_audit_history_aux_lob_meta |
| __all_tenant_security_audit_history_aux_lob_piece |
| __all_tenant_security_audit_record |
| __all_tenant_security_audit_record_aux_lob_meta |
| __all_tenant_security_audit_record_aux_lob_piece |
| __all_virtual_audit_action |
| __all_virtual_audit_operation |
| __all_virtual_security_audit |
| __all_virtual_security_audit_history |
| __all_virtual_security_audit_record |
| __all_virtual_sql_audit |
| V$OB_SQL_AUDIT |
| GV$OB_SQL_AUDIT |
+---------------------------------------------------+
