SNMP over the Web
-
This form invokes the snmpInfo.cgi script,
which delivers SNMP-like data in HTML format.
-
Press the buttons to select one or more of the listed group.
-
Select either List or Table format.
The Table format is nicer for humans,
but the List format is much easier for a program to parse.
-
You can also type MIB-II variables or groups, with or without instances,
using just about anything but dots as list separators.
-
When you have output from snmpInfo, you can also send in
additional queries by adding variables or groups to the snmpInfo URL,
using '/' or '?' as a delimiter,
and most anything as a list separator.
-
The "JC's groups" illustrates how you might make some simple MIB extensions.
These use the df command and /etc/passwd, so they should work on most Unix systems.
-
If you selected List format, use your browser's View .. Document Source to look at
the HTML. Note how easy this would be for a program to parse. Compare this with
the difficulty of using the typical SNMP GUI.
-
This form and accompanying perl CGI scripts took me about two days to implement.
Compare this with the typical time of several months to get an SNMP agent working
on a new system.
-
You may notice that this form returns data much faster than a typical SNMP agent.
This is because the HTML approach used here makes it easy to fetch an entire table
with a single request. SNMP requires a series of get-next requests to do the same
thing, with a network round trip for each request. Since HTML only requires a
single request for the task, it can easily give a much faster response.
Written by John Chambers.
If you make any interesting changes to these scripts, let me know.