Problems? Is your data what you think it is? | |
PerlMonks |
How to create a COMPUTE data source in RRDTool::OOby bronto (Priest) |
on Nov 22, 2010 at 14:59 UTC ( [id://872980]=note: print w/replies, xml ) | Need Help?? |
OK, I found out that there is not a way to create a COMPUTE resource out of the box in RRDTool::OO, but it is possible to workaround this lack of functionality by using the dry run mode. Here is how.
First, you need to create an RRDTool::OO object in dry run mode. Then you prepare all the "standard" data sources in the usual way, and call create. It won't actually execute the call, but now you can retrieve a reference to the function that it would have called, along with a reference to the function arguments. You can now fiddle with the arguments and call the function when you are ready. This is how I did it:
Ciao! In theory, there is no difference between theory and practice. In practice, there is.
In Section
Seekers of Perl Wisdom
|
|