Plotting them together should be easy enough; each data series has its own timeline.
However, I do see a problem if you want to do arithmetics (like adding two data sources together). Will try to improve it in the next release.
What about using the time (rounded to RRA step) as the index (instead of the current internal index)?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I have a problem with the rrdMatrixFlot class. When I use it to display two or three RRDs the result is the sum of all.
Do you have a tip or a kind of solution for this ?
Thx for your work !
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I think I don't understand the result of the class … In the example, when all rrds are checked they are all added one above the other. Am I wrong ?
I would like to display all my rrds on the same draw but in keeping good scales. Can I do this with the rrdMatrixFlot ?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This is an old thread, but I just ran into the same issue. If you're saying that rrdMatrixFlot can only sum the data given, then it isn't useful to me at all.
Is there some other way to display multiple DSes, from multiple RRD files on one graph? RRDtool itself can do this just fine.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I was looking at that first, but from what I could figure out from the docs and the code, that only works if each RRD file contains a DS of the same name. Mine have different DS names, and so making a rrdMultiFile won't work.
Please correct me if this is not the case.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Also, I just noticed that the rrdMultiFile doc says specifically "summed up" - as I said, I do not want to sum anything here.
If knowing what I'm trying to actuall do helps, I'm trying to display the output of four temperature sensors (which live in seperate RRD files) on the same graph. Right now, this does not seem to be possible with this library.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Well, as I said, a lot of things are possible, it may just be more complex ;)
And this one does not seem too bad, actually.
So, what you want to do is:
For each RRDFile object, create a RRDFilterOp object that has the all 4 DS's, with the one existing in the original RRD populated with real values, and the other 3 set to 0.
Then sum them up with RRDFileSum.
Now you have a single logical RRD object containing all 4 DS's from the 4 RRDs.
Igor
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Okay, I see what you're saying, but I'm not sure how to do this. The sum, no problem, that's clear.
However, my attempts to create this filter are failing. You provide examples for the "the one existing in the original RRD populated with real values" (as the DoNothing() class), but I'm not seeing how to use this and a "return only zero" class that I've made, to do the RRDFilterOp as you suggest.
The documentation on this is a bit unclear as to what RRDFilterOp() is expecting its argument list to be, and what it returns.
(also it seems to be incorrect - the DoNothing class refers to 'ds1_name' which isn't defined therein, and the RRDFilterOp() call has one 'new' for DoNothing() as the first argument, but not any other uses of 'new'. What is this implying?)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The DoNothing not what you want to use; it just copies over an existing DS.
What you want is something like
function Zero(ds_name) { //create a fake DS.
this.getName = function() {return ds_name;}
this.getDSNames = function() {return ;}
this.computeResult = function(val_list) {return 0;}
}
Hi.
I was looking at the available classes on 0.3, but, cannot find a good way to combine two RRDs.
Any suggestion?
Depends what you need.
Plotting them together should be easy enough; each data series has its own timeline.
However, I do see a problem if you want to do arithmetics (like adding two data sources together). Will try to improve it in the next release.
What about using the time (rounded to RRA step) as the index (instead of the current internal index)?
Added (in the head) to rrdFlotSupport classes the option to round timestamps to the closest step.
This should help to compare different RRDs, as long as they use the same step.
Uhm, this is nice, but does not really solve the problem.
The output is a list, not a dictionary.
So it is far from trivial to do match on the elements.
I have added rrdMatrixFlot class.
This class allows for plotting of a set of similar RRDs (like subsets of a problem).
Not exactly the replacement of rrdtoll graph, but should cover many use cases.
Hi,
I have a problem with the rrdMatrixFlot class. When I use it to display two or three RRDs the result is the sum of all.
Do you have a tip or a kind of solution for this ?
Thx for your work !
Uhm… not sure what exactly is your problem.
That class is meant to sum up the RRDS, as shown in
http://javascriptrrd.sourceforge.net/docs/javascriptrrd_v0.5.0/src/examples/rrdMatrixFlot.html
Can you please provide more detail?
Thanks,
Igor
I think I don't understand the result of the class … In the example, when all rrds are checked they are all added one above the other. Am I wrong ?
I would like to display all my rrds on the same draw but in keeping good scales. Can I do this with the rrdMatrixFlot ?
This is an old thread, but I just ran into the same issue. If you're saying that rrdMatrixFlot can only sum the data given, then it isn't useful to me at all.
Is there some other way to display multiple DSes, from multiple RRD files on one graph? RRDtool itself can do this just fine.
First, yes, the javascriptRRD is not as easy to use as rrdtool graph.
I have no problems admitting that.
Said that, you should be able to do pretty much the same things, it may just be a bit more work.
rrdMatrixFlot is meant to display a single DS from multiple RRDs. It is not "just summing them up".
What you want, is probably the rrdMultiFile class.
See:
http://javascriptrrd.sourceforge.net/docs/javascriptrrd_v0.6.0/doc/lib/rrdMultiFile_js.html
Hope this helps.
Igor
I was looking at that first, but from what I could figure out from the docs and the code, that only works if each RRD file contains a DS of the same name. Mine have different DS names, and so making a rrdMultiFile won't work.
Please correct me if this is not the case.
Also, I just noticed that the rrdMultiFile doc says specifically "summed up" - as I said, I do not want to sum anything here.
If knowing what I'm trying to actuall do helps, I'm trying to display the output of four temperature sensors (which live in seperate RRD files) on the same graph. Right now, this does not seem to be possible with this library.
I see.
Well, as I said, a lot of things are possible, it may just be more complex ;)
And this one does not seem too bad, actually.
So, what you want to do is:
For each RRDFile object, create a RRDFilterOp object that has the all 4 DS's, with the one existing in the original RRD populated with real values, and the other 3 set to 0.
Then sum them up with RRDFileSum.
Now you have a single logical RRD object containing all 4 DS's from the 4 RRDs.
Igor
Okay, I see what you're saying, but I'm not sure how to do this. The sum, no problem, that's clear.
However, my attempts to create this filter are failing. You provide examples for the "the one existing in the original RRD populated with real values" (as the DoNothing() class), but I'm not seeing how to use this and a "return only zero" class that I've made, to do the RRDFilterOp as you suggest.
The documentation on this is a bit unclear as to what RRDFilterOp() is expecting its argument list to be, and what it returns.
(also it seems to be incorrect - the DoNothing class refers to 'ds1_name' which isn't defined therein, and the RRDFilterOp() call has one 'new' for DoNothing() as the first argument, but not any other uses of 'new'. What is this implying?)
The DoNothing not what you want to use; it just copies over an existing DS.
What you want is something like
function Zero(ds_name) { //create a fake DS.
this.getName = function() {return ds_name;}
this.getDSNames = function() {return ;}
this.computeResult = function(val_list) {return 0;}
}
On how to use the filters in general, see this example:
http://javascriptrrd.sourceforge.net/docs/javascriptrrd_v0.6.0/src/examples/rrdJFlotFilter.html
Igor
Ah! The thing I missed is the return of getDSNames() should be an empty list, I had everything else in my Zero() class.
I was reading the filters example, but this tiny part wasn't very clear. Thanks!
I am also interested in teh result displaying 1 DS in multiple RRDs.
Either use rrdMatrixFlot, or do as suggested above, renaming the DS's in the process.
Igor