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.
- Retrieve a list of all confdb database instances.
- 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.
- Retrieve commit logs of the specified confdb database instance.
confdb is the database storing the (platform) settings of the Logpresso. The logical structure is as follows:
- 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
|name||String||Name of the database instance|
|rev||Integer||Revision number of the database instance|
|commits||Interger||Number of commits to the database|
|last_commit||Date||Date of the last commit|
|last_msg||String||Last 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
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_rev, as well as document-specific fields.
For common attribute fields, refer to the below table.
|doc_id||Integer||Serial number of document|
|doc_prev||Integer||Previous revision number of document|
|doc_rev||Integer||Current 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.
|_time||Time||Time of commit|
|rev_id||Integer||Commit revision ID|
|committer||String||Name of committer module (araqne-rpc in the above example)|
|msg||String||Summary of commit|
|manifest_id||Integer||Manifest ID for changeset|