I’m not sure why I like the HTTP Collector in OpenNMS so much. Probably it is because I’ve been struggling for 20 years to get custom data via SNMP and it is just so darn easy to write it to a text file, stick the text file the in webroot of the system’s web server, and then use HTTP to access it.
HTTP is TCP-based, usually on port 80, and most firewalls will allow it, so it is often easier than dealing with SNMP. Plus since there is so much data out there on web sites it can be fun just to grab it and graph it.
I blogged about this once before with my weather station.
Recently DJ asked me how many people were on the various OpenNMS Mailing Lists. I sent him to the Mailing List Summary page on Sourceforge and I mentioned that it looked like our numbers had gone down a little. He said “wouldn’t it be cool if we could track it” and the HTTP Collector immediately came to mind.
If you ever decide that you would like to monitor Sourceforge, be forewarned that they really don’t like port scans or high levels of requests, so I was sure to configure OpenNMS to only gather the data infrequently. This is not a problem since in the week I’ve had the collector running they only updated the values once.
So here is a nice collection of “stupid HTTP collector” tricks which should show off the various things one can do with it. Click on the link to visit the wiki page with the details.
The first is the collection of Sourceforge Mailing List Stats, which results in a graph like this:
I just realized that it might be cooler to store this as a counter instead of a gauge and just graph the deltas, but I’m going to leave it as is for now.
The second is a graph of the major US Stock Index Values over the last couple of months. Sad, I know.
Remember that you can always set thresholds, etc. for data collected this way, although I don’t think I’d base my future day trading aspirations on a system where the data is naturally latent (the NASDAQ.com website doesn’t update in real time).
While these were created pretty much just for fun, the HTTP collector is a pretty useful and serious feature and it is just another way that OpenNMS can easily integrate data from diverse sources.