Archived community.zenoss.org | full text search
Skip navigation
1 2 Previous Next 223254 Views 22 Replies Latest reply: Oct 28, 2009 9:41 AM by gramik RSS
unixsamurai Rank: White Belt 42 posts since
Dec 10, 2007
Currently Being Moderated

Oct 19, 2009 1:44 PM

Graphing an actual value and not an average

We poll the number of active channels on our PRI on a Cisco 2691

 

I setup a template using snmp to get and graph the values from this OID: 1.3.6.1.4.1.9.10.19.1.1.4.0.

 

Typically I see one or 2 channels in use when I do snmpget or use mrtg to graph it.

 

I want Zenoss/RDDtool to graph the actual value returned each time it's polled, but I don't end up with whole numbers. It's not possible to use 1.23 channels out of 23 possible in use.

 

Graph Commands:

-F
-E
--height=100
--width=500
--vertical-label=Lines in Use
DEF:pri-raw=rrdPath/pri_pri.rrd:ds0:AVERAGE
CDEF:pri=pri-raw
LINE1:pri-raw#00cc00ff:pri          
GPRINT:pri-raw:LAST:cur\:%5.2lf
GPRINT:pri-raw:AVERAGE:avg\:%5.2lf
GPRINT:pri-raw:MAX:max\:%5.2lf\j
Attachments:
  • gramik Rank: White Belt 40 posts since
    Oct 29, 2008
    Currently Being Moderated
    1. Oct 19, 2009 5:10 PM (in response to unixsamurai)
    Re: Graphing an actual value and not an average
    Is your Data Source Type "DERVICE" or "COUNTER"?   Sounds like you actually want "GUAGE".  Assuming you're polling the correct OID, that should give you the number of channels in use at the exact moment the poll happens.

  • guyverix ZenossMaster 846 posts since
    Jul 10, 2007
    Currently Being Moderated
    2. Oct 19, 2009 7:43 PM (in response to gramik)
    Re: Graphing an actual value and not an average

    I suspect he is looking for the same answer as I am.  I am using gague for counting vrtual circuits associated with an ATM interface, the problem is, I cannot have 500.75 circuits up.  The return is an integer.  Since RRD is averaging X number of returns, if there is a variance I will get a non whole number.  I would like RRD to just show 501, then 500 if that was the return, and then back up to 501.

     

    Averaging is great for trending, but realtime looks at the graphs, I would more like to see real values and have it aggrigate and average the historical stuff.

     

    I THINK the problem is here in the definition:

    DEF:pri-raw=rrdPath/pri_pri.rrd:ds0:AVERAGE

    I am guessing we would want something closer to:
    DEF:pri-raw=rrdPath/pri_pri.rrd:ds0:REAL    (dont know if something like this exists)
  • guyverix ZenossMaster 846 posts since
    Jul 10, 2007
    Currently Being Moderated
    3. Oct 19, 2009 7:52 PM (in response to guyverix)
    Re: Graphing an actual value and not an average

    Grrr..  Should have looked up the data on the rrd website before posting..

     

    AVERAGE

    is the consolidation method (choose from MIN,MAX,AVERAGE,LAST)

     

    I think what we want to use is the LAST method for return values.  That should graph (I hope) correctly.

     

     

    now I just have to figure out how to do it.  heheh.

  • majikman Rank: White Belt 39 posts since
    Oct 5, 2009
    Currently Being Moderated
    4. Oct 20, 2009 6:52 AM (in response to guyverix)
    Re: Graphing an actual value and not an average
    although you want to set your data points to last, you have to also remember to set your rrd creation to use a gauge otherwise you won't be able to properly graph the datapoints. check the event.log file to make sure that when zenoss attempts to draw the graphs, it doesn't throw any rrd errors in there. let me know if you need more detailed help.
  • gramik Rank: White Belt 40 posts since
    Oct 29, 2008
    Currently Being Moderated
    5. Oct 20, 2009 10:34 AM (in response to guyverix)
    Re: Graphing an actual value and not an average

    I am certainly not an RRD expert, but I think some clarification is in order here to make sure your understanding of how it works is more accurate.  May be more info than you need, but perhaps this will help others reading this thread..

    -----

     

    Consolidation Function

    Consolidation defines the aggregation method used to turn compress a given series of data into a smaller dataset.

     

    It's important to understand, though, that when you're looking at your typical default "hourly" RRD graph, you are NOT looking at data that has been consolidated in the RRD file. When you use the GAUGE data source type, the values you see on that hourly graph should be 100% accurate.  No averaging has been done.   The default RRA parameters in Zenoss include 600 intervals of "high-resolution" (unconsolidated) data.  Assuming you are polling every 5 minutes (default), this means you should have 50 hours of unconsolidated data.  Since the default hourly graph shows 36 hours, that graph should not show any consolidated data.

     

    Now, when you use the COUNTER or DERIVE data source type, the value is calculated as the delta (or change) between the value returned from the current poll and the value returned from the previous poll.  That number (delta) is then averaged out to a per-second value based on your polling interval.  Network interface counters are a perfect example of this:

    First poll -->  device returns "11209874" as the current, at-the-moment, perpetually-increasing value for octets that have passed through the interface

    Second poll --> device returns "89762984351" as the new (current) counter value for octets that have pass through the interface

    The resulting value stored in the RRD file will be the delta of these two polls divided by the number of seconds that have passed.

    Thus, value stored will be:

       89,762,984,351 - 11,209,874  =  89,751,774,477 / 300 = 299,172,581.59 [octets-per-second]

     

    (Okay, if you multiply that number by 8 to get the number of BYTES per second, you get 2,393,380,652.72 bytes/sec.. an almost impossibly high number in reality, but you get the point... )

     

    Back to consolidation..

    The default RRA paramters for RRD files created by Zenoss are as follows, with explanation:

     

    RRA:AVERAGE:0.5:1:600
    - consolidates every 1 poll (so no consolidation)
    - keeps 600 intervals of the polls
         12 polls per hour means 50 hours of hi-res data (12/hr * 50hrs = 600)

     

    RRA:AVERAGE:0.5:6:600
    - consolidates 6 values at a time (averages last 6 polls)
    - thus, 1 value every 30 minutes (5min * 6 polls)
    - keeps 600 values
    - thus, 12.5 days worth of values (48/day * 12.5days = 600)

     

    RRA:AVERAGE:0.5:24:600
    - consolidates last 24 polls at a time
    - thus, 1 value every 2 hours (5min * 24 polls)
    - keeps 600 values
    - thus, 50 days worth of values (12/day * 50days = 600)

     

    RRA:AVERAGE:0.5:288:600
      - consolidates last 288 polls at a time
      - thus, 1 value every 24 hours (5min * 288polls / 60min/hr)
      - keeps 600 values
      - thus, 600 days worth of values

     

    So in reality each RRD file is storing 4 different "lines" of data for each data source (forgetting the MAXIMUM RRAs it is also recording..).   Each "line" of data is less precise (more consolidated) than the previous. 

    When you request a time-period of data from the RRD file, RRDtool determines the MOST ACCURATE representation of that time-period it has stored.  Thus, when you ask for the time-period between 300 days ago and 200 days ago, all of the resulting values returned from RRDtool will be from the "fourth line" of data -- that from the RRA:AVERAGE:0.5:288:600 line.  Likewise when you ask for the last 36 hours of data, you will get values from the "first line" of stored values -- that from the RRA:AVERAGE:0.5:1:600 line, which is by previous definition not consolidated.

    I don't recall how it determines what data to send when the time-period crosses "line" boundaries, but I know it is explained somewhere on the RRDtool website..

     

    -----

    Hope this makes sense.    If anyone can speak to this explanation being incorrect, PLEASE DO SO!

     

    Thanks!

  • jhelgesen Rank: White Belt 64 posts since
    Dec 10, 2007
    Currently Being Moderated
    7. Oct 20, 2009 1:52 PM (in response to unixsamurai)
    Re: Graphing an actual value and not an average

    After changing the consolidation function, you will need to rename or delete the old RRD file.  It will be re-created with the new consolidation settings.

     

    --Jay

  • majikman Rank: White Belt 39 posts since
    Oct 5, 2009
    Currently Being Moderated
    9. Oct 20, 2009 4:11 PM (in response to unixsamurai)
    Re: Graphing an actual value and not an average

    Not sure where you changed it, but there are two places you have to change it. One is in the data point. You have to change the default create cmd. This is what I have for a graph that is using LAST

     

    RRA:AVERAGE:0.5:1:600

    RRA:AVERAGE:0.5:6:600

    RRA:AVERAGE:0.5:24:600

    RRA:AVERAGE:0.5:288:600

    RRA:MAX:0.5:6:600

    RRA:MAX:0.5:24:600

    RRA:MAX:0.5:288:600

    RRA:LAST:0.5:1:600

    RRA:LAST:0.5:6:600

    RRA:LAST:0.5:24:600

    RRA:LAST:0.5:288:600

     

    The other place is in the graph definition, you have to change the graph point's consolidation function to LAST. After that, you have to delete the corresponding RRD file and it should start working in a few minutes.

  • Matt Ray Rank: Zen Master 2,484 posts since
    Apr 5, 2008
    Currently Being Moderated
    10. Oct 20, 2009 5:27 PM (in response to gramik)
    Re: Graphing an actual value and not an average

    This looks like great Wiki content, why don't you create a new document for other users to share your knowledge?

     

    Thanks!

    Matt Ray

    Zenoss Community Manager

  • gramik Rank: White Belt 40 posts since
    Oct 29, 2008
    Currently Being Moderated
    14. Oct 23, 2009 10:28 AM (in response to unixsamurai)
    Re: Graphing an actual value and not an average

    Are you 100% sure you have the Data Source Type set to GAUGE?  It really sounds like you've got it set to COUNTER or DERIVE...

    Other than that, I would check the results from a command-line "snmpget" a few times -- make sure you're getting integers from the device.

1 2 Previous Next

More Like This

  • Retrieving data ...

Legend

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