omni-lchen / zabbix-mongodb

MIT License
58 stars 73 forks source link

Removed depracated functions in mongo 3.4, added Oplog lag and oplog sync metrics #2

Closed Rumbles closed 7 years ago

Rumbles commented 7 years ago

I've removed the background flushing and heap size metrics which have been deprecated in mongo 3.4 as mentioned in issue #1

Further to this I have added a couple of checks which we consider essential, these are checks which look at the oplog sync and oplog lag. I was trying to make these work so they followed your code style/conventions, but I was unable to get the cursor to work (I always hit a StopIteration, even when I checked that the cursor was alive as per the docs: http://api.mongodb.com/python/current/api/pymongo/cursor.html) so I ended up doing this in the only way I could get it to work. Maybe you can improve my code to make this work and keep it in the same style your original code worked.

Rumbles commented 7 years ago

Further to my previous PR I have added my other checks, this includes a check for fsync lock, hidden and priority. These are useful when doing maintenance on mongodb in our environment.

omni-lchen commented 7 years ago

@Rumbles, thanks for your contribution.