Skip navigation
16392 Views 4 Replies Latest reply: Jul 27, 2010 11:17 AM by jcurry RSS
Andrea Consadori ZenossMaster 863 posts since
Feb 11, 2008
Currently Being Moderated

Jun 22, 2010 1:42 PM

add custom data to device tab

i know i know, i see this question a lot of time and with zenoss 2.x you've to be a phyton guru to do it.

 

So, now with Zenoss 3.0 and the complete web interface rewriting there's any chance to customize data into device info's?


it's possible to grab textual information from oid snmp and put in free text table easyer than before?

 

i ask only if it's possible to permit easy simple customization, i don't hope in a full easy skin customization.

 

Thanks

Andrea Consadori

  • kkearney ZenossEmployee 118 posts since
    Sep 23, 2008
    Currently Being Moderated
    1. Jun 23, 2010 12:37 PM (in response to Andrea Consadori)
    Re: add custom data to device tab

      You're probably aware of what I'm going to say, but I'll say it anyway because it might help other people.  If there's something more specific, then reply back. 

     

    In general, the whole data collection (modeling and performance collecting) doesn't change much in Zenoss 3.0.  So the first part of the problem (ie getting the info onto a Zenoss object through a modeler or collector plugin doesn't change).  Presenting a Zope Page Template (zpt) at the device level (ie on a tab in Zenoss 2.x) is preserved (lots of effort involved in trying to make that happen, btw) by updating the 'factory' information.

     

    {{{

    factory_type_information = (
            {
                'immediate_view' : 'devicedetail',
                'actions'        :
                (  
                    { 'id'            : 'status'
                    , 'name'          : 'Status'
                    , 'action'        : 'devicedetail'
                    , 'permissions'   : (ZEN_VIEW, )
                    },
                    { 'id'            : 'perfServer'
                    , 'name'          : 'Graphs'
                    , 'action'        : 'viewDevicePerformance'
                    , 'permissions'   : (ZEN_VIEW, )
                    },
                )
             },
            )

    }}}

     

    Throw the zpt (or JS) into the ZenPack's skins/<zpname> directory and you're done!

     

    Notes about the fields:
    * id is something that needs to be unique

    * name is something that the user will see

    * action is the name of the template (without the .zpt extension) or JavaScript (without the .js extension I believe -- I haven't tried this yet)

     

     

      Graphics displays, at least in my experience, always seem to involve a lot of work, and that doesn't change much in Zenoss 3.0.

     

     

    kells

  • jcurry ZenossMaster 1,021 posts since
    Apr 15, 2008
    Currently Being Moderated
    2. Jul 9, 2010 10:19 AM (in response to kkearney)
    Re: add custom data to device tab

    Does the "id" field in the factory_type_information have to match anything else significant??  Object name?? Relationship name?? Or could I, in theory, use id1, id2, etc...

     

    Also (talking 2.5.2 here), I am having big problems with whatever is in the immediate_view field is causing problems to a ZenPack modeler plugin.  I have a new device type that inherits from Device (whose immediate_view is deviceStatus).  My modeler plugin barfed with keyError: deviceStatus.  In my Zenpack object class, I have overriden the immediate_view with a template in my ZenPack (PackageDeviceDetail).  The skin displays fine and is the default view, but the modeler plugin now barfs on keyError: PackageDeviceDetail.

     

    Why on earth is a modeler plugin barfing on a defualt skin??

     

    Cheers,

    Jane

  • kkearney ZenossEmployee 118 posts since
    Sep 23, 2008
    Currently Being Moderated
    3. Jul 15, 2010 2:36 PM (in response to jcurry)
    Re: add custom data to device tab

    The id field should be unique, and I haven't seen anything that keys off of the id particularly.

     

    WRT to modeler plugins being upset, I should probably reserve comment until you can get a chance to post a traceback.

     

     

    kells

  • jcurry ZenossMaster 1,021 posts since
    Apr 15, 2008
    Currently Being Moderated
    4. Jul 27, 2010 11:17 AM (in response to kkearney)
    Re: add custom data to device tab

    My problem turned out that the error message was a red herring.  I think the real issue was that I had omitted to set the id field.  See http://community.zenoss.org/thread/13893?tstart=0 for more details.

     

    Cheers,

    Jane

More Like This

  • Retrieving data ...

Legend

  • Correct Answers - 4 points
  • Helpful Answers - 2 points