forked from erh/mongo-munin
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Randall Hunt
committed
Jul 9, 2012
1 parent
08e7aeb
commit cba6116
Showing
13 changed files
with
57 additions
and
101 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,15 @@ | ||
|
||
name = "locked" | ||
|
||
|
||
def doData(): | ||
print name + ".value " + str( 100 * getServerStatus()["globalLock"]["ratio"] ) | ||
print name + ".value " + str(100 * getServerStatus()["globalLock"]["ratio"]) | ||
|
||
def doConfig(): | ||
|
||
def doConfig(): | ||
print "graph_title MongoDB write lock percentage" | ||
print "graph_args --base 1000 -l 0 " | ||
print "graph_vlabel percentage" | ||
print "graph_category MongoDB" | ||
|
||
print name + ".label " + name | ||
|
||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,21 @@ | ||
|
||
|
||
def ok(s): | ||
return s == "resident" or s == "virtual" or s == "mapped" | ||
|
||
|
||
def doData(): | ||
for k,v in getServerStatus()["mem"].iteritems(): | ||
for k, v in getServerStatus()["mem"].iteritems(): | ||
if ok(k): | ||
print( str(k) + ".value " + str(v * 1024 * 1024) ) | ||
print(str(k) + ".value " + str(v * 1024 * 1024)) | ||
|
||
def doConfig(): | ||
|
||
def doConfig(): | ||
print "graph_title MongoDB memory usage" | ||
print "graph_args --base 1024 -l 0 --vertical-label Bytes" | ||
print "graph_category MongoDB" | ||
|
||
for k in getServerStatus()["mem"]: | ||
if ok( k ): | ||
if ok(k): | ||
print k + ".label " + k | ||
print k + ".draw LINE1" | ||
|
||
|
||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,5 +4,3 @@ | |
doConfig() | ||
else: | ||
doData() | ||
|
||
|
Oops, something went wrong.