Simple Is Not Easy
By daniel on Jan 24, 2006
SNMP stands for Simple Network Management Protocol - and is one of the most widely spread internet management protocols. It is based on UDP (though there exists an RFC defining SNMP over TCP) and uses BER for encoding.
SNMP defines both how to structure management information (data model exposed for management), and how to access it (protocol). According to SNMP, the management information is structured into MIBs (Management Information Bases). A MIB is defined using a formal language called Structure of Management Information (SMI) - whose syntax uses a subset of ASN.1.
So when we speak of SNMP we usually mean two things:
- The protocol itself - of which there exists three main versions: SNMPv1, SNMPv2c, and SNMPv3 (see below).
- The Structure of Management Information - which is the formal language in which MIBs are specified, and of which there exists two versions, SMIv1 and SMIv2
The basic verbs of the SNMP protocol are GET, SET, and
GETNEXT (SNMPv2 adds GETBULK). An SNMP entity can also send
asynchronous events (a TRAP in SNMPv1, a NOTIFICATION or an
INFORM in SNMPv2). What you GET and SET are individual variables
of simple types (to simplify, strings/integers/enumerations) which can be
either scalar - or located in tables.
These are the simple things about SNMP. Rest assure, I will not enter into more details today. But if you want to dig it further, here are a few additional links that will help you:
- SNMP FAQ: these are the FAQs which are regularly published on the comp.protocols.snmp forum.
- SNMP Versions Explained by David Perkins.
- The Overview section of RFC 3584, Coexistence between Version 1, Version 2, and Version 3 of the Internet-standard Network Management Framework, lists all the various RFCs that compose the three versions of SNMP.
- RFC 3410 is an informational RFC that provide a short introduction to SNMPv3.
|Looking for an RFC? Just type its number here:|
I can also recommend some good books on SNMP:
- Understanding SNMP MIBs, by Perkins and McGinnis, published by Prentice Hall
- Practical Guide to SNMPv3 and Network Management by David Zeltserman, Published by Prentice Hall.
Now at this point, you're probably wondering why you're reading this blog,
and what all of this has to do with JMX, Java, etc...
Well the thing is that starting with Tiger, and following with Mustang, Java SE now comes with a built-in SNMPv2 agent, that makes it possible to access the data exposed by the JVM Management and Monitoring API through SNMP.
As we have seen, SNMP requires that the data exposed for management is described in a MIB - and the MIB that describes the data of the Management and Monitoring of the JVM is the JVM-MANAGEMENT-MIB.
In a further blog, I am planning to delve further into the workings of SNMP and the JVM-MANAGEMENT-MIB. I may also make use of the Java Dynamic Management Kit - which includes a Java SNMP toolkit - in order to demonstrate how the JVM can be monitored through SNMP
So until then, stay tuned!
PS: see also my next entries in this series: [What is the JVM SNMP Agent?] [Life, the Universe, and Everything... or the Hitchhiker's Guide to SNMP] [Understanding the Structure of Management Information (SMI)... or the Hitchhiker's Guide to SNMP, Part-II] [Don't fall in the traps... or the Hitchhiker's Guide to SNMP, Part-III] [Traces in the JVM SNMP Agent], [Welcome to the SNMP table!.. or the Hitchhiker's Guide to SNMP, Part-IV].