RE: Summing values from database

"Edmonds, Alan" <[email protected]>
Newsgroups gmane.network.cricket.user
Message-ID <CA82669882D4A14EA98E013430F5A4E34B74F4@tmexbridge.hammersmith.t-motion.co.uk>
You could do it with a COMPUTE datasource.  You 
might also accomplish what you want with a STACKED
graph type.  You could stack Active on top of IDLE
(or vice versa) and that would should show a total.

Alan

-----Original Message-----
From: [email protected]
[mailto:[email protected]]On Behalf Of Stephen
Carville
Sent: 19 May 2006 06:12
To: Cricket List
Subject: [cricket-users] Summing values from database


I have a process that sample about 16 status variables related to 
database connectivity and stores them in the rrd.  For example I have 
track the active and idle connections to two different databases.  What 
I'd like to do is add active to idle to make total and then display 
total and active on the same graph.  Something like:

datasource  flood-active
     ds-source   =   "exec:0:%home-dir%/bin/tomcat-db-conn.pl %server% 
'%tomcat-url%'"
     desc        =   "Active Connections to FLOOD."
     rrd-ds-type     =   GAUGE

datasource  flood-idle
     ds-source   =   "exec:1:%home-dir%/bin/tomcat-db-conn.pl %server% 
'%tomcat-url%'"
     desc        =   "Idle Connections to FLOOD."
     rrd-ds-type     =   GAUGE

datasource flood-max
     ds-source   =   "exec:2:%home-dir%/bin/tomcat-db-conn.pl %server% 
'%tomcat-url%'"
     rrd-ds-type = GAUGE

datasource flood-min
     ds-source   =   "exec:3:%home-dir%/bin/tomcat-db-conn.pl %server% 
'%tomcat-url%'"
     rrd-ds-type = GAUGE

datasource flood-total
     ds-source = "flood-idle, flood-active, +"

It seems that it should be straightforward but I cannot figure it out. 
mtargets looked promising but it seems to only allow for one combined 
value per graph.

-- 
Stephen Carville <[email protected]>
Unix and Network Admin
Nationwide Totalflood
6033 W. Century Blvd
Los Angeles, CA 90045
310-342-3602


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
cricket-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cricket-users


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.