Skip to content

Commit

Permalink
fix typo, fix incorrect replica set delay calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Conigliaro committed May 5, 2011
1 parent 4cf30be commit 69c4f09
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion mongodb/conf.d/mongodb.conf
Expand Up @@ -100,7 +100,7 @@ collection_group {
}
metric {
name = "mongodb_slave_delay"
title = "Relica Set Slave Delay"
title = "Replica Set Slave Delay"
}
metric {
name = "mongodb_asserts_total"
Expand Down
2 changes: 1 addition & 1 deletion mongodb/python_modules/mongodb.py
Expand Up @@ -195,7 +195,7 @@ def get_slave_delay(name):
master = member
if member['name'].split(':')[0] == socket.getfqdn():
slave = member
result = (slave['optime']['t'] - master['optime']['t']) / 1000
result = max(0, master['optime']['t'] - slave['optime']['t']) / 1000
except KeyError:
result = 0

Expand Down

0 comments on commit 69c4f09

Please sign in to comment.