fdb-document-layer
fdb-document-layer copied to clipboard
Implement db.serverStatus()
We just return an empty JSON document with no details. We could add all the relevant fields in there.
What fields does it need in order to be compatible with, I guess existing client drivers?
Ah, I was very vague in the problem description :man_facepalming:.
Seems like some drivers or frameworks use db.serverStatus()
to get server-specific information. Mongoose seems to be looking for version information. Although the failure I found was on the version field, we should add all the relevant fields, not just version
. We should try to support the command as complete as possible.
db.serverStatus()
has few different sections
- instance information - we should do all of it
- asserts - I think this could be quite useful, probably not all fields
- asserts.regular - could be
TraceEvent
errors - asserts.warnings - could be
TraceEvent
warnings - asserts.msg - Any protocol failures could be reported here
- asserts.user - User failures. Bad usage of commands etc.
- We could add more counters here to represent transactions timeouts and failures. Or we could also make a separate section for them.
- asserts.regular - could be
- backgroundFlushing - It's safe to ignore this section
- connections - We can easily add this section
- dur - I don't understand this section accurately, this could potentially a place for implicit transactions stats as well
- extraInfo - probably safe to ignore, although its easier to provide this info
- opLatency and network - sections are interesting.
There are a lot of other sections which we can add as well. This seems like a point of source for MongoDB monitoring tools. More we add better compatible we would be with 3rd party tools.
I would say let's start with "instance information" for 1.7.0 and make sure Mongoose compatibility works. Remaining bits we can add after 1.7.0.