Allright, I've got the poller/discovery integrated into the existing
UPS and UPS Lines items.  I had to add a new item to identify the ups
type that you can get via $options. The terms I used were just "ups"
and "ups_mitsu".

As mentioned in the last email, the OID's that give the status (on
battery, etc) were hardcoded into the database, so I had to create a
poller for ups, which will require a few database changes.

The updated files are:

  discovery/ups.inc.php
  discovery/ups_lines.inc.php
  pollers/ups.php       <= new file
  pollers/ups_line.php

The pollers got slightly more complex since the Mitsubishi Diamondlink
UPS's I'm using (40kva and 30kva) give their Voltage and Current as
0.1% of total. However, this is worked in since whatever UPS this item
was originally for apparently doesn't do this.

Everything should work fine for the old UPS and the new ones. 

Here's the database entries that need modification/adding:

TABLE: interface_types_fields: (NEW RECORDS, probably change the ID)
id,description,name,pos,itype,ftype,showable,overwritable,tracked,default_value
10001,UPS Type,upstype,50,40,7,1,0,1
10002,UPS Type,upstype,50,41,7,1,0,1

TABLE: pollers (MODIFY EXISTING records)
id,name,description,command,parameters
170,status,UPS Battery Status,ups,
171,temperature,UPS Battery Temperature,ups,
172,minutes_remaining,UPS Battery Minutes Remaining,ups,
173,charge_remaining,UPS Battery Charge Remaining,ups,

I'll send the updated files to Javier off-list, I don't want to add
attachments and crap. I'm not a developer, so feel free to clean up
any ugliness you should see. It's pretty basic though.

To be specific, these code updates are for Mitsubishi Diamondlink
Netcom SNMP devices that attach to large Mitsubishi UPS's via serial.

http://meau.com/eprise/main/sites/public/PRODUCTS/Uninterruptible_Power_Supplies/NetCom/default

My tests were done on Model 2033C UPS's, but these boxes/MIBS should
work for all of them.

Javier, do you know if the snmp device the UPS was originally written
for supports Wattage, or do you have the MIBs for it? I'd like to add
a few more graphs for the input/output lines for this, since mine has
the data there. If those don't support it, I'll do some sort of
workaround.

--falz

