Bernard,

I posted a patch to bugzilla that adds sFlow support to gmond.  We tested it 
with trunk revision 2339,  against sFlow received from the reference 
implementation at http://host-sflow.sourceforge.net.

http://bugzilla.ganglia.info/cgi-bin/bugzilla/show_bug.cgi?id=276

The host-sflow daemon is not as flexible or extensible as gmond,  but if it 
were already running on a host and you only wanted the base metrics then this 
patch would allow a remote gmond to just use that feed.

This patch touches on several topics in the Ganglia wish-list:
* - native windows implementation
* - multiple metrics per datagram
* - key host-data by IPv4, IPv6, MAC or even system UUID

Impact:
This patch simply injects code into process_udp_receive_channel() to intercept 
and interpret sFlow datagrams arriving on port 6343.  If you don't configure a 
listener for port 6343 then the impact is zero  -- just that the Ganglia_host 
structure is now 4 or 8 bytes bigger.  I don't believe there are any 
dependencies that will affect portability either:  the only other .h I had to 
pull in was the "my_inet_ntop.h" from the lib directory.

Notes:
1 - line 146 of gmond.c "#define SFLOW 1" is really a compile flag that belongs 
in the Makefile.
2 - If I have violated any style-guidelines then please let me know(!)
3 - In process_udp_receive_channel() I added "localport" to grab the local port 
from "remotesa" before it gets overwritten.  These shenanigans are confusing 
and should probably be re-worked a little.
4 - When I submitted a stack-allocated "os_release" string to 
Ganglia_value_save() it was somehow being overwritten later.  It looks like 
vmsg...gstr.str gets copied to another pool using apr_pstrdup() so I couldn't 
see why this was a problem.   Making the string heap-allocated and persistent 
solved the problem,  but I'd like to understand what was going wrong before.  
Any ideas?

Neil


------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Ganglia-developers mailing list
Ganglia-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ganglia-developers

Reply via email to