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

Reply via email to