i have 5 datasources:
a, b, c, d and e.
I want create graph with 4 graphs:
- sum of a+b
- sum of c+d
- sum of above
- e
howto do it?
i can't use ALL_DATA_SOURCES_NODUPS nor ALL_DATA_SOURCES because it sums all DS - i can't sum only a+b etc.
I created 3 new CDEFs - which sum a+b, c+d and all.
It works, but - last read is very often 0 on graphs.
I look howto ALL_DATA_SOURCES works - it it's somethinkg like:
TIME,1215293369,GT,a,a,UN,0,a,IF,IF
- current time - 300 seconds is compared with time of last read, and it return 0 or UN.
I think it should help with my 0 on graph. But how create my own CDEF with current time?
Thanks for any suggestions
time in own cdefs - sum of some ds
Moderators: Developers, Moderators
- gandalf
- Developer
- Posts: 22383
- Joined: Thu Dec 02, 2004 2:46 am
- Location: Muenster, Germany
- Contact:
Re: time in own cdefs - sum of some ds
So I assume, that a,b do NOT refer to a SIMILAR_DATA_SOURCE (e.g. both refer to traffic_in)?undefine wrote:i have 5 datasources:
a, b, c, d and e.
I want create graph with 4 graphs:
- sum of a+b
- sum of c+d
- sum of above
- e
howto do it?
i can't use ALL_DATA_SOURCES_NODUPS nor ALL_DATA_SOURCES because it sums all DS - i can't sum only a+b etc.
There's been some hazzle around this for a while. RRDTOOL seems to change this behaviour every now and then. At least, lately there was a discussion about it in the rrdtool mailing lists. So this might be called an rrdtool bug with a workaround like the above.I created 3 new CDEFs - which sum a+b, c+d and all.
It works, but - last read is very often 0 on graphs.
I look howto ALL_DATA_SOURCES works - it it's somethinkg like:
TIME,1215293369,GT,a,a,UN,0,a,IF,IF
- current time - 300 seconds is compared with time of last read, and it return 0 or UN.
I think it should help with my 0 on graph. But how create my own CDEF with current time?
The times are taken from php code; there's no explicit interface to it. You may use RRDTOOL TIME pseudo-variable, but I fear this won't help
Reinhard
Re: time in own cdefs - sum of some ds
no, all of them are different types. (and it's just example - "real" graph is much more complex)gandalf wrote:So I assume, that a,b do NOT refer to a SIMILAR_DATA_SOURCE (e.g. both refer to traffic_in)?undefine wrote:i have 5 datasources:
a, b, c, d and e.
I want create graph with 4 graphs:
- sum of a+b
- sum of c+d
- sum of above
- e
howto do it?
i can't use ALL_DATA_SOURCES_NODUPS nor ALL_DATA_SOURCES because it sums all DS - i can't sum only a+b etc.
TIME didn't help me, because it's only time of last read - and i didn't have current time to compare with it.There's been some hazzle around this for a while. RRDTOOL seems to change this behaviour every now and then. At least, lately there was a discussion about it in the rrdtool mailing lists. So this might be called an rrdtool bug with a workaround like the above.I created 3 new CDEFs - which sum a+b, c+d and all.
It works, but - last read is very often 0 on graphs.
I look howto ALL_DATA_SOURCES works - it it's somethinkg like:
TIME,1215293369,GT,a,a,UN,0,a,IF,IF
- current time - 300 seconds is compared with time of last read, and it return 0 or UN.
I think it should help with my 0 on graph. But how create my own CDEF with current time?
The times are taken from php code; there's no explicit interface to it. You may use RRDTOOL TIME pseudo-variable, but I fear this won't help
Reinhard
I found how this contruction is created but i wonder why current time and "$seconds_between_graph_updates" isn't available just like yet another special data source to compare with TIME (time of last read).
- gandalf
- Developer
- Posts: 22383
- Joined: Thu Dec 02, 2004 2:46 am
- Location: Muenster, Germany
- Contact:
Re: time in own cdefs - sum of some ds
Perhaps because no one asked for it? A feature request?undefine wrote:...but i wonder why current time and "$seconds_between_graph_updates" isn't available just like yet another special data source to compare with TIME (time of last read).
But again, if it is "only" to work around an rrdtool "error", I wonder if we should do so
Reinhard
Last edited by gandalf on Mon Jul 07, 2008 2:48 am, edited 1 time in total.
Re: time in own cdefs - sum of some ds
good point i though that cacti already have such feature. Now i reported feature request: http://bugs.cacti.net/view.php?id=1275gandalf wrote:Perhaps because on one asked for it? A feature request?undefine wrote:...but i wonder why current time and "$seconds_between_graph_updates" isn't available just like yet another special data source to compare with TIME (time of last read).
i think current time can have a little more application, for example to show only "last" part of graph and don't show any historicial datas.But again, if it is "only" to work around an rrdtool "error", I wonder if we should do so
Reinhard
Who is online
Users browsing this forum: No registered users and 0 guests