Subject: Script MIB implementation question

From: [email-masked]
Date: Fri, 26 Mar 1999 11:49:40 -0500 (EST)

Hello,

I have a question for those folks that have implementations of the
DISMAN-SCRIPT-MIB.  I'd appreciate any/all experiences and insight.

Have any of you with DISMAN-SCRIPT-MIB implementations attempted to
do practical network management tasks with it?  What sort of things
have you done, and how did you achieve it?   What languages did you
use and what extensions did you have to have (or provide) to make
your application work?

For example, I'd like to write a script for a DISMAN-SCRIPT-MIB 
agent that:

1)  Continually monitors a MIB object, say ifInNUCastPackets.1,
    at say, 1 minute intervals, and provides a rate calculation;

2)  Starts the script running when the agent boots;

3)  Returns the value of rate calculation as an integer object
    so it can be retrieved periodically and graphed as a function
    of time with an off-the-shelf SNMP management tool like HP
    OpenView.

This seems to be problematic with the vanilla DISMAN-SCRIPT-MIB
for several reasons:

1)  The DISMAN-SCRIPT-MIB has no facility for automatically
    launching scripts at agent start-up;

2)  The DISMAN-SCRIPT-MIB has no way to let a script run perpetually
    without automatic expiration;

3)  The DISMAN-SCRIPT-MIB cannot have anything but an octet string
    stuffed into the smRunResult MIB object.

I'm I "thinking inside the box" or missing something here?  Any
suggestions about how to solve these problems?

I'm not (yet!) familiar with other possible solutions like the 
event or expression MIBs, and don't currently have the agents
that implement the event or expression MIBs in my toolbox of 
solutions.  I do have a DISMAN-SCRIPT-MIB implementation in my
toolbox, so that's why I'm looking to solve this problem with
the DISMAN-SCRIPT-MIB implementation.  Seems simple enough.

Thanks much for your assistance!

Best regards,
--Alan
 
 -----------------------------------------------------------------------------
 Alan Luchuk       SNMP Research, Inc.                 Voice:  +1 423 573 1434
 Software Engineer 3001 Kimberlin Heights Road         FAX:    +1 423 573 9197
 [email-masked]   Knoxville, TN  37920-9716  U.S.A.   http://www.int.snmp.com/
 -----------------------------------------------------------------------------

---

From: Juergen Schoenwaelder <[email-masked]>
Date: Mon, 29 Mar 1999 14:03:18 +0200

>>>>> luchuk  writes:

luchuk> Have any of you with DISMAN-SCRIPT-MIB implementations
luchuk> attempted to do practical network management tasks with it?
luchuk> What sort of things have you done, and how did you achieve it?
luchuk> What languages did you use and what extensions did you have to
luchuk> have (or provide) to make your application work?

We are currently working on scripts for "distributed service
testing". The core idea is similar to the remote operations work.
However, we focus on more complex services and test. For example, we
have written a script which monitors the accessibility of documents on
Web servers. The DISMAN-SCRIPT-MIB allows to run our test scripts from
multiple distributed test points in the Internet. We currently use
Java plus a Java package which provides access to the Script MIB
implementation.

luchuk> For example, I'd like to write a script for a
luchuk> DISMAN-SCRIPT-MIB agent that:

luchuk> 1) Continually monitors a MIB object, say ifInNUCastPackets.1,
luchuk> at say, 1 minute intervals, and provides a rate calculation;

luchuk> 2) Starts the script running when the agent boots;

luchuk> 3) Returns the value of rate calculation as an integer object
luchuk> so it can be retrieved periodically and graphed as a function
luchuk> of time with an off-the-shelf SNMP management tool like HP
luchuk> OpenView.

luchuk> This seems to be problematic with the vanilla
luchuk> DISMAN-SCRIPT-MIB for several reasons:

luchuk> 1) The DISMAN-SCRIPT-MIB has no facility for automatically
luchuk> launching scripts at agent start-up;

Yes, the DISMAN-SCRIPT-MIB is currently silent about this. I agree
that a standards mechanism for launching scripts at startup would be
valuable. This is probably something to look at once we start work on
a revision of the DISMAN-SCRIPT-MIB. (I personally have no problem to
work out the details now so that we can implement any additions that
may be needed fast without having to resort to private MIB extensions.)

luchuk> 2) The DISMAN-SCRIPT-MIB has no way to let a script run
luchuk> perpetually without automatic expiration;

The model right now requires the `manager' to periodically reset
smRunLifeTime if you want a script to run forever. The argument here
was that a manager should take care and responsibilty for the scripts
that are running (and thus consuming resources). It is sufficient to
reset smRunLifeTime once per year if you pick large numbers. Sure, for
a script which only monitors a MIB object and does rate calculations,
you probably don't care about the resources. This is perhaps another
issue where we want to work on.

luchuk> 3) The DISMAN-SCRIPT-MIB cannot have anything but an octet
luchuk> string stuffed into the smRunResult MIB object.

This is on purpose. There was some discussion about this in the past.
In particular, we discussed whether there should be a "discriminated"
union table for script results. The conclusion of our discussion was
that a script should export results in their own MIB. In other words,
your script for rate calculations will instantiate MIB objects defined
in a MIB module implemented by your script. This means that you ship
the script together with the MIB module describing the results
produced by running your script. This approach has the advantage that
you can document the semantics of the MIB objects your script
instantiates.

BTW, our distributed service testing scripts currently use the
smRunResult object to hold the results in a "structured" OCTET
STRING. The reason why we did not use the MIB approach yet is that the
SMX protocol between our runtime systems and the SNMP agent does not
allow to instantiate MIB objects. This is on purpose since we want to
use AgentX (as a language extension) for that purpose. Since we do not
have AgentX support yet, we have to resort to smRunResult.

							Juergen
-- 
Juergen Schoenwaelder  [email-masked] http://www.cs.tu-bs.de/~schoenw
Technical University Braunschweig, Dept. Operating Systems & Computer Networks
Bueltenweg 74/75, 38106 Braunschweig, Germany.        (Tel. +49 531 / 391 3289)