Hi There.

I have been thinking about using Ganglia to monitor a broader range of 
networked devices for a while. Many of these systems do not run common OS 
platforms and communicate via the SNMP protocol. Last year I came up with a 
Ganglia 2.5.x hack that enabled a host to send gmetric updates on behalf of 
another device (I call it spoofing). I have just added the same functionality 
on top of Ganglia 3.0.x and it appears to be working OK.

I modified lib/protocol.x and created a new message type that adds a spoof IP 
address and host/device name to the existing gmetric data struct. Here's an 
example of it in use:

'gmetric --help' now lists a new option:

  -S, --spoof=STRING  IP address and name of host/device (colon separated) we
                        are spoofing  (default=`')

you use it like this:

'gmetric -c cfile -n dataRateIn -v 1234231434 -t uint32 -u bytes -S 
123.456.789.012:[EMAIL PROTECTED]

Add querying your target gmond shows the following:

<HOST NAME="[EMAIL PROTECTED]" IP="123.456.789.012" REPORTED="1134604773" 
TN="9" TMAX="20" DMAX="86400" LOCATION="unspecified" GMOND_STARTED="0">
<METRIC NAME="dataRateIn" VAL="1234231434" TYPE="uint32" UNITS="bytes" TN="9" 
TMAX="60" DMAX="0" SLOPE="both" SOURCE="gmetric"/>
</HOST>

I'll be using this feature in production for sure and I'd like to get the CVS 
maintainers to review my code and add it to CVS. 

------
Yemi


Reply via email to