Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Update plugins/mongodb/mongo_lag #195

Merged
merged 1 commit into from

2 participants

@jdponomarev

fixed bug for python 2.6 and for replica sets with arbiters

@jdponomarev jdponomarev Update plugins/mongodb/mongo_lag
fixed bug for python 2.6 and for replica sets with arbiters
ea5dde3
@kenyon kenyon merged commit 30341ad into munin-monitoring:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Sep 25, 2012
  1. @jdponomarev

    Update plugins/mongodb/mongo_lag

    jdponomarev authored
    fixed bug for python 2.6 and for replica sets with arbiters
This page is out of date. Refresh to see the latest.
Showing with 4 additions and 3 deletions.
  1. +4 −3 plugins/mongodb/mongo_lag
View
7 plugins/mongodb/mongo_lag
@@ -30,8 +30,9 @@ def _get_members():
members = {}
for member in repl_status['members']:
- name = member['name'].split('.')[0]
- members[name] = {'state': member['state'], 'optimeDate': member['optimeDate']}
+ if member['stateStr'] != 'ARBITER' :
+ name = member['name'].split('.')[0]
+ members[name] = {'state': member['state'], 'optimeDate': member['optimeDate']}
return members
def run():
@@ -42,7 +43,7 @@ def run():
for member in members:
lag = (primary_optime - members[member]['optimeDate']).seconds
- print "{}.value {}".format(member, lag)
+ print "{0}.value {1}".format(member, lag)
def config():
print """graph_title MongoDB replication lag
Something went wrong with that request. Please try again.