[rrd-users] How To Do A State Change Log/Graph ?
Tobias Oetiker
tobi at oetiker.ch
Wed Sep 10 08:09:04 CEST 2008
Hi Robert,
what you can do with rrdtool very well, a graph that shows you the
percentage of 'ON' state. Which is probably a better thing on the
large scale anyway.
* create a GAUGE DS
* when you see OFF, log 1
* when you see ON, log 0
Since rrdtool assumes the input to be constant betwen GAUGE
updates, it will record 100% ONn from the last ON to the current
OFF.
If you are not interested in the 'ON-ness' but more in the actual
events when OFF switched to ON, then I agree it may be best to
store this information in an sql database.
cheers
tobi
Yesterday Robert Easton wrote:
>
> Yes, that was what I was thinking. It was just that we are already using
> RRDTool within our app and it would have been great if it handled this
> scenario also. :)
>
>
>
> Joshua Keroes-2 wrote:
> >
> > rrdtool doesn't know how to write boolean values. I think SQL or
> > something custom may be more in line with your space constraints.
> >
> > On Tue, Sep 9, 2008 at 5:33 PM, Robert Easton <mark63 at azurebell.co.nz>
> > wrote:
> >>
> >> We want to see an Area Chart with the ON STATE corresponding to a y-axis
> >> value of 1 and the OFF STATE corresponding to a y-axis value of 0. As
> >> such
> >> we also want to store the data in an efficient way in RRDTool if this is
> >> possible in this scenario. Else we will have to move to logging the data
> >> in
> >> a SQL table instead and then find another graphing tool for this part of
> >> our application.
> >>
> >> We might have a series of data like this:
> >>
> >> 23May08 11:43:35 ON
> >> 23May08 11:43:39 OFF
> >> 01Jun08 12:55:03 ON
> >> 05Jul08 06:32:01 OFF
> >> 08Sep08 08:00:02 ON
> >>
> >> In reality this data could show a state change at any time. Note in the
> >> first instance, above, the state was ON for only 4 seconds. We need to
> >> see
> >> that on the graph, as a visible line, even though the graph might be
> >> displaying for six months. We need to display this graph for a defined
> >> period with each ON state change being represented by the area chart
> >> showing
> >> as 1 on the y-axis.
> >>
> >> So can we pass this data to a rrdtool and have it logged efficiently and
> >> then display the corresponding chart? I would hate to have to generate
> >> millions of values to achieve this. Four months of one second data is
> >> about
> >> 10,368,000 lines of data!
> >>
> >>
> >> Any ideas on an approach?
> >> TIA
> >>
> >> Cheers
> >> Mark
> >> --
> >> View this message in context:
> >> http://www.nabble.com/How-To-Do-A-State-Change-Log-Graph---tp19404183p19404183.html
> >> Sent from the RRDTool - User mailing list archive at Nabble.com.
> >>
> >> _______________________________________________
> >> rrd-users mailing list
> >> rrd-users at lists.oetiker.ch
> >> https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
> >>
> >
> > _______________________________________________
> > rrd-users mailing list
> > rrd-users at lists.oetiker.ch
> > https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
> >
> >
>
>
--
Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten, Switzerland
http://it.oetiker.ch tobi at oetiker.ch ++41 62 775 9902 / sb: -9900
More information about the rrd-users
mailing list