mongodb-labs / edda

A log visualizer for MongoDB - This Repository is NOT a supported MongoDB product
232 stars 28 forks source link

Track RS state changes #6

Closed kchodorow closed 12 years ago

samantharitter commented 12 years ago

For a line like: Mon Jun 11 15:56:16 [rsHealthPoll] replSet member localhost:27017 is up

would the best state to classify localhost:27017 as be "startup 1" or "startup 2" or just "up?"

Also, I've been using this list of possible state values as a reference: http://www.mongodb.org/display/DOCS/Replica+Set+Commands

kchodorow commented 12 years ago

Ignore those lines, there should be a line right after it that actually gives you the state like:

Tue Jun 12 13:33:59 [rsHealthPoll] replSet member localhost:27999 is up                                                                                                                                                                                                          
Tue Jun 12 13:33:59 [rsHealthPoll] replSet member localhost:27999 is now in state SECONDARY

So just use the next line.

samantharitter commented 12 years ago

I believe this issue is closed, save for more specific testing criteria that we might add in the future

kchodorow commented 12 years ago

If you've got multiple logs, you can't usefully say "self", right? Or is this going to be post-processed? (https://github.com/kchodorow/logl/blob/master/logl/filters/rs_status.py#L82)

samantharitter commented 12 years ago

Yes, it will be post-processed. The document will also have a field called "origin_server," which will have the server's address if it's known, or an integer code that is unique across all logs read during this run of logl.py. So there's still a field to indicate where the message came from, even if the target server field (in doc["info"]["server"]) is set to "self"

kchodorow commented 12 years ago

Okay cool. Is there documentation somewhere on the format you guys are using for docs?

samantharitter commented 12 years ago

There's very minimal documentation in the rs_status.py file, it just outlines the structure of the doc without much explanation. Can this be something that goes in the readme?

kchodorow commented 12 years ago

Hmm... seems a bit too internals-y for the README. Maybe outline the basic doc structure you expect in https://github.com/kchodorow/logl/blob/master/logl/logl.py and then document any customizations in the filter's .py?