Monitoring quotaFiles via Nagios

31 views
Skip to first unread message

Phillip Koebbe

unread,
Nov 15, 2012, 10:05:02 AM11/15/12
to mongod...@googlegroups.com
We want to monitor quota usage via Nagios. In the shell, I can run db.runCommand({getCmdLineOpts: 1}) and find the number of quotaFiles and then use listFiles(dbPath) to see how many files there are. I'm trying to mimic this activity via the check_mongodb.py Nagios plugin which uses PyMongo to access the API. While I can get the information from getCmdLineOpts, I can't seem to find a way to get the list of files. Is there a way to get the number of files currently used by a database that is accessible via the API. Note that I'm not asking about how to do this in PyMongo, but whether something like this is even available via the API. If it is, I'll figure it out.

Thanks.

-- Phillip



Dwight Merriman

unread,
Nov 15, 2012, 3:31:34 PM11/15/12
to mongod...@googlegroups.com

Phillip Koebbe

unread,
Nov 15, 2012, 6:01:51 PM11/15/12
to mongod...@googlegroups.com
On Nov 15, 2012, at 2:31 PM, Dwight Merriman wrote:

perhaps this is of use:




Hi Dwight.

Thanks for the response. Ideally, stats would have the number of files in addition to the size, but I think I might be able to make this work. If I know the quota is 10 files, I can calculate what the total size of those files will be. I'll just have to take into consideration the possibility of small files, but the command line options will tell me that. I can then compare the maximum amount for all the files to what is currently being used. That just might work!

Thanks.

-- Phillip



Reply all
Reply to author
Forward
0 new messages