MongoDB monitoring with swat

MongoDB provides some http interface to enable monitoring.

Swat is a perl/bash DSL for web application smoke tests. The one of interesting feature of swat is that one could easy create a smoke tests suite for a certain application and then distribute it as cpan module.

Imaging you an IT guy. So add monitoring for mongo now is as simple as installing cpan module :


$ sudo cpan install swat::mongodb
$ swat swat::mongodb 127.0.0.1:28017
/home/vagrant/.swat/reports/127.0.0.1:28017/listDatabases/00.t .. ok
/home/vagrant/.swat/reports/127.0.0.1:28017/serverStatus/00.t ... ok
/home/vagrant/.swat/reports/127.0.0.1:28017/buildInfo/00.t ...... ok
All tests successful.
Files=3, Tests=12,  0 wallclock secs ( 0.02 usr  0.00 sys +  0.03 cusr  0.00 csys =  0.05 CPU)
Result: PASS


Leave a comment

About melezhik

user-pic Dev & Devops --- Then I beheld all the work of God, that a man cannot find out the work that is done under the sun: because though a man labour to seek it out, yet he shall not find it; yea further; though a wise man think to know it, yet shall he not be able to find it. (Ecclesiastes 8:17)