Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with mongo_mem #5

Closed
mgalkiewicz opened this issue Sep 16, 2011 · 8 comments
Closed

Problem with mongo_mem #5

mgalkiewicz opened this issue Sep 16, 2011 · 8 comments

Comments

@mgalkiewicz
Copy link

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
Copy link
Contributor

alaz commented Sep 16, 2011

What is the server version?

@mgalkiewicz
Copy link
Author

The same: 1.4.5-3

@alaz
Copy link
Contributor

alaz commented Sep 18, 2011

Really strange. Can you run db.serverStatus() in mongo shell and post here the result?

@mgalkiewicz
Copy link
Author

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
Copy link
Contributor

alaz commented Sep 19, 2011

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
Copy link
Author

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
Copy link
Contributor

alaz commented Sep 19, 2011

A-ha! this discussion is probably relevant

@mgalkiewicz
Copy link
Author

The problem is fixed in mongodb 1.7.6 or later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants