Actually, it’s kind of old story (3 months ago) when i still working on COOP Telkom Program. But this isn’t to late to talk about it, right ?. When i was on COOP Telkom, i have some task to develop an application that support a network device. This network device (I dont know what’s his name :P ) is used to monitor some physical condition of network infrastructure such as temperature, air pressure etc .Process for gathering information from this device is all ready handled by some program. The information from this device will be accessed periodically via SNMP protocol. My job is to make sure that it will work.

On the first moment, i was confusing about what should i do. So i began to search some information on google about it. And i found some tools named Net-SNMP. So what the hell is it all about ?. Net-SNMP is a program that run under unix environment that implementing some SNMP functionality. More over, user can also add some new SNMP functionality to it (Net-SNMP is an open source program). So i started to create appropriate design for it.

My application will consist of three main parts. The first one is core engine, this is actually a Net-SNMP engine that it’s functionality extended by me. The way to do it is consist of some steps:

  1. First, you have to implement a MIB. Each real object which will be monitor is consist of 4 MIB node objects, that is objectName, objectValue, objectLastMessage and objectThresholdSettings. Object Value is specify what is the current value from it, while objectLastMessage is specifying what is the last message relate with it. The last one is objectThresholdSettings, it consist of information to set threshold value for an object.
  2. After you’ve successfully implement your MIB, the next step you should do is to implement an MIB module for it. MIB module is developed by C programming language. This is some scratch of MIB module for an object:

    MIB Module

    MIB Module

  3. As an additional information each object is linked with a procedure handler. On this handler what should have to do on each state of object must be specifying. As an example, on GET mode what should i do is to read object information from a file and save it into data buffer on memory. Totally, there are 5 kinds of mode : GET, GET-NEXT,SET_RESERVE1, SET_RESERVE2, SET_UNDO and SET. SET mode is not simple as i imagine before, steps processing on SET mode is described on the picture bellow.

    SET Mode processing

    SET Mode processing

The second part of my application is checker value. This is just a simple application that periodically will read value of an object and compare it. After this comparation, it would be able to judge what is status for this object (ex: Normal, Warning or Danger), it’s decided from objectValue and objectThresholdSettings.