Browse files

some fixes

  • Loading branch information...
1 parent 8c3a663 commit bfe0d6549d943bd8a466501bbeac7ab3ddae7c44 @erh committed Apr 5, 2010
Showing with 24 additions and 34 deletions.
  1. +3 −3 mongo_btree
  2. +2 −3 mongo_conn
  3. +2 −5 mongo_lock
  4. +4 −5 mongo_mem
  5. +1 −1 mongo_ops
  6. +3 −3 src/body_btree.py
  7. +2 −3 src/body_conn.py
  8. +2 −5 src/body_lock.py
  9. +4 −5 src/body_mem.py
  10. +1 −1 src/body_ops.py
View
6 mongo_btree
@@ -20,11 +20,11 @@ def get():
def doData():
for k,v in get().iteritems():
- print( str(k) + ".value " + str(v) )
+ print( str(k) + ".value " + str(int(v)) )
def doConfig():
- print "graph_title MongoDB memory usage"
+ print "graph_title MongoDB btree stats"
print "graph_args --base 1000"
print "graph_vlabel mb ${graph_period}"
print "graph_category MongoDB"
@@ -34,7 +34,7 @@ def doConfig():
print k + ".min 0"
print k + ".type COUNTER"
print k + ".max 500000"
- print k + ".draw AREA"
+ print k + ".draw LINE1"
View
5 mongo_conn
@@ -24,12 +24,11 @@ def doData():
def doConfig():
print "graph_title MongoDB current connections"
- print "graph_vlabel connections ${graph_period}"
+ print "graph_args --base 1000"
+ print "graph_vlabel connections"
print "graph_category MongoDB"
print name + ".label " + name
- print name + ".type GAUGE"
- print name + ".draw AREA"
View
7 mongo_lock
@@ -23,14 +23,11 @@ def doData():
def doConfig():
print "graph_title MongoDB write lock percentage"
- print "graph_vlabel percentage ${graph_period}"
+ print "graph_args --base 1000"
+ print "graph_vlabel percentage"
print "graph_category MongoDB"
print name + ".label " + name
- print name + ".type GAUGE"
- print name + ".draw AREA"
- print name + ".min 0"
- print name + ".max 100"
View
9 mongo_mem
@@ -21,20 +21,19 @@ def ok(s):
def doData():
for k,v in getServerStatus()["mem"].iteritems():
if ok(k):
- print( str(k) + ".value " + str(v) )
+ print( str(k) + ".value " + str(v * 1024 * 1024) )
def doConfig():
print "graph_title MongoDB memory usage"
- print "graph_args --base 1000"
- print "graph_vlabel mb ${graph_period}"
+ print "graph_args --base 1024 --vertical-label Bytes"
print "graph_category MongoDB"
for k in getServerStatus()["mem"]:
if ok( k ):
print k + ".label " + k
- print k + ".type GAUGE"
- print k + ".draw AREA"
+ print k + ".draw LINE1"
+
View
2 mongo_ops
@@ -34,7 +34,7 @@ def doConfig():
print k + ".min 0"
print k + ".type COUNTER"
print k + ".max 500000"
- print k + ".draw AREA"
+ print k + ".draw LINE1"
if __name__ == "__main__":
if len(sys.argv) > 1 and sys.argv[1] == "config":
View
6 src/body_btree.py
@@ -4,11 +4,11 @@ def get():
def doData():
for k,v in get().iteritems():
- print( str(k) + ".value " + str(v) )
+ print( str(k) + ".value " + str(int(v)) )
def doConfig():
- print "graph_title MongoDB memory usage"
+ print "graph_title MongoDB btree stats"
print "graph_args --base 1000"
print "graph_vlabel mb ${graph_period}"
print "graph_category MongoDB"
@@ -18,7 +18,7 @@ def doConfig():
print k + ".min 0"
print k + ".type COUNTER"
print k + ".max 500000"
- print k + ".draw AREA"
+ print k + ".draw LINE1"
View
5 src/body_conn.py
@@ -8,12 +8,11 @@ def doData():
def doConfig():
print "graph_title MongoDB current connections"
- print "graph_vlabel connections ${graph_period}"
+ print "graph_args --base 1000"
+ print "graph_vlabel connections"
print "graph_category MongoDB"
print name + ".label " + name
- print name + ".type GAUGE"
- print name + ".draw AREA"
View
7 src/body_lock.py
@@ -7,14 +7,11 @@ def doData():
def doConfig():
print "graph_title MongoDB write lock percentage"
- print "graph_vlabel percentage ${graph_period}"
+ print "graph_args --base 1000"
+ print "graph_vlabel percentage"
print "graph_category MongoDB"
print name + ".label " + name
- print name + ".type GAUGE"
- print name + ".draw AREA"
- print name + ".min 0"
- print name + ".max 100"
View
9 src/body_mem.py
@@ -5,20 +5,19 @@ def ok(s):
def doData():
for k,v in getServerStatus()["mem"].iteritems():
if ok(k):
- print( str(k) + ".value " + str(v) )
+ print( str(k) + ".value " + str(v * 1024 * 1024) )
def doConfig():
print "graph_title MongoDB memory usage"
- print "graph_args --base 1000"
- print "graph_vlabel mb ${graph_period}"
+ print "graph_args --base 1024 --vertical-label Bytes"
print "graph_category MongoDB"
for k in getServerStatus()["mem"]:
if ok( k ):
print k + ".label " + k
- print k + ".type GAUGE"
- print k + ".draw AREA"
+ print k + ".draw LINE1"
+
View
2 src/body_ops.py
@@ -18,4 +18,4 @@ def doConfig():
print k + ".min 0"
print k + ".type COUNTER"
print k + ".max 500000"
- print k + ".draw AREA"
+ print k + ".draw LINE1"

0 comments on commit bfe0d65

Please sign in to comment.