Sunday, March 01, 2009

A Java SNMP client

I've been looking at SNMP a bit more closely recently. One thing that has struck me is that while there are a number of java based SNMP clients, none of them seemed to be complete, and I couldn't obviously find one that could produce charts easily.

This is easy, right. So a little while later snmpgui was written.



OK, so this is version 0.01. I've been able to retrieve a list of things to monitor (that's the long list of OIDs above). Clearly that needs prettifying a bit - a tree view would be a nice next step. And I can retrieve values and produce pretty charts. That's incoming bytes on my main network interface.

It's a simple proof of concept - but it proves that something can be done pretty easily, and that it works.

4 comments:

Anonymous said...

An excellent tool! Yet again. And a perfect compliment to JKstat.

I can see this being useful as either an interactive monitoring utility in its own right, or as a reconnaissance tool by which base more full featured monitoring solutions around.

Unknown said...

./snmp-gui: 8: /usr/bin/uname: not found

You should modify the ARCHLIBDIR to utilise system path variables. It fails on Ubuntu 8.10 until I linked uname. Great software

Anonymous said...

nice work!

in terms of "competitors" (such as it is) there's http://abrahams.co.nz/asithappens/ which I've found incredibly handy on occasion for showing quick adhoc graphs to people who want to know what's "going on" with their WAN link. it doesn't load MIBs, though.

anyway, now that 0.2 works on my Mac, i've been able to try it against my Cisco router (an 877) - it works, though there's a long wait while it (presumably) snmpwalks the device - fortunately you can't get *everything* the router'll give you by doing that or you'd be waiting a long, long time.

my two feature suggestions would be:
- let the user specify MIBs (or directories of them) to load
- let the user specify a starting point (OID / name) for the snmpwalk

cheers (and thanks!),
andrew.

Nerd Progre said...

I have very little experience with Security is Not My Problem. However having tested a few SNMP browsers on Windows, I can say that the only one that impressed me was this one by Solarwinds.

Of course, that was at the time of the win2k release, so I admit things might have changed a bit since then.

A few years later, I contacted one firm whom advertised a SNMP suite of tools written in java.

There was a problem, though, they did the GUIs in Java and those GUIs actually called C/C++ native code executables compiled for Windows/Linux/Mac for doing the actual low-level stuff.

I thought they were joking, but doing a Java GUI and then negating the cross-platform benefits of such code with native calls.

They replied something about Java (1.4 at the time) was unable to do raw tcp packets, so they had no choice.

The questions remains: any good 100% Java, cross platform suite of SNMP tools?.

I'd love having something like the Solarwinds SNMP browser to sniff my cable modem subnet looking for ... stuff.

For research purposes only, of course.

FC