Help required to create a custom CDEF.
Moderators: Developers, Moderators
Help required to create a custom CDEF.
I would like to create a CDEF to subtract the last data integer collected by Cacti from the current data integer and graph the difference. Can someone please help as I have read the CDEF tutorial but it is not clear on how to do this or even if this is possible using CDEF's.
Thanks in advance.
Thanks in advance.
- gandalf
- Developer
- Posts: 22383
- Joined: Thu Dec 02, 2004 2:46 am
- Location: Muenster, Germany
- Contact:
This kind of calculation is done automatically when applying COUNTER or DERIVE as the data source type. You may even try PREV, see http://oss.oetiker.ch/rrdtool/doc/rrdgraph_rpn.en.html
Reinhard
Reinhard
Hi thanks very much for getting back to me, this is very helpful. I have another query regarding Cacti and CDEF's and wonder if you can help me. I am trying to create a graph to calculate total IP Sec usage across a Cisco Pix and need to calculate a sum of (IPSecOctetsIn*8*100)/(Uptime*ifSpeed). I have tried to get a CDEF SUM that is a*8*100/b*c but it does not seem to work because I have to graph a=IPSecOctetsIn, b=Uptime and c=ifSpeed instead of just the output of the calculation.
Can you please point me in the right direction?
Thanks
Can you please point me in the right direction?
Thanks
- gandalf
- Developer
- Posts: 22383
- Joined: Thu Dec 02, 2004 2:46 am
- Location: Muenster, Germany
- Contact:
Sorry, but I have a major problem with your statement. You formulae obviously does not describe a SUM. Do you want to perform the maths above for each interface and sum each of those results? Is the (Uptime*ifSpeed) meant to build sth like a "maximum possible transfer amount"? Why don't you stick to intervals, e.g. build a relation between the "IPSecOctetsIn of last polling interval" and "interface speed"?stu_77 wrote:...need to calculate a sum of (IPSecOctetsIn*8*100)/(Uptime*ifSpeed)
Reinhard
- gandalf
- Developer
- Posts: 22383
- Joined: Thu Dec 02, 2004 2:46 am
- Location: Muenster, Germany
- Contact:
Ok. "Delta of ipsecInOctets with respect to polling interval" will already be built by rrdtool when using COUNTER as a data source type. This covers with lots of possible inaccuracies, refer to http://www.rrdtool.org
|query_ifSpeed| is a cacti pseudo-variable holding the ifSpeed of the current interface (with respect to the last re-indexing, so be careful to change indices without reboot ...). So your CDEF may look like
CDEF=CURRENT_DATA_SOURCE,8,100,*,*,|query_ifSpeed|,/
or
CDEF=CURRENT_DATA_SOURCE,800,*,|query_ifSpeed|,/
Reinhard
|query_ifSpeed| is a cacti pseudo-variable holding the ifSpeed of the current interface (with respect to the last re-indexing, so be careful to change indices without reboot ...). So your CDEF may look like
CDEF=CURRENT_DATA_SOURCE,8,100,*,*,|query_ifSpeed|,/
or
CDEF=CURRENT_DATA_SOURCE,800,*,|query_ifSpeed|,/
Reinhard
Thanks for this it helps a great deal and I will have a play.
I have another question regarding cacti. I am currently trying to migrate cacti from one server to another the only difference being that the second cacti server is running mysql-4.1 and the cactid-0.8.6g. Both are this is on a RH9 platform using cacti-0.8.6h but I can not get the fresh install minimal install on the new server to accept any cacti templates. Every time I try and upload I get the dreaded "XML Parse Error" I have check the php.ini and uploads are allowed. I have also compared the php builds on both servers and they are the same. Everything else is working fine with this new build.
Can you please help as I ready to through myself out the window.
I have another question regarding cacti. I am currently trying to migrate cacti from one server to another the only difference being that the second cacti server is running mysql-4.1 and the cactid-0.8.6g. Both are this is on a RH9 platform using cacti-0.8.6h but I can not get the fresh install minimal install on the new server to accept any cacti templates. Every time I try and upload I get the dreaded "XML Parse Error" I have check the php.ini and uploads are allowed. I have also compared the php builds on both servers and they are the same. Everything else is working fine with this new build.
Can you please help as I ready to through myself out the window.
-
- Posts: 2
- Joined: Tue Oct 10, 2006 8:55 am
Re: Help required to create a custom CDEF.
Hi!
I've got the same problem like stu_77!
I hope you can help me.
Thank you!
I've got the same problem like stu_77!
stu_77 wrote:I would like to create a CDEF to subtract the last data integer collected by Cacti from the current data integer and graph the difference. Can someone please help as I have read the CDEF tutorial but it is not clear on how to do this or even if this is possible using CDEF's.
Thanks in advance.
I switched the data source type to COUNTER, but I still have get shown the current value and no substraction.lvm wrote:This kind of calculation is done automatically when applying COUNTER or DERIVE as the data source type. You may even try PREV, see http://oss.oetiker.ch/rrdtool/doc/rrdgraph_rpn.en.html
Reinhard
I hope you can help me.
Thank you!
Who is online
Users browsing this forum: No registered users and 1 guest