On 9/12/05, falz <[EMAIL PROTECTED]> wrote:
> OK, I've modified the discoveries to work. However, for the poller of
> the UPS itsself, the MIB is hardcoded into the database.
> 
> Right now the polling done for the UPS itsself is done through a
> hardcoded MIB in the database. Without creating a new interface type
> for this type of UPS (not the _lines), is there any way to pass the
> seperate MIBs, or is the only way to do this is to write a poller file
> for the UPS instead of relying on these database entries?
> 
> thanks,
> --falz
> 
> 
> 
> On 9/12/05, falz <[EMAIL PROTECTED]> wrote:
> > At least 85% the same. The main difference is the MIBs. The Mitsubishi
> > MIBS also have more data that I'd like to grab, such as wattage. I
> > still have some touchup to do on the graphs as I mixed a database
> > table in one spot, but it's minor.
> >
> > How would you suggest the UPS thing does the search? Populate an array
> > with each type of MIB and loop w/ a foreach or similar?
> >
> > I'll look into doing this this week. The job of adding this UPS would
> > have been easier had I modified the UPS files directly, but I wanted
> > to know all of the steps involved in adding a new interface/host type.
> >
> > --falz
> >
> > On 9/11/05, Javier Szyszlican <[EMAIL PROTECTED]> wrote:
> > > Falz,
> > >
> > > You should have to add records to the tables manually, just use the 
> > > jffnms gui
> > > to add them, I mean its still manual, but not touching the tables 
> > > directly.
> > >
> > > How much like the UPS MIB is this new interface type? 90%? 20%? if its 
> > > more than
> > > 80% I would suggest to modify the UPS MIB to accomodate this new type of 
> > > device.
> > >
> > > Javier
> > >
> > > falz wrote:
> > > > OK, perfect. This is what I need to know. I manually added data needed
> > > > to the tables:
> > > >
> > > > interface_types_fields
> > > > pollers_poller_groups
> > > >
> > > > And now it's working properly!
> > > >
> > > > I'm going to do a little more tweaking and add some more data
> > > > (wattage, for example) and after a week of testing, I'd like to send
> > > > you my data I have to put into the main jffnms code, if possible
> > > > (essentially it's a complete copy of the ups and ups_lines that were
> > > > in there, with slight code changes and MIB changes).
> > > >
> > > > --falz
> > > >
> > > > On 9/10/05, Javier Szyszlican <[EMAIL PROTECTED]> wrote:
> > > >
> > > >>You have to MANUALLY add the interfaces fields for your new interface 
> > > >>type.
> > > >>
> > > >>And you have to create the description field if you want it.
> > > >>
> > > >>Javier
> > > >>
> > > >>falz wrote:
> > > >>
> > > >>>I've got the function names of the Interface Type fields matched up
> > > >>>with the filenames, and those are the items that seem to give me my
> > > >>>functional Discovery, but apparently nothing else.
> > > >>>
> > > >>>I've just gone through the Graphs config and replicated all of the
> > > >>>ups_* lines to be ups_mitsubishi_* and copied the related files, so
> > > >>>there appears to be a complete "copy" of all of the ups_ stuff
> > > >>>everywhere. Still when I add the interface, I get nothing in
> > > >>>interface_values.
> > > >>>
> > > >>>I did some more work with the array that the discovery function
> > > >>>returns. A few questions about this.
> > > >>>
> > > >>>According to docs, the array that the function returns can contain any
> > > >>>valid names that match up with what's in "interface_types_fields"
> > > >>>table in the database. I don't see anything in jffnms to edit/alter
> > > >>>this, is this "hardcoded" not intended to be changed?
> > > >>>
> > > >>>In my discovery, if I return something as "description", shouldnt it
> > > >>>simply show up on the screen in the Description field on the line for
> > > >>>the interface it returns?
> > > >>>
> > > >>>Here's a debug of one array I'm returning from discovery. In the case
> > > >>>below, I don't get anything in the "Description" field on screen,
> > > >>>although "description" is a field in "interface_types_fields".
> > > >>>
> > > >>>Array
> > > >>>(
> > > >>>    [1] => Array
> > > >>>        (
> > > >>>            [description] => UPS01 (40kva)
> > > >>>            [interface] => UPS Mitsubishi
> > > >>>            [admin] => ok
> > > >>>            [oper] => battery normal
> > > >>>        )
> > > >>>)
> > > >>>
> > > >>>When browsing through the interface_types_fields table, I see that
> > > >>>there are multiple entries for several, (Description exists many
> > > >>>times) all with a different "itype". I can manually enter one with an
> > > >>>itype that matches mine, (10001), but I guess I'd like to do it the
> > > >>>"right" way instead.
> > > >>>
> > > >>>--falz
> > > >>>
> > > >>>On 9/8/05, Javier Szyszlican <[EMAIL PROTECTED]> wrote:
> > > >>>
> > > >>>
> > > >>>>You should remember the interface types fields, you will need those 
> > > >>>>for everything.
> > > >>>>
> > > >>>>Thats why you don't have anything in the interface_values table too.
> > > >>>>
> > > >>>>Javier
> > > >>>>
> > > >>>>falz wrote:
> > > >>>>
> > > >>>>
> > > >>>>>I'm adding support for some Mitsubishi UPS's we have. I see that 
> > > >>>>>there
> > > >>>>>are generic "UPS" and "APC UPS" items listed already. Looking at the
> > > >>>>>discovery/ items for the generic "UPS", this seemed to be quite close
> > > >>>>>to the one I'm adding.
> > > >>>>>
> > > >>>>>So, I've gone through and made a copy of all of the necessary files
> > > >>>>>that need to be changed, such as:
> > > >>>>>
> > > >>>>>pollers/ups_line.php -> pollers/ups_mitsubishi_line.php (modifying
> > > >>>>>where necessary)
> > > >>>>>
> > > >>>>>same with:
> > > >>>>>
> > > >>>>>discovery/ups.inc.php -> discovery/ups_mitsubishi.inc.php
> > > >>>>>discovery/ups_line.inc.php -> discovery/ups_mitsubishi_line.inc.php
> > > >>>>>
> > > >>>>>In JFFNMS, I've added
> > > >>>>>
> > > >>>>>In "Interface Types" I've added the items match the fionction name
> > > >>>>>(ups_mitsubishi, ups_mitsubishi_line)
> > > >>>>>
> > > >>>>>In "Poller Items" I've copied the UPS ones, but changed "Poller
> > > >>>>>Command (file)" to ups_mitsubishi_line to match my pollers/* file, 
> > > >>>>>and
> > > >>>>>set the correct OID in "Parameters" where necessary. I've left the
> > > >>>>>graph items to the defaults of what the UPS items were, as the files
> > > >>>>>in graphs/ may work just fine (I will tweak when necessary when I can
> > > >>>>>actually see data.
> > > >>>>>
> > > >>>>>In "Poller Grouping" I've created "UPS Mitsubishi" and "UPS 
> > > >>>>>Mitsubishi
> > > >>>>>Lines" and matched them with the interfaces.
> > > >>>>>
> > > >>>>>
> > > >>>>>
> > > >>>>>When I do a discovery on this IP, it finds the appropriate interfaces
> > > >>>>>(one for the ups, one input line, one output line).
> > > >>>>>
> > > >>>>>However, when I click "add" I get a screen with no interfaces listed.
> > > >>>>>The database shows the items added to the jffnms.interfaces table. If
> > > >>>>>I go to "view host interfaces" for this I can see them to choose, but
> > > >>>>>nothing appears to edit.
> > > >>>>>
> > > >>>>>It appears I have missed a step in adding this new interface. Any 
> > > >>>>>idea
> > > >>>>>what it is? The interfaces are in the database, show if I go to
> > > >>>>>"performance" but if I choose them, or choose to view interfaces of
> > > >>>>>the host, nothing appears.
> > > >>>>>
> > > >>>>>Thanks,
> > > >>>>>--falz
> > > >>>>>
> > > >>>>>
> > > >>>>>-------------------------------------------------------
> > > >>>>>SF.Net email is Sponsored by the Better Software Conference & EXPO
> > > >>>>>September 19-22, 2005 * San Francisco, CA * Development Lifecycle 
> > > >>>>>Practices
> > > >>>>>Agile & Plan-Driven Development * Managing Projects & Teams * 
> > > >>>>>Testing & QA
> > > >>>>>Security * Process Improvement & Measurement * 
> > > >>>>>http://www.sqe.com/bsce5sf
> > > >>>>>_______________________________________________
> > > >>>>>jffnms-users mailing list
> > > >>>>>[email protected]
> > > >>>>>https://lists.sourceforge.net/lists/listinfo/jffnms-users
> > > >>>>
> > > >>>>--
> > > >>>>=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> > > >>>>Javier Szyszlican, Project Leader, JFFNMS
> > > >>>>[EMAIL PROTECTED]
> > > >>>>
> > > >>>>I hope JFFNMS or I were helpful to you, if you
> > > >>>>can, please donate at http://jffnms.org/donate
> > > >>>>
> > > >>>>
> > > >>>>
> > > >>>>-------------------------------------------------------
> > > >>>>SF.Net email is Sponsored by the Better Software Conference & EXPO
> > > >>>>September 19-22, 2005 * San Francisco, CA * Development Lifecycle 
> > > >>>>Practices
> > > >>>>Agile & Plan-Driven Development * Managing Projects & Teams * Testing 
> > > >>>>& QA
> > > >>>>Security * Process Improvement & Measurement * 
> > > >>>>http://www.sqe.com/bsce5sf
> > > >>>>_______________________________________________
> > > >>>>jffnms-users mailing list
> > > >>>>[email protected]
> > > >>>>https://lists.sourceforge.net/lists/listinfo/jffnms-users
> > > >>>>
> > > >>>
> > > >>>
> > > >>>
> > > >>>-------------------------------------------------------
> > > >>>SF.Net email is Sponsored by the Better Software Conference & EXPO
> > > >>>September 19-22, 2005 * San Francisco, CA * Development Lifecycle 
> > > >>>Practices
> > > >>>Agile & Plan-Driven Development * Managing Projects & Teams * Testing 
> > > >>>& QA
> > > >>>Security * Process Improvement & Measurement * 
> > > >>>http://www.sqe.com/bsce5sf
> > > >>>_______________________________________________
> > > >>>jffnms-users mailing list
> > > >>>[email protected]
> > > >>>https://lists.sourceforge.net/lists/listinfo/jffnms-users
> > > >>
> > > >>--
> > > >>=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> > > >>Javier Szyszlican, Project Leader, JFFNMS
> > > >>[EMAIL PROTECTED]
> > > >>
> > > >>I hope JFFNMS or I were helpful to you, if you
> > > >>can, please donate at http://jffnms.org/donate
> > > >>
> > > >>
> > > >>
> > > >>-------------------------------------------------------
> > > >>SF.Net email is Sponsored by the Better Software Conference & EXPO
> > > >>September 19-22, 2005 * San Francisco, CA * Development Lifecycle 
> > > >>Practices
> > > >>Agile & Plan-Driven Development * Managing Projects & Teams * Testing & 
> > > >>QA
> > > >>Security * Process Improvement & Measurement * 
> > > >>http://www.sqe.com/bsce5sf
> > > >>_______________________________________________
> > > >>jffnms-users mailing list
> > > >>[email protected]
> > > >>https://lists.sourceforge.net/lists/listinfo/jffnms-users
> > > >>
> > > >
> > > >
> > > >
> > > > -------------------------------------------------------
> > > > SF.Net email is Sponsored by the Better Software Conference & EXPO
> > > > September 19-22, 2005 * San Francisco, CA * Development Lifecycle 
> > > > Practices
> > > > Agile & Plan-Driven Development * Managing Projects & Teams * Testing & 
> > > > QA
> > > > Security * Process Improvement & Measurement * 
> > > > http://www.sqe.com/bsce5sf
> > > > _______________________________________________
> > > > jffnms-users mailing list
> > > > [email protected]
> > > > https://lists.sourceforge.net/lists/listinfo/jffnms-users
> > >
> > > --
> > > =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> > > Javier Szyszlican, Project Leader, JFFNMS
> > > [EMAIL PROTECTED]
> > >
> > > I hope JFFNMS or I were helpful to you, if you
> > > can, please donate at http://jffnms.org/donate
> > >
> > >
> > >
> > > -------------------------------------------------------
> > > SF.Net email is Sponsored by the Better Software Conference & EXPO
> > > September 19-22, 2005 * San Francisco, CA * Development Lifecycle 
> > > Practices
> > > Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
> > > Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
> > > _______________________________________________
> > > jffnms-users mailing list
> > > [email protected]
> > > https://lists.sourceforge.net/lists/listinfo/jffnms-users
> > >
> >
>


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
jffnms-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jffnms-users

Reply via email to