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