200 likes | 384 Views
SNMP MIB Modeling. Mi-Jung Choi Dept. of Computer Science KNU Email: mjchoi@kangwon.ac.kr. Table of Contents. SNMP MIB Object Modeling Categorize MIB Objects Translate Model into a MIB Modeling Example: Car. SNMP MIB Modeling.
E N D
SNMP MIB Modeling Mi-Jung Choi Dept. of Computer Science KNU Email: mjchoi@kangwon.ac.kr
Table of Contents • SNMP MIB Object Modeling • Categorize MIB Objects • Translate Model into a MIB • Modeling Example: Car
SNMP MIB Modeling • MIB is essential for developing and operating management systems • SNMP MIBs are NOT object-oriented • inheritance is not supported • Analysis of MIB objects is required before writing MIB definitions • Using the designed model, MIB definitions can be easily generated • Similar to software engineering -- must design a system before any implementation!
Step1: Categorize MIB Objects • Components • collections of logical & physical devices or services that are being managed • Attributes • fairly static properties of a modeled object • Actions • control a system • Statistics • useful information about what a system has been doing • State • the current condition of a system
Components • physical or logical containment relationships? • what does it contain? • start from the top level and work down until reasonable size is reached • physical containment? • e.g., a list of interface cards • logical containments? • e.g., communication systems • Cardinality • how many of an item are present in a system?
Attributes • the fairly static properties of the resource being modeled • e.g., name, id, location, etc. • can be refined into related groups • Identity of an object • determine ID by an attribute • assign an arbitrary ID
Actions • SNMP does not support explicit action operation • represented in terms of implicit actions which do their work throughside effects • this is achieved by setting some value of a MIB object • Need to define action goals and action steps • action goals? • what does the manager need to be able to do to the managed resource? • action steps? • how does it do it?
Statistics • show a picture of the past • a record of the interesting events which occurred since a specific point in time • “high water marks” identify peaks in resource utilization • all stats are considered valid for a specific period of time (known asepoch) • What statistics are we interested in?
State • provides insight into the current condition of the resource • represents dynamic properties of the resource • stages of operation • e.g., enabled/disabled • resource usage level • e.g., queue is 50% full • a state graph (e.g., finite state machine)can be used to identify possible inputs and states of the resource
Step2: Translate Model into MIB • Generate an object analysis worksheet containing major components and their cardinality, attributes, statistics and states • Translate the worksheet into MIB syntax • sub-components with a cardinality greater than 0 should be part of a table • stats representing increasing values are Counter type • stats representing high or low water marks are Integer type • states representing discrete stages of operation are enumerated Integer type • states that have fluctuating values are Gauge type • attributes of an object can be • Octet String - human readable descriptions or binary data • Integer - measurable quantities
Modeling Example - CarPhysical Containments • Engine compartment • engine • transmission • climate control system • Passenger compartment • seats • dashboard/instrument panel • Chassis • doors • suspension system
Modeling Example - CarLogical Containments • Powertrain • engine • transmission • Exhaust • manifold • muffler • Electrical • spark plugs • battery • Environmental • passenger compartment • climate control • user preferences
Modeling Example - CarAttributes • Engine • horsepower rating • number of cylinders • Powertrain • drive type • 2 or 4 wheel • transmission type • manual • automatic • # of speeds • Chassis • fabrication date • Passenger compartment • seat type: bench or bucket • Electrical system • electrical capacity • Climate control system • thermal rating in BTUs
Modeling Example - CarActions • Powertrain • on/off engine • shift the gear • Exhaust • release smoke • Electrical • use/charge battery • on/off lights • Environmental • on/off heat • on/off air conditioner • change radio channels
Modeling Example - CarStatistics • Engine • peak horsepower • highest RPMs • total RPMs • trip mileage • total mileage • Powertrain • number of upshifts • number of downshifts • Electrical system • peak electrical requirements • average electrical requirements
Modeling Example - CarStates • Engine • stopped/starting/running/failed • engine speed in RPMs • oil pressure • fuel consumption rate • Powertrain • drive engaged: 2 or 4 • current gear • Chassis • door: open/closed • Electrical system • ok/shorted • battery charge • Climate control system • engaged/off-line
Object Analysis Sheetfor Car Engine Component Cardinality Attributes Statistics States
Engine MO Definition engCylTable OBJECT-TYPE SYNTAX SEQUENCE OF EngCylEntry ACCESS not-accessible STATUS mandatory DESCRIPTION “This table represents the sub-components of an engine that are dependent on the # of cylinders in the engine.” :: = { engine 1} engCylEntry OBJECT-TYPE SYNTAX EngCylEntry ACCESS not-accessible STATUS mandatory DESCRIPTION “A row in the engine cylinder table. Rows cannot be created or deleted via direct SNMP operations.” INDEX { engCylIndex } :: = { engCylTable 1}
Engine MO Definition (cont’d) EngCylEntry ::= SEQUENCE { engCylIndex Unsigned32, -- table index engCylPistonSize Unsigned32, -- attributes engCylSparkPlugSize Unsigned32, engCylSparkPlugVendor OBJECT IDENTIFIER, engCylInjectorCapacity Unsigned32, engCylFuelConsumed Counter32, -- statistics engCylSparkPlugState INTEGER, -- states engCylSparkPlugSparkRate Gauge32, engCylInjectorState INTEGER, engCylInjectorFuelRate Gauge32, } Note that the definition for each object is further required.
Summary • Constructing a structure is the most critical part of MIB development • Declaring the actual MIB objects is more of a task of translation than a labor or design • Tools such as DMH MIB Compiler (www.dmhsoftware.com) and MG-Soft MIB Compiler (www.mg-soft.si) can be used to define and compile SNMP MIB definitions • READING – David Perkins, Understanding SNMP MIBs, Prentice-Hall, Chapter 7