Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement db.serverStatus() #127

Open
apkar opened this issue Mar 22, 2019 · 2 comments
Open

Implement db.serverStatus() #127

apkar opened this issue Mar 22, 2019 · 2 comments
Assignees
Labels
compatibility Either missing or incompatible features causing driver or tool compatibility good first issue Good for newcomers
Milestone

Comments

@apkar
Copy link
Contributor

apkar commented Mar 22, 2019

We just return an empty JSON document with no details. We could add all the relevant fields in there.

@apkar apkar added good first issue Good for newcomers compatibility Either missing or incompatible features causing driver or tool compatibility labels Mar 22, 2019
@apkar apkar modified the milestone: 1.7.0 Mar 25, 2019
@hgray1 hgray1 added this to the 1.7.0 milestone Mar 25, 2019
@dongxinEric
Copy link
Contributor

What fields does it need in order to be compatible with, I guess existing client drivers?

@apkar
Copy link
Contributor Author

apkar commented Apr 8, 2019

Ah, I was very vague in the problem description 🤦‍♂️.

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.
  • 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.

@apkar apkar modified the milestones: 1.7.0, 1.7.1 Apr 16, 2019
@apkar apkar modified the milestones: 1.7.1, 1.8.0 May 1, 2019
@apkar apkar modified the milestones: 1.8.0, 2.0.0 Aug 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compatibility Either missing or incompatible features causing driver or tool compatibility good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants