Doug Nordwall wrote:
I'm attempting to use the rack view in the new ganglia, and I do not
want to be forced to custom write out a gmond.conf for every node in the
cluster. Currently, the location variable is gathered from there, and I
don't appear to be able to override it with gmetric. I have a script
that will get the rank/rack/plane in the right format...so how might I
get it in there?
Well there's a couple options for this - I'm in the same boat, by the way,
once the number gets to over a hundred nodes, generating custom config
files becomes a huge pain in the butt.
None of this is currently implemented, but the suggestions on the board for
gmetad:
* Assigning properties (just location, at the moment) using an Apache-like
format - each properties container is defined by a hostname or IP
expression, and the hosts which match it are assigned the attributes set
inside that container. i.e.
<Address "10.10.1.0/24">
Location "Building 51, Machine Room 1A"
</Address>
<Hostname ".desktops.mydomain.com">
Location "Some User's Desk"
</Hostname>
* Another way to do it would be to allow some sort of delimiter for those
who actually put location info in the hostname string somewhere (i.e.
"binky.b1r3c2sh1.encom.com"). Not necessarily something as powerful as a
full regex parser but something to at least dump that text field into the
location field for each host.
* I think the other suggestion was, basically, a flat file that gmetad
reads for location tag overrides. Simple, stupid, and easy to manage if
you've only got a few hosts. But if you only had a few hosts you wouldn't
be so concerned with the location tag in the first place.
Personally, I think method #1 is the way to go, but #3 is probably the
easiest to hack together on your own. Maybe you could package the script's
lookup logic as a C function and then call it as each host is parsed in
gmetad/data_thread.c ...
Sorry there isn't an easier solution. Remember, this is the first (OK,
second) real release with the location tag... so if it only becomes useful
to you by the next release, we are still on par with (or slightly ahead of)
a well-known closed-source software company...