otp.derived_databases#
- derived_databases(context=utils.default, start=None, end=None, selection_criteria='all', db=None, db_discovery_scope='query_host_only')#
Gets available derived databases.
- Parameters
context (str, optional) – Context to run the query. If not set then default
context
is used.start (datetime, optional) –
If both
start
andend
are set, then listing databases in this range only. Otherwise list databases from all configured time ranges for databases.If
db
is set, thenotp.config.default_start_time
is used by default.end (datetime, optional) –
If both
start
andend
are set, then listing databases in this range only. Otherwise list databases from all configured time ranges for databases.If
db
is set, thenotp.config.default_end_time
is used by default.selection_criteria (str) – Possible values: all, derived_from_current_db, direct_children_of_current_db.
db (str, optional) – Specifies database name if
selection_criteria
is set to derived_from_current_db or direct_children_of_current_db. Must be set in this case, otherwise does nothing.db_discovery_scope (str) – When query_host_and_all_reachable_hosts is specified, an attempt will be performed to get derived databases from all reachable hosts. When query_host_only is specified, only derived databases from the host on which the query is performed will be returned.
- Returns
Dict where keys are database names and values are
DB
objects withcontext
specified.- Return type
See also
SHOW_DERIVED_DB_LIST OneTick event processor