Node logs
Where a node writes its log, in which format and how to read it.
Read a node's log and send it to your logging system. The log records starts, Group 0 changes and errors.
Requirements
- Access to the node's machine or to its standard error.
Where it goes
Without --logpath, the log goes to standard error. With --logpath, to that file; with --logappend, it writes at the end of
the file and keeps what it already held.
As JSON
Shell
teseladb start --dbpath /var/lib/teseladb --log-format json --logpath /var/log/teseladb/node.logWith --log-format json, each event is a JSON line, easier to send to a logging system.
From mongosh
JavaScript
db.adminCommand({ getLog: "global" });Check
At start, the log records the ready line with the identifier of the node and of the cluster.
Common problems
- The log never shows the
rootpassword, or any other; only the path of the credentials file.