2010年3月7日日曜日

making CouchDB as yet another MRTG.

I prototyped a CouchApp example for resource monitoring system in this weekend. My prototype is available on my server.

http://www.yssk22.info/stats/_design/site/_show/history


I summarized pros & cons for using CouchDB as resource monitoring system. If you are insterested in, ping me on twitter.com/yssk22 so that I'll publish on my github.

Pros:

  • easy to define metrics because CouchDB is schema-less database.
  • easy to calculate metrics using CouchDB views.
  • easy to notify alerts by using _change & _filter endpoints (not implemented yet).
  • easy to render charts using jQuery (and jqplot plugin).
  • using the replication feature, monitoring repository clusters could be implemented, which could be more scalable than existent
  • no mysql and php required (it's important for me)

Cons:

  • CouchDB has no scheduling system (though Lotus Notes has) so that deployment of monitoring agents is not so easy yet.
  • There are many matured tools as MRTG, Nagious, Caccti, Zabbix, ... and so on.

To be done:

  • Cumulative resources such as /proc/stat should be calculated diffs using list functions.
  • Real-time chart rendering using CouchApp's Evently plugin.