Archived community.zenoss.org | full text search
Skip navigation
4388 Views 5 Replies Latest reply: Nov 17, 2011 11:19 AM by Shane Scott RSS
kelvinlo Rank: White Belt 22 posts since
Apr 19, 2010
Currently Being Moderated

Sep 7, 2011 8:40 AM

Create a Threshold with variable on Maxium Value

Hi All,

 

I have saw there is some Threshold like filesystem (eg: here.getTotalBlocks() * .9) can use some variable setup so we can get the dynamic maxium value so I can suitable for each different server. Can I do it with some special template?

 

I am actauly using a Juniper Template and I want to setup the different firewall device having alert while hit the session limit to 90%, and I have the OID value from "nsResSessMaium" and "nsResSessAllocate" how I can call those vaiable from to Thresholds?

 

Kelvin Lo

  • jcurry ZenossMaster 1,021 posts since
    Apr 15, 2008
    Currently Being Moderated
    1. Sep 7, 2011 9:15 AM (in response to kelvinlo)
    Re: Create a Threshold with variable on Maxium Value

    As you have discovered in the filesystem threshold, you can create thresholds built out of expressions - the ".9" in the threshold one is setting the threshold at 90% of the objects getTotalBlocks value.  If you wanted 95% as the max then you change the .9 to .95 - etc.  If that threshold is good for many devices then you could create a device subclass, copy your standard template to that subclass and then modify the threshold as you wish.

     

    If you want a different threshold for almost every device then look at the Predictive Threshold ZenPack.  With that, you can set dynamic thresholds for any box based on its own data.  You get to specify parameters like average values to use and the number of standard deviations that are acceptable before you reach your threshold - it uses Holt-Winters algorithms to work out the thresholds.  If you are using Zenoss 3.x go here docs/DOC-10293 to get the ZenPack that is compatibe.

     

    Cheers,

    Jane

  • jmp242 ZenossMaster 4,060 posts since
    Mar 7, 2007
    Currently Being Moderated
    2. Sep 7, 2011 9:15 AM (in response to kelvinlo)
    Re: Create a Threshold with variable on Maxium Value

    It should work the same. You go into devices and create a cproperty you reference (the cProperty is actually the variable name you'd use) and then you set the cProperty for the device class as an appropriate default, then change it for devices you want to be different.

     

    --

    James Pulver

    Information Technology Area Supervisor

    LEPP Computer Group

    Cornell University

  • bjoljo Newbie 2 posts since
    Aug 26, 2010
    Currently Being Moderated
    4. Nov 17, 2011 10:43 AM (in response to kelvinlo)
    Re: Create a Threshold with variable on Maxium Value

    Maybe you have found a working soloution, I just though that I would share how I solved a similar problem.

    <disclaimer> I still use Zenoss 2.5.2 </disclaimer>.

     

    I have a couple of small firewalls that have different licenses regading the number of allowed hosts behind the them. The number of active hosts and the license value of the firewall is availiable through snmp.

     

    I created two data sources. One that polled the number of active hosts and another that polled the license value.

    I then created a threshold on the datapoint "active hosts" with the following max value:

    here.getRRDValue('MaxAllowedHosts') * .8

     

    MaxAllowedHosts is the data point of my data source that polled the license value.

     

    In the graph I added the data point showing "number of active hosts" and the threshold showing 80% of the license value.

     

    This might not be the ultimate soloution for you but it works for me

     

    Regards

    Björn

  • Shane Scott ZenossMaster 1,373 posts since
    Jul 6, 2009
    Currently Being Moderated
    5. Nov 17, 2011 11:19 AM (in response to bjoljo)
    Re: Create a Threshold with variable on Maxium Value

    kevinlo:

     

    I would not use getRRDValue in these fields. It puts pressure on Zenhub which can already be a bottleneck at times. What I would suggest is to write a modeler which fetches the value you're looking to correlate with and populate a custom property, zPropery or cProperty, and read that value in to the threshold in a tales expression.

     

    This is a much more scalable solution.

     

    Best,

    --Shane (Hackman238)

More Like This

  • Retrieving data ...

Legend

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