Re: Combining Multiple Datasources

"Marc Powell" <[email protected]> Wed, 13 Feb 2008 13:45:51 -0600
Newsgroups gmane.network.cricket.user
Message-ID <[email protected]>

> -----Original Message-----
> From: [email protected]
[mailto:cricket-users-
> [email protected]] On Behalf Of Roberto Ullfig
> Sent: Wednesday, February 13, 2008 1:29 PM
> To: [email protected]
> Subject: Re: [cricket-users] Combining Multiple Datasources
> 
> Roberto Ullfig wrote:
> > Marc Powell wrote:
> >
> >>
> >>
> >>> -----Original Message-----
> >>> From: [email protected]
> >>>
> >>>
> >> [mailto:cricket-users-
> >>
> >>
> >>> [email protected]] On Behalf Of Roberto Ullfig
> >>> Sent: Wednesday, February 13, 2008 11:24 AM
> >>> To: [email protected]
> >>> Subject: [cricket-users] Combining Multiple Datasources
> >>>
> >>> I've been looking at this for a while and still don't understand
> >>>
> >>>
> >> things
> >>
> >>
> >>> - I'm missing some basic cricket knowledge here. I want to SUM
four of
> >>> the data sources listed below into one graph. Can someone please
> >>>
> >>>
> >> assist?
> >>
> >>
> >>> I already have two working graphs:
> >>>
> >>>
> >> Here's an example from my system. My targettype of mr-messages
> >> corresponds to your in.email.received. The mtargets are the paths
to
> >> targets I wish to sum. This is a graphing-only target. No data
> >> collection is occurring for it specifically.
> >>
> >> target all-mr-mailrelays-messages
> >>         unknown-is-zero = true
> >>         short-desc      = "Combined spam statistics for all spam
> >> scanning machines"
> >>         show-avg-max    = true;
> >>         show-max        = true;
> >>         mtargets        =
> >> "/mailstats/mail-relays/mr-mailrelay1-messages;
> >>
> >> /mailstats/mail-relays/mr-mailrelay2-messages;
> >>
> >> /mailstats/mail-relays/mr-mailrelay3-messages;
> >>
> >> /mailstats/mail-relays/mr-mailrelay4-messages;
> >>                            /mailstats/mail-relays/mr-mta1-messages;
> >>                            /mailstats/mail-relays/mr-mta2-messages;
> >>                            /mailstats/mail-relays/mr-mta3-messages;
> >>                            /mailstats/mail-relays/mr-mta4-messages;
> >>                            /mailstats/mail-relays/mr-mta5-messages;
> >>
/mailstats/mail-relays/mr-imap04-messages"
> >>         mtargets-ops    = "sum()"
> >>         target-type     = mr-messages
> >>         display-name    = "Combined Spam Statistics"
> >>
> >> HTH.
> >>
> >> --
> >> Marc
> >>
> >>
> >>
> > How does yours graph anything? Don't you need a "graph" operative?

That's all it does. It looks at the rrd files for the mr-* targets, sums
them, then graphs.

> Doesn't work. In your example Marc you're using mtargets. The docs say
> that each target in the mtargets must have the same target type but
how
> can that be? Each target type lists a particular data source and if
the
> target type is the same then the data sources are all the same - how
can
> you sum different data sources with this?

You can't and you weren't clear that's what you wanted to do. Your data
sources must be of the same target type. Perhaps this helps clarify the
above --

targetType mr-messages
        ds = "mr-total-email, mr-spam_email_rejected, mr-spamhaus_rbl,
mr-sa_deleted, mr-ena_rbl, mr-misc_rejects, mr-total_spam,
mr-total_deliver
ed, mr-real_mail, mr-sa_marked_delivered"
        view = "Incoming v.s. Spam v.s. Real Email, Rejected Email,
Delivered Email, ISR Thumbnails"

target mr-mailrelay1-messages
   server               = <redacted>
   target-type          = mr-messages
   directory-desc       = "Mailrelay 1 - Spam"
   display-name         = "Mailrelay 1 - Spam"
        show-avg-max    = true;

target mr-mailrelay2-messages
   server               = <redacted>
   target-type          = mr-messages
   directory-desc       = "Mailrelay 2 - Spam"
   display-name         = "Mailrelay 2 - Spam"
        show-avg-max    = true;

If you want to sum different target types then you must do that at
collection time as far as I know. Create a new datasource that grabs the
data and performs that calculation (i.e. EXEC), then stuffs it into a ds
that you can graph later.

--
Marc


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/