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

added tokumx check by cloning and modifying mongo #933

Merged
merged 3 commits into from
May 20, 2014
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion checks.d/mongo.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,12 @@ class MongoDb(AgentCheck):
"opcounters.delete",
"opcounters.getmore",
"opcounters.command",
"opcountersRepl.insert",
"opcountersRepl.query",
"opcountersRepl.update",
"opcountersRepl.delete",
"opcountersRepl.getmore",
"opcountersRepl.command",
"asserts.regular",
"asserts.warning",
"asserts.msg",
Expand Down Expand Up @@ -220,7 +226,7 @@ def check(self, instance):

# If we have both we can compute a lag time
if current is not None and primary is not None:
lag = current['optimeDate'] - primary['optimeDate']
lag = primary['optimeDate'] - current['optimeDate']
# Python 2.7 has this built in, python < 2.7 don't...
if hasattr(lag,'total_seconds'):
data['replicationLag'] = lag.total_seconds()
Expand Down
Loading