I am gathering 2 variables using SNMP - call them oid1 and oid2. I have data sources and datapoints set up for each. What I really want is to both graph and threshold on (oid1 - oid2).
I can graph this by: 1) Creating a graph definition that includes Graph Points for my Datapoints oid1 and oid2 2) Use the "Graph Custom Definition" tab to create rrd commands that evaluate oid1-oid2, draws a line for it and adds some info on the legend: > > CDEF oid3=oid1,oid2,- > LINE2:oid3#ff00ff:oidLabel > GPRINT:oid3:LAST:cur\:%5.2lf%s > GPRINT:oid3:AVERAGE:avg\:%5.2lf%s > GPRINT:oid3:MAX:max\:%5.2lf%s\j > 3) Modify the Graph Point definitions for oid1 and oid2 to set the "Line Type" to "Nor Drawn" This uses RPN (Reverse Polish Notation) to create (CDEF) oid3=oid1-oid2. The line is created in magenta (ff00ff) with a line width of 2 The 3 GPRINT lines annotate the legend with last, average and max values - incidentally the graph refused to populate if I omitted the "LAST:cur", "AVERAGE:avg" or "MAX:max" bits. This works fine. However, you can only set a threshold based on DataPoints - and I only have DataPoints for oid1 and oid2. So, I need a way to generate a DataPoint (and hence an RRD file) based on an expression of 2 SNMP OIDs - and I can't see a way to do this with an SNMP data source. I suppose I could create a command data source that runs a script that uses snmpget to get the values and to do the arithmetic and then return a value using Nagios-style format - but this seems perverse! Anyone got any better ideas? Cheers, Jane or, I need a way -------------------- m2f -------------------- Read this topic online here: http://forums.zenoss.com/viewtopic.php?p=34650#34650 -------------------- m2f -------------------- _______________________________________________ zenoss-users mailing list [email protected] http://lists.zenoss.org/mailman/listinfo/zenoss-users
