confdb

Retrieves the documents or metadata stored in the confdb. This command receives the name of the database instance or collection as an argument. Administrative privileges are required to execute this command.

Syntax

confdb SUB-COMMAND
SUB-COMMAND
databases
Retrieve a list of all confdb database instances.
cols DB_NAME
List all collection names of the specified confdb database instance.
docs DB_NAME COL_NAME
Retrieve all document objects of the specified confdb collection of the confdb database instance.
logs DB_NAME
Retrieve commit logs of the specified confdb database instance.

Description

confdb is the database storing the (platform) settings of the Logpresso. The logical structure is as follows:

Confdb Diagram

  • confdb consists of multiple database instances.
  • A database instance consists of more than one collection. A collection is similar to a table in a relational database (RDBMS).
  • A collection consists of more than one document. A document is similar to a record in an RDBMS.
  • A log is generated once a document is committed to confdb or database revision is updated.

When you provide the unit of the database (databases, cols, docs) as an argument, it extracts the corresponding data.

Retrieve database instances

The following is an example command to get the list of database instances of confdb in Logpresso Sonar.

confdb databases
| # change the output field order
| order name, rev, commits, last_commit, last_msg
| # sort in ascending order by name field
| sort name

Result of the command confdb databases:

The result of the command 'confdb database'

FieldTypeDescription
nameStringName of the database instance
revIntegerRevision number of the database instance
commitsIntergerNumber of commits to the database
last_commitDateDate of the last commit
last_msgStringLast commit message
List all collection names

The following is an example command to get the list of collections for the database instances araqne-rpc. This collection list has name field only.

confdb cols araqne-rpc

The result of the command 'confdb cols araqne-rpc'

Retrieve documents from collection

The following is an example command to retrieve all documents in the bindings collection in the araqne-rpc database instance.

confdb docs araqne-rpc bindings

A document consists of common attribute fields such as doc_id, doc_prev, and doc_rev, as well as document-specific fields.

The result of the command 'confdb docs araqne-rpc bindings'

For common attribute fields, refer to the below table.

FieldTypeDescription
doc_idIntegerSerial number of document
doc_prevIntegerPrevious revision number of document
doc_revIntegerCurrent revision number of document
Retrieve commit logs

You can view the commit history of the database instance.

confdb logs araqne-rpc

For commit log fields, refer to the below table.

FieldTypeDescription
_timeTimeTime of commit
rev_idIntegerCommit revision ID
committerStringName of committer module (araqne-rpc in the above example)
msgStringSummary of commit
manifest_idIntegerManifest ID for changeset