One clarification: calls to the external (non-embedded) "gmetric" program are 
actually implemented as transmissions to personality #2.  That is, gmetric 
reads the gmond.conf file itself, and sends on all the udp_send_channel s.  
Gmond will collect those up into the local machine's data structures, but it's 
using the same structure for that as it does for receiving data about other 
machines.  There's no logic in gmond for dealing with the tmax/dmax or 
thresholding of this data, either, so you're responsible for sending them on an 
interval that lives up to the contract the tmax & dmax represent.

That contract's not documented in a concise fashion either, but as I understand 
it, it amounts to: you must send within the dmax or the metric goes away, and 
you should always set a non-zero dmax, so the metric does go away if your 
monitor fails; otherwise your charts will lie to you (they'll extrapolate the 
last value measured forever). Your tmax must be less than or equal to your dmax 
(unless your dmax is infinity, which is expressed as zero), and basically isn't 
used for gmetrics. I usually set my tmax to twice my sampling interval, and 
dmax to four times.

-- ReC


On 8/26/09 10:37 AM, "Ofer Inbar" <[email protected]> wrote:

Jorge Medina <[email protected]> wrote:

>     I added a UDP receiving channel on the gmond.conf file on every node of 
> the cluster.
>     On every node, my application sends UDP messages  (unicast
>     messages) with metric informatiuon to the local gmond process.
>
>     If I telnet to the gmond TCP port, I get the XML with the state
>     of the whole cluster. The local <HOST> has the additional
>     metrics published by my application.
>     Nevertheless, I don't get these additional metrics for all other nodes.
>
>     I was expecting that gmond will receive the unicast messages and
>     that these would be broadcasted to all remaining nodes in the
>     cluster.
>
>     Is my expectation wrong?

Yes, it is wrong, but this is something that comes up a lot because
it's counterintuitive and not very clear from the documentation last
time I read it (which was last year).  We naturally think of what a
gmond knows as a single collection of stuff.  In fact, each gmond has
two completely distinct "personalities"

1. the part that gathers metrics from the local host and sends them out
2. the part that listens for metrics on the network and collects them

gmond's personality #1 only "knows" local metrics, which it gets
either from its own code, python modules, or calls to gmetric.  #1
is also the only one that actively sends out what it knows to the
multicast or unicast send channels.

gmond's personality #2 is local-host-agnostic, and doesn't
automatically know anything that #1 knows (even though it's the same
process, the data is distinct).  #2 merely listens on the network,
collects all the metrics it hears about on the receive channels it is
configured for, and collects all of it.  It makes what it knows
available to others as XML via the TCP port, so you have to actively
ask it to learn what it knows (which is what gmetad does).

By sending out directly to UDP, your application is taking on role #1
for itself, and skipping its local gmond process' personality #1.
Therefore, it needs to play the role of a gmond, and send the metrics
it has out to all the places they need to go, just as gmond would.

Your solution, of doing a multicast, is one thing that'd work.

Another would be to make your application call gmetric locally,
which would hit gmond's personality #1, which would then send it out.
  -- Cos

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Ganglia-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ganglia-general

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Ganglia-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ganglia-general

Reply via email to