Friday, February 01, 2013

3 new features that I wish were in OpenNMS 2.0

As a long time OpenNMS user I've been often impressed with its extensibility and the completeness of its feature set. There is support for lots of data collection techniques: from the old school snmp exec extensions, to the http poller, from the JDBC poller to the XML poller and many others that I probably forgot to mention.

Supporting new probes is therefore just a matter of how, not if , it can be done. And with new monitoring tools popping up every day this is clearly good as it allows OpenNMS to keep up with the competition.
So the present looks bright, but what about the future? With OpenNMS 2.0 not yet on the radar I thought I could put together a list of features I would love to have. What do you think of them?


1. Receiving metrics over the Graphite/Carbon protocol

Graphite is the new kid on the monitoring block and its primary concern is with receiving, storing and graphing data. It does not rely on any existing protocol for data collection, but instead invented its own.

The protocol is dead simple: text lines sent over a tcp socket with the following format:
metric-path value timestamp
A client can be as simple as this shell one-liner:
echo -e "local.meaning.of.life 42 `date +%s`\n\n" | nc graphitehost 2003
Enabling the collection of metrics over this protocol would enable OpenNMS to:
  1. use any of the numerous collectd (not OpenNMS collectd) plugins (like tailing a log file and counting istances of certain text patterns)
  2. let applications push custom metrics into OpenNMS through libraries available for most programming languages
  3. reduce XML configuration overhead
  4. leverage it as an extensible platform for integration with other systems
  5. position itself as a Graphite (partial?) replacement (in conjunction with item 2) because Graphite does not do thresholding or alerting
Notes: OpenNMS should find a way to correlate the metric to the node by looking at the first component in the metric-path and matching it with the node name or the node id and should handle the creation of new metrics on the fly without any configuration.

2. Expose collected metrics over JSON

RRD png graphs are fine, but to be cool and hang out with the new kids you have to render stuff in the browser and do it like this:

Graphs like that require that metrics be accessible through JSON and recent versions of RRD already support exporting to this format.
Checking this item would also open a new world of possibilities as people could write graphs and dashboards in javascript/html which nowadays seem to be way more popular than properties files (and I can see why).

3. Provide a pub/sub event bus over an open message protocol (amqp, openwire, jms, etc)

OpenNMS already uses an event bus internally and it would be super cool if events could also be broadcasted (and received) over an open protocol like AMQP.
Broadcasting would be especially useful for:
  1. handling of notifications outside of OpenNMS with systems like PagerDuty, or simply with scripts that will send notifications to different recipients/endpoints depending on the affected service/node (this has always been a pain point with the current OpenNMS notification system)
  2. complex event processing with tools like Esper
  3. relying of events into other systems for trouble ticketing, performance analysis, correlation
  4. automated event handling: restarting hung services, killing runaway processing, relocating instances, etc
As for receving I can't see any big driver for implementation yet as OpenNMS already has send-event.pl and I guess we could live with it if just someone made a Java client. Of course the adoption of AMQP or similar protocol would remove the necessity for this client entirely.

No comments: