Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Tue Jul 16, 2019 3:42 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Multiply Values in Graph?
PostPosted: Fri Feb 08, 2019 3:54 am 
Offline

Joined: Fri Feb 08, 2019 3:49 am
Posts: 1
Hi all,
I'm new to write templates for cacti.
I'm wondering if it is possible to multiply different values in a graph template.
E.g. I have a sensor-reading for voltage and a sensor-reading for current and want to multiply them to get the power.
Thanks for any help,
Frank


Top
 Profile  
 
 Post subject: Re: Multiply Values in Graph?
PostPosted: Sun Feb 10, 2019 2:44 pm 
Offline
Cacti Pro User
User avatar

Joined: Mon Jan 05, 2015 10:10 am
Posts: 778
Yes, learn how to use a cdef.

_________________
Before history, there was a paradise, now dust.


Top
 Profile  
 
 Post subject: Re: Multiply Values in Graph?
PostPosted: Fri Mar 01, 2019 6:14 pm 
Offline
Cacti Guru User

Joined: Sun Aug 27, 2017 12:05 am
Posts: 2585
Yes, Osiris is technically correct, you should look at CDEF's.

The longer version of that answer requires a bit of learning on your part which you can by looking at the interface graph templates for Bytes you'll see the items use a CDEF to convert the values. When you have multiple values in a single datasource, they will show as different DEF's on the Graph Debug (usually first data source is normally a, the second b etc)

see also the docs : https://github.com/Cacti/documentation/ ... through.md

_________________
Official Cacti Developer

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation

My resources:
How to submit Pull Requests
Development Wiki and How To's
Updated NetSNMP Memory template for Cacti 1.x
Cisco SFP template for Cacti 0.8.8


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group