Problem with mongo_mem
mgalkiewicz opened this issue · 8 comments
mgalkiewicz commented
I cannot run mongo_mem:
# munin-run mongo_mem Traceback (most recent call last): File "/etc/munin/plugins/mongo_mem", line 60, in doData() File "/etc/munin/plugins/mongo_mem", line 35, in doData for k,v in getServerStatus()["mem"].iteritems(): KeyError: 'mem'
The rest works fine. My munin-node version: 1.4.5-3. OS Debian Squeeze.
alaz commented
What is the server version?
mgalkiewicz commented
The same: 1.4.5-3
alaz commented
Really strange. Can you run db.serverStatus()
in mongo shell and post here the result?
mgalkiewicz commented
MongoDB shell version: 1.6.3 connecting to: test > db.serverStatus() { "version" : "1.6.3", "uptime" : 255280, "uptimeEstimate" : 253509, "localTime" : "Mon Sep 19 2011 10:03:04 GMT+0200 (CET)", "globalLock" : { "totalTime" : 255280475334, "lockTime" : 3404631, "ratio" : 0.000013336824900319934, "currentQueue" : { "total" : 0, "readers" : 0, "writers" : 0 } }, "mem" : { "bits" : 64, "resident" : 21, "virtual" : 200, "supported" : true, "mapped" : 80 }, "connections" : { "current" : 2, "available" : 817 }, "extra_info" : { "note" : "fields vary by platform", "heap_usage_bytes" : 394464, "page_faults" : 13 }, "indexCounters" : { "btree" : { "accesses" : 1, "hits" : 1, "misses" : 0, "resets" : 0, "missRatio" : 0 } }, "backgroundFlushing" : { "flushes" : 4254, "total_ms" : 138, "average_ms" : 0.03244005641748942, "last_ms" : 0, "last_finished" : "Mon Sep 19 2011 10:02:24 GMT+0200 (CET)" }, "cursros" : { "totalOpen" : 0, "clientCursors_size" : 0, "timedOut" : 0 }, "opcounters" : { "insert" : 13, "query" : 37, "update" : 1, "delete" : 5, "getmore" : 0, "command" : 89 }, "asserts" : { "regular" : 0, "warning" : 0, "msg" : 0, "user" : 6, "rollovers" : 0 }, "ok" : 1 }
alaz commented
Thanks! serverStatus
has a mem
section, as it should. And this is expected by mongo_mem
plugin.
mongo_mem
(like other plugins) reads this data from MongoDB's REST interface -- check if http://localhost:28017/_status
contain mem
section as well... I suspect it does.
Frankly, I have no other ideas.
mgalkiewicz commented
It does not:
{ "serverStatus" : { "version" : "1.6.3", "uptime" : 255850, "uptimeEstimate" : 254074, "localTime" : { "$date" : 1316419954279 }, "globalLock" : { "totalTime" : 255849881066, "lockTime" : 3404631, "ratio" : 1.330714318026878e-05, "currentQueue" : { "total" : 0, "readers" : 0, "writers" : 0 } }, "connections" : { "current" : 1, "available" : 818 }, "indexCounters" : { "btree" : { "accesses" : 1, "hits" : 1, "misses" : 0, "resets" : 0, "missRatio" : 0 } }, "backgroundFlushing" : { "flushes" : 4264, "total_ms" : 138, "average_ms" : 0.0323639774859287, "last_ms" : 0, "last_finished" : { "$date" : 1316419944742 } }, "cursros" : { "totalOpen" : 0, "clientCursors_size" : 0, "timedOut" : 0 }, "opcounters" : { "insert" : 13, "query" : 37, "update" : 1, "delete" : 5, "getmore" : 0, "command" : 89 }, "asserts" : { "regular" : 0, "warning" : 0, "msg" : 0, "user" : 6, "rollovers" : 0 }, "note" : "run against admin for more info" }, "buildinfo" : { "version" : "1.6.3", "gitVersion" : "nogitversion", "sysInfo" : "Linux bobek-a0 2.6.32-5-amd64 #1 SMP Fri Sep 17 21:50:19 UTC 2010 x86_64 BOOST_LIB_VERSION=1_42", "bits" : 64, "debug" : false } }
alaz commented
A-ha! this discussion is probably relevant
mgalkiewicz commented
The problem is fixed in mongodb 1.7.6 or later.