Archived community.zenoss.org | full text search
Skip navigation
15848 Views 3 Replies Latest reply: Nov 27, 2011 12:56 AM by Mage Mojo RSS
mrchippy ZenossEmployee 34 posts since
May 12, 2008
Currently Being Moderated

Jan 7, 2010 12:11 PM

Nice oid to datasource loader script

Per the discussion in IRC, here's a script we use around here for loading oid's from a mib into a template.

 

Chip

Zenoss

Attachments:
  • 11010490 Newbie 2 posts since
    Feb 15, 2011
    Currently Being Moderated
    1. Feb 15, 2011 10:29 PM (in response to mrchippy)
    Re: Nice oid to datasource loader script

    Any usage notes for this script?

  • jmp242 ZenossMaster 4,060 posts since
    Mar 7, 2007
    Currently Being Moderated
    2. Feb 16, 2011 8:26 AM (in response to 11010490)
    Re: Nice oid to datasource loader script

    Looking at the script source code, it looks like you do

     

    bulkLoadSnmpCounters {/Device/Class,TemplateName}

     

    Of course, where their code would spit out the WMI part, it's actually looking for OIDs in a MIB file. It's a short script, looking at the code does show some cool stuff you can do with dmd and apparently some methods they expose in Zenoss core.

     

    This should be prominently placed I think . . . I'll make a FAQ entry.

    --

    James Pulver

    Information Technology Area Supervisor

    LEPP Computer Group

    Cornell University

  • Mage Mojo Rank: White Belt 6 posts since
    Aug 10, 2011
    Currently Being Moderated
    3. Nov 27, 2011 12:56 AM (in response to mrchippy)
    Re: Nice oid to datasource loader script

    Created a template MMCisco under Devices -> Network -> MMCisco

     

    Uploaded the mib CISCO-STACK-MIB.mib along with bulkLoadSnmpCounters.py to the same folder.

     

    Tried running both:

    python bulkLoadSnmpCounters.py /Devices/Network,MMCisco CISCO-STACK-MIB.mib

    python bulkLoadSnmpCounters.py /Network,MMCisco CISCO-STACK-MIB.mib

     

    But keep getting the error:

    Traceback (most recent call last):

      File "bulkLoadSnmpCounters.py", line 50, in <module>

        (id, oid, type) = dp.split(" ")

    ValueError: need more than 2 values to unpack

     

    I thought this script would allow me to create a template and then load a mib into the data sources of my template.  Did I misunderstand something?  Is there a problem loading the Cisco MIB's?

More Like This

  • Retrieving data ...