Skip navigation
1 ... 5 6 7 8 9 Previous Next 759876 Views 132 Replies Latest reply: Mar 16, 2011 4:23 PM by kchengva RSS Go to original post
  • zenorr Rank: White Belt 67 posts since
    May 6, 2010
    Currently Being Moderated
    105. Feb 2, 2011 9:50 AM (in response to zenorr)
    Re: New IP-SLA Enumeration/Monitoring ZenPack

    I'm progressing, but not really that much. Here is another error (or at least I think so) in 2.0.1 :

     

    the first part of the command template for the data source should be

     

    ${here/ZenPackManager/packs/ZenPacks.ipSLA.SLADevice/path}/Collect_SLA.py

     

    and not

     

    ${here/ZenPackManager/packs/ZenPacks.zenoss.ipSLA/path}/Collect_SLA.py

  • Shane Scott ZenossMaster 1,373 posts since
    Jul 6, 2009
    Currently Being Moderated
    106. Feb 2, 2011 5:20 PM (in response to zenorr)
    Re: New IP-SLA Enumeration/Monitoring ZenPack

    Zenorr:

     

    Could you please doe the following for me:

     

    1) Issue 'updatedb && locate Collect_SLA.py'

    2) Send the full path to Collect_SLA.py in your reply

    3) Change to the full path of Collect_SLA.py

    4) Issue 'python Collect_SLA.py -d [ip/hostname] -c [community] -k [the instance number] -t V' filling the bracket variables.

    4a) Example: python Collect_SLA.py -d Cosmo.Hyrule.Local -c Common -k 1 -t V

    5) Send the full traceback or result in your reply

    6) Issue 'python Collect_SLA.py -d [ip/hostname] -c [community] -t V' filling the bracket variables.

    6a) Example: python Collect_SLA.py -d Cosmo.Hyrule.Local -c Common -t V

    7) Send the full traceback or result in your reply

    8) Locate the device under zenoss/perf/devices/

    9) Identify if ipSLA directory is present

    9a) If yes, issue 'ls -lh ipSLA' and send result in your reply

     

    Thanks Zenorr!

     

    Best,

    --Shane William Scott

    Http://ShaneWilliamScott.com

  • zenorr Rank: White Belt 67 posts since
    May 6, 2010
    Currently Being Moderated
    107. Feb 3, 2011 3:05 AM (in response to Shane Scott)
    Re: New IP-SLA Enumeration/Monitoring ZenPack

    Hi Shane,

     

    I really appreciate your help ! My answers are mixed between your questions below.

    And sorry to have bothered you both in forums and mail...

     

    1) Which version of Zenoss 2.X.X or 3.X.X?

     

    Zenoss 2.5.2

     

    2) 32-bit or 64-bit

     

    64 bits

     

    3) What Linux distribution

     

    Ubuntu Server 10.04 LTS, 64 bits

     

    4) Native or Stack install of Zenoss?

     

    stack install (zenoss-stack-2.5.2-linux-x64.bin)

     

    > 1) Issue 'updatedb && locate Collect_SLA.py'
    /opt/zenoss/zenoss/ZenPacks/ZenPacks.ipSLA.SLADevice-2.0.1-py2.4.egg/ZenPacks/ipSLA/SLADevice/Collect_SLA.py
    > 2) Send the full path to Collect_SLA.py in your reply
    /opt/zenoss/zenoss/ZenPacks/ZenPacks.ipSLA.SLADevice-2.0.1-py2.4.egg/ZenPacks/ipSLA/SLADevice/
    > 3) Change to the full path of Collect_SLA.py
    cd /opt/zenoss/zenoss/ZenPacks/ZenPacks.ipSLA.SLADevice-2.0.1-py2.4.egg/ZenPacks/ipSLA/SLADevice/
    > 4) Issue 'python Collect_SLA.py -d [ip/hostname] -c [community] -k [the instance number] -t V' filling the bracket variables.
    > 4a) Example: python Collect_SLA.py -d Cosmo.Hyrule.Local -c Common -k 1 -t V
    > 5) Send the full traceback or result in your reply
    python Collect_SLA.py -d XXX -c YYY -k 1 -t V
    OK| key=1 rttMonLatestRttOperCompletionTime=1 rttMonLatestRttOperSense=1
    rttMonLatestRttOperApplSpecificSense=0 rttMonLatestRttOperTime=6902771
    rttMonLatestJitterOperAvgJitter=0 rttMonLatestJitterOperIAJIn=0
    rttMonLatestJitterOperIAJOut=0 rttMonLatestJitterOperICPIF=0
    rttMonLatestJitterOperMOS=0
    > 6) Issue 'python Collect_SLA.py -d [ip/hostname] -c [community] -t V' filling the bracket variables.
    > 6a) Example: python Collect_SLA.py -d Cosmo.Hyrule.Local -c Common -t V
    > 7) Send the full traceback or result in your reply
    python Collect_SLA.py -d XXX -c YYY -t V
    OK| key= 1 RttOperCompletionTime= 1 RttOperSense= 1 ApplSpecificSense= 0 RttOperTime= 6909771
    OK| key= 3 RttOperCompletionTime= 1 RttOperSense= 1 ApplSpecificSense= 0 RttOperTime= 6909732
    OK| key= 2 RttOperCompletionTime= 8 RttOperSense= 1 ApplSpecificSense= 0 RttOperTime= 6909732
    OK| key= 4 RttOperCompletionTime= 1 RttOperSense= 1 ApplSpecificSense= 0 RttOperTime= 6909732
    OK| key= 1844843674 RttOperCompletionTime= 1 RttOperSense= 1 ApplSpecificSense= 0 RttOperTime= 6909819
    OK| key= 1199752005 RttOperCompletionTime= 1 RttOperSense= 1 ApplSpecificSense= 0 RttOperTime= 6909819
    > 8) Locate the device under zenoss/perf/devices/
    > 9) Identify if ipSLA directory is present
    > 9a) If yes, issue 'ls -lh ipSLA' and send result in your reply
    remark : the directory is named "ipSLAs", not "ipSLA"

    ls -lh ipSLAs/
    total 24K
    drwxr-x--- 2 zenoss zenoss 4.0K 2011-02-02 15:39 SLA
    drwxr-x--- 2 zenoss zenoss 4.0K 2011-02-02 15:39 SLA_2
    drwxr-x--- 2 zenoss zenoss 4.0K 2011-02-02 11:39 SLA_XX1-GigabitEthernet0_1
    drwxr-x--- 2 zenoss zenoss 4.0K 2011-02-02 11:39 SLA_XX2-FastEthernet0_1
    drwxr-x--- 2 zenoss zenoss 4.0K 2011-02-02 11:39 SLA_XX3-FastEthernet0_0
    drwxr-x--- 2 zenoss zenoss 4.0K 2011-02-02 11:39 SLA_XX4-FastEthernet0_1

    And maybe I should add the following : I think the problem is that Zenoss doesn't set ${here/instance} correctly when
    calling the script, hence the error dump I mentionned on February the 1st :

    Type: KeyError
    Value: 'instance'

    Traceback (innermost last):

    • Module ZPublisher.Publish, line 119, in publish
    • Module ZPublisher.mapply, line 88, in mapply
    • Module ZPublisher.Publish, line 42, in call_object
    • Module Products.ZenModel.BasicDataSource, line 184, in manage_testDataSource
    • Module Products.ZenModel.RRDDataSource, line 207, in getCommand
    • Module zope.tales.expressions, line 261, in __call__
    • Module zope.tales.expressions, line 217, in __call__
    • Module Products.PageTemplates.Expressions, line 131, in _eval
    • Module zope.tales.expressions, line 124, in _eval
    • Module Products.PageTemplates.Expressions, line 80, in boboAwareZopeTraverse
    • Module OFS.Traversable, line 301, in restrictedTraverse
    • Module OFS.Traversable, line 284, in unrestrictedTraverse
      __traceback_info__: ([], 'instance')

    KeyError: 'instance'



    Beside, do you have an Amazon wish list so I can show my appreciation ?

     

    THX !

    Charles

  • Shane Scott ZenossMaster 1,373 posts since
    Jul 6, 2009
    Currently Being Moderated
    108. Feb 3, 2011 3:08 AM (in response to zenorr)
    Re: New IP-SLA Enumeration/Monitoring ZenPack

    Charles:

     

    Could you please doe the following for me:

     

     

    1) Issue 'updatedb && locate Collect_SLA.py'

     

    2) Send the full path to Collect_SLA.py in your reply

     

    3) Change to the full path of Collect_SLA.py

     

    4) Issue 'python Collect_SLA.py -d Re: New IP-SLA Enumeration/Monitoring ZenPack -c Re: New IP-SLA Enumeration/Monitoring ZenPack -k [the

    instance number] -t V' filling the bracket variables.

     

    4a) Example: python Collect_SLA.py -d Cosmo.Hyrule.Local -c Common -k 1 -t V

     

    5) Send the full traceback or result in your reply

     

    6) Issue 'python Collect_SLA.py -d Re: New IP-SLA Enumeration/Monitoring ZenPack -c Re: New IP-SLA Enumeration/Monitoring ZenPack -t V'

    filling the bracket variables.

     

    6a) Example: python Collect_SLA.py -d Cosmo.Hyrule.Local -c Common -t V

     

    7) Send the full traceback or result in your reply

     

    8) Locate the device under zenoss/perf/devices/

     

    9) Identify if ipSLA directory is present

     

    9a) If yes, issue 'ls -lh ipSLA' and send result in your reply

     

     

    Thanks!

     

    Best,

     

    --Shane W. Scott

     

    60 Mansion Blvd

     

    Delmar, NY 12054

     

    (518) 378 6422

     

    Http://ShaneWilliamScott.com

  • zenorr Rank: White Belt 67 posts since
    May 6, 2010
    Currently Being Moderated
    109. Feb 3, 2011 3:38 AM (in response to Shane Scott)
    Re: New IP-SLA Enumeration/Monitoring ZenPack

    mmh, I think you sent twice the same question...

  • Shane Scott ZenossMaster 1,373 posts since
    Jul 6, 2009
    Currently Being Moderated
    110. Feb 3, 2011 3:55 AM (in response to Shane Scott)
    Re: New IP-SLA Enumeration/Monitoring ZenPack

    Zenorr:

     

    The datapoint should fail when it is manually tested. The reason for this is a consistancy issue internal to Zenoss- when datapoints are manually tested properties in each ipSLA object are not exposed at the 'here' level, but in normal datapoint collection they are. I do not know the reason for this, however, the problem does not exist in Zenoss 3.X.X.

     

    Does the datapoint collect normally and fail only during testing or does it not work ever?

     

    Has any data been collected in the rrd files? To check please change directory to one of the ipSLAs directories and issue a 'rrdtool dump [x.rrd]' where x.rrd is any rrd file in the directory. Carefully look to see if there is any real data in the output. Let me know your findings.

     

    I appologize for the confusion, I replied to your post via my email- I'd forgotten that Jive would post my email reply. Whoops! :-)

  • Shane Scott ZenossMaster 1,373 posts since
    Jul 6, 2009
    Currently Being Moderated
    111. Feb 3, 2011 4:00 AM (in response to Shane Scott)
    Re: New IP-SLA Enumeration/Monitoring ZenPack

    Also, please post your datasource.

     

    Thanks again,

     

    --Shane

  • zenorr Rank: White Belt 67 posts since
    May 6, 2010
    Currently Being Moderated
    112. Feb 3, 2011 5:08 AM (in response to Shane Scott)
    Re: New IP-SLA Enumeration/Monitoring ZenPack

    Whow, I'm amazed, you are working at 4am ?

     

    Does the datapoint collect normally and fail only during testing or does it not work ever?

     

    I think the datasource was initialy not working due to the wrong "here" path to the Collect_SLA.py script in V 2.01 (was ${here/ZenPackManager/packs/ZenPacks.zenoss.ipSLA/path} and must be ${here/ZenPackManager/packs/ZenPacks.ipSLA.SLADevice/path}).

     

    Also, please post your datasource

     

    ${here/ZenPackManager/packs/ZenPacks.ipSLA.SLADevice/path}/Collect_SLA.py  -d ${here/manageIp} -c ${here/zSnmpCommunity} -k ${here/instance}

     

    Has any data been collected in the rrd files ?

     

    By re-inserting the "${here/instance}" after the "-k", it seems it works. I will have to wait a few time to see if the graphs make sense. At least the RRD files are updated, and I see some data in them.

     

    Maybe a suggestion : the tab title in the GUI might be renamed to "SLA" instead of the full "Service Level Agreement". Will leave a bit more room to the growing tab number we shall get if more such cool Zenpacks are installed.

     

    And yet another question : how did you came to a 30s cycle time ? Is this a common-sense value ? I will soon have over 500 "ICMP checks" instances polled every 5 minutes in a router, and might need to change this cycle time for performance reasons. Do you see any obstacles ? I guess I will need to remove and recreate the RRD files.

     

    I feel a bit bad to make you work so early in the morning... don't forget your amazon wish list !

    Charles

  • zenorr Rank: White Belt 67 posts since
    May 6, 2010
    Currently Being Moderated
    113. Feb 3, 2011 9:18 AM (in response to zenorr)
    Re: New IP-SLA Enumeration/Monitoring ZenPack

    Aaarghhh, now I'm close to get crazy...

     

    All my graphs were the same, even when using ${here/instance} as key. I then tried a few things like restarting zenoss, reindex/commit, delete and reinstall the device, but now, Collect_SLA.py is never called anymore. Here is the checklist :

     

    • using "python Collect_SLA.py -d XXX -c YYY -t V" works
    • the device is in /Devices/Network/IPSLA
    • SLADevice is included in the Collector Plugin list
    • The 3 SLA templates are associated to the device
    • the Collect_SLA.py file is executable
    • after a "zencommand debug", zencommand.log shows all commands but no call to Collect_SLA.py

     

    Desperate I am...

  • Shane Scott ZenossMaster 1,373 posts since
    Jul 6, 2009
    Currently Being Moderated
    114. Feb 3, 2011 11:26 AM (in response to zenorr)
    Re: New IP-SLA Enumeration/Monitoring ZenPack

    Zenorr:

     

    First excuse if this is a double post, again I replied to the email.

     

    Lets try an experiment. Shutdown zencommand. Login to  your box, 'su zenoss', 'zencommand -v10 run' <or> shutdown  zencommand, modify its log level to 10 (debug), and start it. Do not  restart zencommand, you must actually stop it and start it., 'tail -n  100 -f /[path to zenoss]/var/zencommand.log'

    Look for Collect_SLA.py statements in the log. Specifically I'm  wondering if the number after the '-k' where ${here/instance} should  populate is changing or being assigned a '0'.

     

    The timeouts, check intervals and other variable items preset in the package were those used by a certain government client whose network is in such disrepair due to inter-unit conflict, irrational security and policy, non-sensible topology, corrupt management and polictical stagnation. The SLA system was instituted to ensure certain critical systems were up to par even when the rest of the traffic was totally out of control and to detect path problems early due to the staggering number of failure points between core and site facilities. Feel free to change them to any values which suite your needs taking consideration to adjust your zencommand cycle and timeout values as well.

     

    I pretty much  perpetually work- lot's of projects! Specifically I had to get up very  early to update some of my car computer software and update firmware on  about twenty hard to get to micro controllers. I'm usually too busy  during the day to fit my side work in, so car work usually ends up being  middle of the night :-) If your interested in that project you can find  some of the schematics at http://ShaneWilliamScott.com. I haven't posted much text detail because I've been so busy.

    Thanks!

     

    --Shane

  • Shane Scott ZenossMaster 1,373 posts since
    Jul 6, 2009
    Currently Being Moderated
    115. Feb 3, 2011 2:03 PM (in response to zenorr)
    Re: New IP-SLA Enumeration/Monitoring ZenPack

    Zenorr:

     

    Lets try an experiment. Shutdown zencommand. Login to your box, 'su zenoss',

    'zencommand -v10 run'  shutdown zencommand, modify its log level to 10

    (debug), and start it. Do not restart zencommand, you must actually stop it

    and start it., 'tail -n 100 -f /[path to zenoss]/var/zencommand.log'

     

    Look for Collect_SLA.py statements in the log. Specifically I'm wondering if

    the number after the '-k' where ${here/instance} should populate is changing

    or being assigned a '0'.

     

    I pretty much perpetually work- lot's of projects! Specifically I had to get

    up very early to update some of my car computer software and update firmware

    on about twenty hard to get to micro controllers. I'm usually too busy

    during the day to fit my side work in, so car work usually ends up being

    middle of the night If your interested in that project you can find some

    of the schematics at http://ShaneWilliamScott.com. I haven't posted much

    text detail because I've been so busy.

     

    Thanks!

     

    --Shane

  • zenorr Rank: White Belt 67 posts since
    May 6, 2010
    Currently Being Moderated
    116. Feb 3, 2011 2:15 PM (in response to Shane Scott)
    Re: New IP-SLA Enumeration/Monitoring ZenPack

    I did this :

     

    zencommand stop

    zencommand run -v10

     

    lots of output, but nothing visible. Filter :

     

    zencommand run -v10 2>&1 | grep -i sla

    zencommand run -v10 2>&1 | grep -i collect

     

    Nothing related to my SLA script being run. That's what I though, it doesn't run anymore, at all. I will try to remove the zenpack, reinstall it, reconfigure, etc.

     

    I work a lot as well, not on cars, but on fast sailboats. All carbon-stuff, as light as possible, and quite fast, see vids on http://www.youtube.com/watch?v=dpJ0SsQoRtI

  • zenorr Rank: White Belt 67 posts since
    May 6, 2010
    Currently Being Moderated
    117. Feb 3, 2011 2:54 PM (in response to zenorr)
    Re: New IP-SLA Enumeration/Monitoring ZenPack

    a complete remove and reinstall/reconfig of the Zenpack does not help, the Collect_SLA.py run fine from the command line, but never from Zenoss itself. Puzzled...

  • Shane Scott ZenossMaster 1,373 posts since
    Jul 6, 2009
    Currently Being Moderated
    118. Feb 3, 2011 3:26 PM (in response to zenorr)
    Re: New IP-SLA Enumeration/Monitoring ZenPack

    Zenorr:

     

    Can you zip your logs up and PM or email them to me? I'll get it working for you. :-)

     

    Hackman238@gmail.com

  • zenorr Rank: White Belt 67 posts since
    May 6, 2010
    Currently Being Moderated
    119. Feb 4, 2011 4:33 AM (in response to Shane Scott)
    Re: New IP-SLA Enumeration/Monitoring ZenPack

    you got my logs. I continued investigating, and Collect_SLA.py is again called by Zenoss. I think the only changes I did are :

    • remove a HTTP check from the router and remodel it
    • set the data source command to false, then true again

    I don't see why these changes would help, maybe Zenoss had market Collect_SLA.py as bad, and the false/true cycle would have reseted it ?

     

    I have now modified Collect_SLA.py to log when it is called, I get these every 30 seconds:

     

    ts : 2011-02-04 10:29:44.794238
    arg : /opt/zenoss/zenoss/ZenPacks/ZenPacks.ipSLA.SLADevice-2.0.1-py2.4.egg/ZenPacks/ipSLA/SLADevice/Collect_SLA.py
    arg : -d
    arg : 10.3.8.139
    arg : -c
    arg : YYY
    arg : -k
    arg : 1

     

    The logging code is at the top of the file :

     

    # log usage
    from datetime import datetime
    f = open('/tmp/collect_sla.log', 'a')
    f.write('ts : ' + str(datetime.now()) + '\n')
    for arg in sys.argv:
        f.write('arg : ' + arg + '\n')
    f.write('------------------------------------------\n')
    f.close

     

    Only the 2 graphs of the "Perf" section are being updated. I assume it's the call above that created/updates them.

     

    However, the graphs in the ipSLAs/ directory aren't created (the log file above never shows Collect_SLA.py being called with "-V" and friends).

     

    Charles

1 ... 5 6 7 8 9 Previous Next

More Like This

  • Retrieving data ...