[nic] General Improvements

Mike Bydalek mbydalek at compunetconsulting.com
Thu Jan 13 06:44:33 PST 2005


Quoting Chuck Hagenbuch <chuck at horde.org>:

> Quoting Mike Bydalek <mbydalek at compunetconsulting.com>:
>
>> The problem with that, of course, is now that each router is going to
>> have different oid's the user would want to query.  So, do we have an
>> oid param for device router in the devices.php, or is there a better way
>> to go about this?  If the same way of doing is kept, a user would need a
>> different class per router they wanted to monitor, which wouldn't be a
>> good way to go.
>
> I'm not sure I follow. You could specify an array of oids for each router
> device... ?

The problem I wanted to clear up was how/where to specify this array at.  I
mean, the way to do it would be to create 1 device driver 'router' say, and
then allow a user to say, "Okay, for HOST-A, I want OID A, B, and C, but for
HOST-B, I only want OID A, D, and E - where HOST-A and B could be 2 routers of
the same model.  The way I was thinking of was perhaps for "router" 
devices, is
to have an array of OIDs to be monitored in the device config file.  That seem
reasonable enough?

>
>> To implent this, I was thinking about putting a reference to a
>> RRD-Driver in Nic_Device_SNMP::retrieveStoreableData() in SNMP.php  In
>> here, I would just pass all the data that would need to be stored to the
>> RRD file which can be pulled seperately, or all together, via. rrdgraph.
>
> Sounds fine in theory...

I'll put something together and see what you think on it then.

>
>> The downside of this is that there's actually duplicate storage devices
>> being used, sql and rrd.  Personally, this wouldn't be a bad way to go
>> as the stats and whatnot can more easily get the recent data from the
>> SQL driver, and the rrd can be used solely for graphs.  My only
>> hesitation with this is that it's "not the Horde way" (or at least what
>> I've learned to think the "Horde way" is...).
>
> I don't really see it that way, so I'm curious what you think the
> "Horde way" is with respect to this.

My co-worker and I use the phrase "Horde way" when we mean to say "don't
hard-code something that would be better off dynamic!"  So please don't 
take it
as an insult, but more of a compliment on how dynamic all of your code has
been! :)  Anyways, my point of using it above was to mean that personally I
haven't seen the use of 2 backends so far and looking at all the code 
that I've
worked with on Horde so far, I wasn't sure if this was the "best" or "most
efficient" way to go about this.  My only fear was for me to do this and then
have you come back and say "well, using 2 backends is pointless because ...".
That's all...

-Mike

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.



More information about the nic mailing list