ganglia gmond/gmetric guide?

Alex Dean alex at crackpot.org
Tue Mar 30 07:01:13 MST 2010


On Mar 29, 2010, at 9:42 PM, der.hans wrote:

> moin moin,
>
> I'm using ganglia for something. Someone else set it up, but I need  
> to add
> a bunch of metrics ( that will then be alerted via nagios ).
>
> Just using gmetric as is given in multiple examples isn't working.
>
> gmetric --name distribution_release --value $( lsb_release -d | sed - 
> re
> 's/Description:[[:space:]]*//' ) --type 'string'
>
> Running that via sudo also doesn't show up in the ganglia display.

Try tracing your metric from gmond to gmetad to the web.  The path it  
takes will vary depending on whether you use multicast or unicast, of  
course.

After you run the gmetric command, wait a few seconds and run 'telnet  
localhost 8649'.  gmond will give you an XML representation of all the  
metrics it knows about.  You should see your new metric there.

On the node running gmetad, you can run 'telnet localhost 8651' to get  
data for the entire cluster.  Again, your metric should be there,  
assuming you've waited long enough for gmetad to poll gmond for new  
data.

gmetad also provides an 'interactive' port, which by default is 8652.   
You can send it a query string (which sorta looks like xpath, but  
isn't) and get the values just for a single host (or a single metric  
on a single host).  This is a good path to ganglia/nagios integration.

$ telnet localhost 8652
Connected to localhost.
Escape character is '^]'.
/cluster_name/host_name/load_five/

... this will return just the load_five metric on host_name in the  
cluster cluster_name.

If you find your metric in gmond, and in gmetad, then it sounds like  
you might have a permissions problem with the rrd files.  But I seem  
to recall those kinds of problems *do* show up in /var/log/messages.

>
> Both give exit status of 0.
>
> It's not showing up in /var/ganglia/rrds.
>
> Who should own those rrds files? We have them owned by root, but gmond
> runs as an unprivileged user?

They need to be writable by the user running gmetad (nobody?), and  
readable by the Apache user.

>
> I also don't see that in /var/log/messages, which seems to be  
> getting all
> the gmond logs.


alex
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 194 bytes
Desc: This is a digitally signed message part
URL: <http://lists.PLUG.phoenix.az.us/pipermail/plug-discuss/attachments/20100330/ad48a2e1/attachment.pgp>


More information about the PLUG-discuss mailing list