Darien,

The custom graphs don't show the threshold in the graph but thesholding does work (we use this on filesystem thresholds). The summary addition is now an option in the trunk. No ideas on why thresholding isn't actually working.

-EAD

On Oct 12, 2006, at 11:41 AM, Darien Sharif wrote:

Folks,

I think this is where the logic problem lies within

/usr/local/zenoss/Products/ZenModel/RRDGraph.py

--
def graphOpts(self, context, rrdfile, template):
        """build the graph opts for a single rrdfile"""
        gopts = self.graphsetup()
        if self.custom:
            gopts = self.buildCustomDS(gopts, rrdfile)
            res = talesEval("string:"+self.custom, context)
            gopts.extend(res.split("\n"))
            gopts = self.addSummary(gopts)
        else:
gopts = self.buildDS(gopts, rrdfile, template, self.summary)
            gopts = self.thresholds(gopts, context, template)
        return gopts
--

IF custom graph THEN
        Build graph
        Add summary at the end
ELSE
        Build graph
        Add threshold
END

If I am correct then the above logic does not allow thresholds to be set
for custom graphs and when building custom graphs it has this anoying
summary at the end.

MY SOLUTION

Comment out the summary and add thresholds.

def graphOpts(self, context, rrdfile, template):
        """build the graph opts for a single rrdfile"""
        gopts = self.graphsetup()
        if self.custom:
            gopts = self.buildCustomDS(gopts, rrdfile)
            res = talesEval("string:"+self.custom, context)
            gopts.extend(res.split("\n"))
#            gopts = self.addSummary(gopts)
            gopts = self.thresholds(gopts, context, template)
        else:
gopts = self.buildDS(gopts, rrdfile, template, self.summary)
            gopts = self.thresholds(gopts, context, template)
        return gopts

//D


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Jared Meeker
Sent: Thursday, October 12, 2006 7:57 AM
To: General discussion of using zenoss system
Subject: RE: [zenoss-users] Custom thresholds problem

I've read the documentation on thresholds and understand how the Disk
Utilization works. However, all I'm doing is comparing my max with the
polled value.  The source is a custom snmp script on the client which
returns the size of the mail queue.  It ranges from zero to thousands
depending on the state of the server and the mail load. All I'm trying
to do is get an email if it goes over 5000.  The graph's scale is 0 to
20k and the RRD file is recording values like 1.1406796517e+04,
5.8250000000e+03, 1.7240000000e+0, 0.0000000000e+00 and NaN.  I'm
looking into why I don't get a valid value sometimes.  My min on the
threshold is empty and my max is 5000.  It is enabled and is indicated
on the perf graph.  I'm running 0.22.4 if that helps at all.

If I'm not specifying the max in the proper format, please let me know.
But from what I've read, this should work.

Thanks for the assistance.

- Jared



-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Eric Newton
Sent: Wednesday, October 11, 2006 5:04 PM
To: General discussion of using zenoss system
Subject: Re: [zenoss-users] Custom thresholds problem

Hi Jared,

Custom thresholds are very tricky.

The RRD graphs can be coerced into producing nice human-readable values like percentages. For example, the Disk Utilization graph that is part
of the default /Device/Server/FileSystem performance statistics does
this.  But ultimately, the number collected for this metric is
usedBlocks, and that is what the threshold needs to be against.  Of
course Zenoss can provide some context, like the total number of blocks
available, but the value measured on the device "usedBlocks".

I recommend you take a look at the custom threshold on Disk Utilization
to see how to construct such a threshold.

-Eric

Jared Meeker wrote:
Eric,

Thanks for the previous patch.  It fixed the minimum value problem
with our thresholds.  I've found another bug, but I'm not sure where
it is.
I now have a custom rrd datasource and a corresponding graph which
both work perfectly.  However, I have been unsuccessful in getting a
threshold to work.  I have tried setting the min, max and both at the
same time.  There aren't any errors in the web gui, but an event is
never generated.  I've turned on verbosity (-v 10) on all of the
daemons, but there aren't any errors in the any of the logs indicating

any sort of error.  I'm not sure why this is causing me so much grief
since I've setup other thresholds which work perfectly. I've tried to

delete and re-create the threshold, graph, and the rrd source (all
with different names too), but nothing has worked.


Thanks.

Jared Meeker


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Eric Newton
Sent: Friday, October 06, 2006 1:29 PM
To: General discussion of using zenoss system
Subject: Re: [zenoss-users] Custom thresholds problem

Hey Jared,

That error message *is* pretty ugly.  I've improved it somewhat:

    lappytop test threshold of 3500000 exceeded: current value
3682304.00
    lappytop test threshold restored current value: 3158016.00
    lappytop test threshold of 3000000 not met: current value
2629632.00

The following change to the 0.22 branch fixes the check against
minimum
thresholds:

    http://dev.zenoss.org/trac/changeset/2542

-Eric

Jared Meeker wrote:

Has anyone else had a problem with custom thresholds working?  I've

been successful with creating them and having the lines show upon the
graphs, however, I have run into two problems.


1.  Thresholds with only a min defined never generate events (no
event



in the app or via email) 2.  Thresholds with a min AND a max defined

generate events for both cases, but if the polled value is less than
the min, then the message looks something like this (min=9, max=11):

        "[servername] [threshold name] threshold of 2 exceeded:

current value 10.00"


Also, thresholds with only a max defined work as expected.


Thanks in advance.

- Jared





_______________________________________________
zenoss-users mailing list
[email protected]
http://lists.zenoss.org/mailman/listinfo/zenoss-users
_______________________________________________
zenoss-users mailing list
[email protected]
http://lists.zenoss.org/mailman/listinfo/zenoss-users



_______________________________________________
zenoss-users mailing list
[email protected]
http://lists.zenoss.org/mailman/listinfo/zenoss-users
_______________________________________________
zenoss-users mailing list
[email protected]
http://lists.zenoss.org/mailman/listinfo/zenoss-users
_______________________________________________
zenoss-users mailing list
[email protected]
http://lists.zenoss.org/mailman/listinfo/zenoss-users

_______________________________________________
zenoss-users mailing list
[email protected]
http://lists.zenoss.org/mailman/listinfo/zenoss-users

Reply via email to