20 Aug 2010 ingvar   » (Master)

So, back to poking at the NOCTool codebase again. This time, the intent is to get some SNMP support into it, to more easily be able to monitor routers and switches. There's also some opportunity to monitor server hosts via SNMP, but at the moment unix-based hosts can be adequately monitored via SSH.

First, I created a class for "things monitored by SNMP" (with curucial details like community strings and SNMP version in it, plus slots for anything we're monitoring via SNMP; this is currently just interfaces). Then, an SNMP configuration stanza for the config reader. Inside the SNMP stanza, configuration stanzas for anything monitored by SNMP (again, just interfaces at the moment).

The intent is to let an empty interface spec is to mean "auto-discover all interfaces, then monitor them" and for anyone wanting a subset, simply naming the interfaces.

The actual monitoring starts with an snmp-walk of the ifTable.ifEntry.ifDescr sub-tree, mapping names to current SNMP indexes, then passing the resulting hash table down to each "get stuff for this specific interface" function (taking the current SNMP session, mapping table and interface object as arguments).

So far, I am happy with what I have, but it's yet to be used in anger.

Latest blog entries     Older blog entries

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!